.actividad-resumen {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-bottom: 32px;
}

.actividad-perfil-mini {
  padding: 16px;
}

.actividad-grafico-mini .barras {
  display: flex;
  align-items: flex-end;
  gap: 6px;
  height: 80px;
}

.actividad-grafico-mini .barra {
  width: 10px;
  background: #444;
  border-radius: 2px;
}

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


.actividad-hero-perfil h3 {
  margin: 0 0 8px 0;
}

.actividad-hero-stats {
  color: #555;
  font-size: 0.95rem;
}

/* ===== MINI CHART ===== */


.mini-bar {
  width: 10px;
  background: #999;
  border-radius: 2px;
}

.mini-empty {
  font-size: 0.85rem;
  color: #777;
}


/* ===== AVATAR ===== */
.actividad-avatar {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  object-fit: cover;
  background: #eee;
}

.actividad-hero-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ===== GRAFICO ===== */
.actividad-hero-grafico {
  width: 100%;
}

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

.grafico-tabs .tab {
  border: none;
  background: #eee;
  padding: 4px 10px;
  border-radius: 8px;
  cursor: pointer;
}

.grafico-tabs .tab.active {
  background: #222;
  color: #fff;
}

/* ===== MINI CHART ===== */


.mini-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 24px;
}

.mini-bar {
  width: 100%;
  background: #444;
  border-radius: 4px 4px 0 0;
  min-height: 4px;
}

.mini-label {
  font-size: 10px;
  margin-top: 4px;
  color: #666;
}


.mini-col{
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;    /* barra pegada abajo */
  align-items: center;
}

.mini-bar{
  display: block;
  width: 10px;                  /* ajusta */
  max-height: 100%;
  border-radius: 6px;
}


.mini-col{
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

/* 🔴 BARRA = RECTÁNGULO */
.mini-bar{
  width: 14px;
  background: #444;
  border-radius: 2px;          /* ← ya NO es circular */
  max-height: 100%;
}

/* ===== EJE Y REAL ===== */



.ideologia-card {
  margin-top: 16px;
}

.ideologia-barras {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.ideologia-row {
  display: grid;
  grid-template-columns: 120px 1fr 40px;
  align-items: center;
  gap: 8px;
  font-size: 12px;
}

.ideologia-label {
  color: #444;
}

.ideologia-bar-bg {
  background: #eee;
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
}

.ideologia-bar {
  height: 100%;
  border-radius: 6px;
}

/* Colores suaves */
.ideologia-izquierda       { background: #0916a8; }
.ideologia-centro_izquierda{ background: #0e61b4; }
.ideologia-centro          { background: #8a8b8d; }
.ideologia-centro_derecha  { background: #e53131; }
.ideologia-derecha         { background: #b01111; }

.ideologia-pct {
  text-align: right;
  color: #666;
}

.actividad-ideologia-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  margin-top: 32px;
}

.ideologia-card {
  padding: 16px;
}

.radial-chart {
  position: relative;
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 16px auto;
}

.radial-segment {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background:
    conic-gradient(
      var(--color) calc(var(--start) * 1%),
      var(--color) calc((var(--start) + var(--size)) * 1%),
      transparent 0
    );
}

.radial-chart {
  width: 160px;
  height: 160px;
  border-radius: 50%;
  margin: 16px auto;
  position: relative;
}

/* OPCIONAL → convertirlo en dona */
.radial-chart::after {
  content: "";
  position: absolute;
  inset: 28%;
  background: #fff;
  border-radius: 50%;
}

.radial-chart {
  width: 170px;
  height: 170px;
  border-radius: 50%;
  margin: 16px auto;
  position: relative;
  cursor: pointer;
}

/* dona */
.radial-chart::after {
  content: "";
  position: absolute;
  inset: 28%;
  background: #fff;
  border-radius: 50%;
  z-index: 1;
}

/* centro */
.radial-center {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: 12px;
}

.radial-center strong {
  text-transform: capitalize;
}

.radial-center span {
  font-size: 14px;
  font-weight: 600;
}

.radial-chart {
  width: 320px;
  height: 320px;
  border-radius: 50%;
  margin: 16px auto;
  position: relative;
  cursor: pointer;
}

.radial-chart::after {
  content: "";
  position: absolute;
  inset: 20%;           /* ⬅️ agujero más pequeño */
  background: #fff;
  border-radius: 50%;
  z-index: 1;
}

/* =========================
   GRÁFICO DE MEDIOS
   ========================= */

/* ===== EJE X ===== */


.mini-col {
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
}

.mini-bar {
  width: 14px;
  background: #444;
  border-radius: 2px;
}


:root {
  --mini-chart-h: 120px;
  --medios-chart-h: 140px;
}


/* ===== PLOT (solo barras + eje y) ===== */
:root { --medios-h: 140px; }

/* ===== PLOT ===== */


.medios-y-axis {
  position: absolute;
  left: 0;
  top: 0;
  height: var(--medios-h);
  width: 30px;
  font-size: 12px;
  color: #666;
}

.medios-y-axis span {
  position: absolute;
  right: 0;
}

.y-top  { top: 0; transform: translateY(-50%); }
.y-mid  { top: 50%; transform: translateY(50%); }
.y-zero { bottom: 0; transform: translateY(50%); }

.medios-chart {
  height: var(--medios-h);
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

/* barras */
.medio-bar-area {
  height: var(--medios-h);
  width: 16px;
  display: flex;
  align-items: flex-end;
}

.medio-bar {
  width: 100%;
  background: #444;
  border-radius: 2px;
}

/* ===== EJE X ===== */
.medios-x-axis {
  margin-left: 36px;
  margin-top: 6px;
  display: flex;
  gap: 14px;
}

.medio-label {
  font-size: 11px;
  text-align: center;
  color: #666;
  max-width: 70px;
}

/* 🔑 MISMA COLUMNA PARA BARRA Y TEXTO */
.medios-chart,
.medios-x-axis {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 30px; /* EXACTO al ancho de la barra */
  gap: 30px;
}

/* centra texto bajo la barra */
.medio-label {
  width: 16px;
  font-size: 11px;
  text-align: center;
  color: #666;
  line-height: 1.2;
}

.medio-col {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;                 /* espacio entre logo y barra */
}

.medio-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
  background: #f2f2f2;
}




.medio-logo {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: contain;
  background: #f2f2f2;
}



/* ===== LOGOS FLOTANTES (NO AFECTAN EJE Y) ===== */

.medio-col {
  position: relative;
}

/* contenedor flotante */
.medio-logo-wrap {
  position: absolute;
  top: -44px;              /* ← posición fija, no depende del eje */
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.medio-logo {
  width: 40px;        /* o 36px si los quieres más protagonistas */
  height: 40px;
  border-radius: 50%;
  object-fit: contain;
  background: #f2f2f2;
}
.medio-logo {
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* Más aire entre título y gráfico de medios */

.ideologia-card {
  padding-top: 20px;
}




.ideologia-card.ideologia-medios h4{
  margin-bottom: 80px; /* ajusta 40-80 si quieres CAMBIA AQUI EL ESPACIADO*/
}


.medios-container {
  position: relative;
  padding-left: 36px;
}


/* ===== EJE Y REAL (ABSOLUTO) ===== */

/* etiquetas */


/* ===== CHART ===== */

.historias-chart-body {
  margin-top: 24px;   /* ajusta 16–32 sin miedo */
}


.actividad-hero-grafico {
  display: flex;
  flex-direction: column;
}

.historias-chart-body {
  margin-top: 24px; /* aquí SÍ funciona ahora */
}


/* ===== CONTENEDOR GENERAL ===== */
.actividad-hero-grafico {
  display: flex;
  flex-direction: column;
}

/* espacio real entre título y gráfico */
.historias-chart-body {
  margin-top: 24px;
}

/* CONTENEDOR DEL PLOT */
.mini-chart-wrapper {
  position: relative;
  height: 100px;     /* igual que antes */
}

/* EJE Y — FUERA DEL FLEX */
.mini-y-axis {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 28px;
  font-size: 11px;
  color: #666;
}

/* CHART (ÚNICO FLEX) */
.mini-chart {
  margin-left: 36px;     /* deja espacio para el eje */
  height: 100%;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

.mini-y-axis span {
  position: absolute;
  right: 0;
}

.mini-y-axis .y-top {
  top: 0;
  transform: translateY(-50%);
}

.mini-y-axis .y-zero {
  bottom: 0;
  transform: translateY(0);   /* 🔑 CLAVE */
}

.mini-bar-area {
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.mini-chart-wrapper {
  position: relative;
  height: 100px;
}

.mini-chart {
  height: 100px;           /* 🔑 ESTO FALTABA */
  align-items: flex-end;
}

.mini-bar-area {
  height: 100%;
  display: flex;
  align-items: flex-end;
}

.mini-y-axis .y-mid {
  top: 50%;
  transform: translateY(-50%);
}

/* CONTENEDOR GENERAL */
.mini-chart-wrapper {
  display: flex;
  flex-direction: column;
}

/* PLOT = solo barras + eje Y */
.mini-plot {
  position: relative;
  height: 100px;            /* ALTURA REAL DEL GRÁFICO */
}

/* EJE Y */
.mini-y-axis {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 28px;
  font-size: 11px;
}

.mini-y-axis .y-top {
  top: 0;
  position: absolute;
  transform: translateY(-50%);
}

.mini-y-axis .y-mid {
  top: 50%;
  position: absolute;
  transform: translateY(-50%);
}

.mini-y-axis .y-zero {
  bottom: 0;
  position: absolute;
}

/* BARRAS */
.mini-chart {
  margin-left: 36px;
  height: 100%;
  display: flex;
  align-items: flex-end;
  gap: 8px;
}

/* EJE X */
.mini-x-axis {
  margin-left: 36px;
  display: flex;
  gap: 8px;
  margin-top: 6px;
}

.mini-x-label {
  width: 24px;
  font-size: 10px;
  text-align: center;
  color: #666;
}

.mini-plot {
  height: 100px;
}

.mini-bar-area {
  height: 100%;
}
.mini-x-axis {
  display: flex;
  margin-left: 36px;  /* mismo offset del eje Y */
  margin-top: 6px;
  font-size: 10px;
  color: #666;
}

.mini-x-label {
  width: 24px;
  text-align: center;
}

.mini-x-label {
  width: 24px;            /* 🔑 MISMO width que .mini-col */
  text-align: center;
  font-size: 10px;
  color: #666;
}

.mini-chart,
.mini-x-axis {
  align-items: flex-end;
}






.temas-lista {
  display: flex;
  flex-direction: column;
  gap: 15px;
  margin-top: 12px;
}

.tema-row {
  display: flex;
  justify-content: space-between;
  padding-bottom: 6px;
  border-bottom: 1px solid #eee;
  font-size: 13px;
}

.tema-label {
  font-weight: 500;
  text-transform: capitalize;
}

.tema-count {
  color: #666;
}

.ideologia-temas {
  grid-column: 1;   /* 👈 fuerza columna izquierda */
}

.temas-lista {
  display: grid;
  grid-template-columns: 1fr 1fr;   /* 👈 DOS columnas */
  gap: 8px 16px;
  margin-top: 12px;
}

.tema-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}

.tema-label {
  font-weight: 500;
  text-transform: capitalize;
}

.tema-count {
  color: #777;
  font-size: 11px;
}

.ideologia-temas {
  grid-column: 1; /* fuerza columna izquierda */
}

.temas-lista {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 16px;
  margin-top: 12px;
}

.tema-row {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  padding-bottom: 4px;
  border-bottom: 1px solid #eee;
}

.tema-label {
  font-weight: 500;
  text-transform: capitalize;
}

.tema-count {
  font-size: 11px;
  color: #777;
}


.frecuencia-lectura {
  margin-top: 24px;
}

.frecuencia-sub {
  font-size: 12px;
  opacity: 0.7;
  margin-bottom: 12px;
}

.heatmap-wrapper {
  overflow-x: auto;
}

.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  background: #e0e0e0;
}

/* niveles */
.nivel-0 { background: #ebedf0; }
.nivel-1 { background: #c6e48b; }
.nivel-2 { background: #7bc96f; }
.nivel-3 { background: #239a3b; }
.nivel-4 { background: #196127; }

.heatmap-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  margin-top: 8px;
}

.legend-box {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.heatmap-wrapper {
  overflow-x: auto;
}

.heatmap-months {
  display: flex;
  gap: 4px;
  font-size: 11px;
  color: #777;
  margin-bottom: 6px;
}

.heatmap-months span {
  width: 12px;
}

.heatmap-grid {
  display: flex;
  gap: 4px;
}

.heatmap-week {
  display: grid;
  grid-template-rows: repeat(7, 12px);
  gap: 3px;
}

.heatmap-cell {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.heatmap-cell {
  transition: background 0.15s ease;
}

.heatmap-cell:hover {
  outline: 1px solid #555;
}

.nivel-0 {
  background: #f0f1f2;
}


.sesgo-personal {
  width: 100%;
  margin-top: 6px;
}


.sesgo-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;   /* ⬅️ centra texto DENTRO del color */
  font-size: 13px;
  font-weight: 600;
  color: #111;
  white-space: nowrap;
  overflow: hidden;
}

/* colores */
.sesgo-segment.izquierda { background:#c0392b; }
.sesgo-segment.centro_izquierda { background:#e67e22; }
.sesgo-segment.centro { background:#7f8c8d; }
.sesgo-segment.centro_derecha { background:#3498db; }
.sesgo-segment.derecha { background:#2c3e50; }


/* ===== SESGO PERSONAL ===== */

.sesgo-barra {
  position: relative;
  width: 100%;
  min-width: 500px;      /* ⬅️ CLAVE: barra larga */
  height: 25px;
  overflow: hidden;
  display: flex;
  background: #e5e7eb;  /* fallback */
}

/* segmentos de color */
.sesgo-segment {
  height: 100%;
    justify-content: center;
}

/* texto encima */
/* colores (si no los tienes ya) */
.sesgo-segment.izquierda        { background:#0d26b5; color:#fff; }
.sesgo-segment.centro_izquierda { background:#0c69d3; color:#111; }
.sesgo-segment.centro           { background:#9ea6a6; color:#fff; }
.sesgo-segment.centro_derecha   { background:#e32121; color:#fff; }
.sesgo-segment.derecha          { background:#930505; color:#fff; }

.sesgo-personal {
  width: 100%;
  margin-top: 8px;
}

.sesgo-barra {
  width: 100%;
  min-width: 550px;
  height: 26px;
  display: flex;
  overflow: hidden;
  border-radius: 6px;
}

.sesgo-segment {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
}

.sesgo-segment .sesgo-label {
  padding: 0 6px;
  color: inherit;   /* 🔑 CLAVE: usa el color del segmento */
}

.sesgo-segment {
  min-width: 4px;   /* 👈 asegura visibilidad */
}

.sesgo-segment {
  position: relative;
  min-width: 4px;
}

.sesgo-label {
  font-size: 12px;
  line-height: 1;
  pointer-events: none;
}

.mini-tooltip {
  position: fixed;
  z-index: 9999;
  pointer-events: none;
  background: rgba(0,0,0,0.85);
  color: #fff;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 12px;
  line-height: 1.3;
  opacity: 0;
  transition: opacity 0.1s ease;
}

.radial-chart,
.medio-bar,
.heatmap-cell,
.ideologia-bar,
.sesgo-segment,
.mini-bar {
  pointer-events: auto;
}

/* ===== BOTÓN VER MÁS ACTIVIDAD ===== */

.actividad-ver-mas {
  display: flex;
  justify-content: center;
  margin-top: 20px;
}

.btn-ver-mas {
  background: #000;              /* negro */
  color: #fff;                   /* texto blanco */
  border: none;
  padding: 14px 32px;            /* tamaño grande */
  font-size: 15px;
  font-weight: 600;
  border-radius: 999px;          /* completamente redondo */
  cursor: pointer;
  transition: all 0.2s ease;
}

/* hover elegante */
.btn-ver-mas:hover {
  background: #111;
  transform: translateY(-1px);
}

/* feedback al hacer click */
.btn-ver-mas:active {
  transform: translateY(0);
  background: #000;
}


/* EFECTO BASE PARA TODO ELEMENTO INTERACTIVO */
.chart-hoverable {
  transition:
    filter 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
  cursor: pointer;
}

.chart-hoverable:hover {
  filter: brightness(1.15);
  box-shadow: 0 0 0 2px rgba(0,0,0,0.08);
  transform: translateY(-1px);
}

.ideologia-bar {
  transition: filter 0.15s ease, box-shadow 0.15s ease;
}

.ideologia-bar:hover {
  box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
}

.sesgo-segment {
  transition:
    filter 0.15s ease,
    box-shadow 0.15s ease;
}



.medio-bar {
  transition:
    filter 0.15s ease,
    box-shadow 0.15s ease,
    transform 0.12s ease;
}

.medio-bar:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.25);
  transform: translateY(-2px);
}

/* Atenuar barras NO activas */
.chart-container:hover .chart-hoverable {
  opacity: 0.5;
}

.chart-container .chart-hoverable:hover {
  opacity: 1;
}

.ideologia-bar {
  position: relative;
}

.ideologia-bar:hover {
  box-shadow:
    0 0 0 2px rgba(0,0,0,0.25),   /* borde externo */
    inset 0 0 0 1px rgba(3, 3, 3, 0.4); /* definición interna */
}

.mini-bar:hover,
.medio-bar:hover {
  box-shadow: 0 4px 10px rgba(0,0,0,0.25);
  transform: translateY(-2px);
}

.sesgo-segment {
  position: relative;
  z-index: 1;
}

.sesgo-segment:hover {
  outline: 2px solid rgba(0,0,0,0.35);
  outline-offset: -2px;
  z-index: 2;
}

.radial-chart:hover {
  box-shadow: 0 0 0 2px rgba(0,0,0,0.15);
}

.ideologia-bar {
  position: relative;
  transition: box-shadow 0.15s ease;
}

.ideologia-bar:hover {
  box-shadow:
    0 0 0 2px rgba(0,0,0,0.45),   /* borde fuerte */
    0 2px 6px rgba(0,0,0,0.35),   /* sombra externa */
    inset 0 0 0 1px rgba(10, 10, 10, 0.35); /* definición interna */
}

.radial-chart {
  position: relative;
}

/* Highlight radial por segmento (SEGURO CON DONA) */
.radial-chart[data-active-segment="izquierda"] {
  box-shadow: inset 0 0 0 6px #c0392b;
}

.radial-chart[data-active-segment="centro_izquierda"] {
  box-shadow: inset 0 0 0 6px #e67e22;
}

.radial-chart[data-active-segment="centro"] {
  box-shadow: inset 0 0 0 6px #7f8c8d;
}

.radial-chart[data-active-segment="centro_derecha"] {
  box-shadow: inset 0 0 0 6px #3498db;
}

.radial-chart[data-active-segment="derecha"] {
  box-shadow: inset 0 0 0 6px #2c3e50;
}

.actividad-hero-frecuencia {
  margin-top: 16px;
  padding: 14px;
  background: #fafafa;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
}

.ideologia-row-doble {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  align-items: start; /* 🔑 evita empujes raros */
}

.actividad-ideologia-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  align-items: stretch;
}

.ideologia-medios,
.ideologia-temas {
  grid-column: span 1;
}

/* =========================
   FIX HERO PERFIL + SESGO + FRECUENCIA
   (pegar al FINAL del CSS)
========================= */

/* 1) Alineación avatar con el nombre (alinear ARRIBA, no centrado) */
.actividad-hero .actividad-hero-perfil .actividad-hero-user{
  display: flex !important;
  align-items: flex-start !important;  /* 🔑 esto alinea foto con el h3 */
  gap: 14px !important;
}

.perfil-eje {
  margin-left: 0px;   /* ajusta UNA sola vez */
  margin-top: 8px;
}

.frecuencia-lectura {
  margin-left: 0 !important;
  padding-left: 0 !important;
}


.heatmap-cell {
  width: 14px;     /* ⬅️ antes probablemente 10–12 */
  height: 14px;
  border-radius: 4px;  /* opcional, se ve más moderno */
}

.sesgo-personal {
  margin-bottom: 0px;   /* o 0 si los quieres pegados */
}

.frecuencia-lectura {
  margin-top: 0 !important;
}

.perfil-eje {
  gap: 6px;   /* controla TODO el espacio vertical */
}

.heatmap-week {
  gap: 5px;   /* default suele ser 2px */
}

.mini-plot {
  height: 230px;     /* prueba 220–260px */
}


.mini-chart {
  background:
    repeating-linear-gradient(
      to top,
      rgba(0,0,0,0.05),
      rgba(0,0,0,0.05) 1px,
      transparent 1px,
      transparent 25%
    );
}



.mini-col {
  position: relative;
}

.ideologia-temas .tema-label {
  font-size: 0.9rem;
  font-weight: 200;
}

#consumo-root {
  max-width: 1400px;      /* ancho del dashboard */
  margin: 0 auto;         /* centra horizontalmente */
  padding: 0 44px;        /* margen lateral interno */
}


/* ===== HERO ===== */
.actividad-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  margin-bottom: 32px;
}

/* GRID DE FONDO — MEDIOS DOMINANTES */
.medios-chart {
  position: relative;
  background:
    repeating-linear-gradient(
      to top,
      rgba(0,0,0,0.06),
      rgba(0,0,0,0.06) 1px,
      transparent 1px,
      transparent 25%
    );
}
.heatmap-wrapper {
  overflow-x: auto;
  overflow-y: hidden;   /* 🔑 elimina scroll vertical fantasma */
}
.heatmap-grid {
  align-items: start;
}

.heatmap-week {
  height: calc(7 * 14px + 6 * 5px); 
  /* 7 celdas + gaps */
}

/* Quitar margen superior interno de TODAS las ideologia-card */
.ideologia-card {
  margin-top: 0 !important;
}

/* Quitar margen superior interno de TODAS las ideologia-card */
.ideologia-card {
  margin-top: 0 !important;
}

.sesgo-barra {
  width: 575px;
  min-width: unset;
}


/* =========================
   AJUSTES BARRAS IDEOLÓGICAS
   (Histórica / Narrativa / Sesgo)
========================= */

/* Contenedor general del bloque */
.ideologia-barras {
  gap: 17px;                /* ⬅️ más espacio entre filas */
}

/* Cada fila */
.ideologia-row {
  grid-template-columns: 160px 1fr 48px; /* más aire al label */
  gap: 12px;
  font-size: 14px;          /* ⬅️ texto general más grande */
}

/* Etiqueta izquierda */
.ideologia-label {
  font-size: 14px;
  font-weight: 500;
  color: #333;
}

/* Fondo de la barra */
.ideologia-bar-bg {
  height: 23px;             /* ⬅️ GROSOR REAL de la barra */
  border-radius: 9px;
  background: #e5e7eb;
}

/* Barra de color */
.ideologia-bar {
  height: 100%;
  border-radius: 9px;
}

/* Porcentaje a la derecha */
.ideologia-pct {
  font-size: 13px;
  font-weight: 500;
  color: #555;
}


.ideologia-bar-bg {
  border-radius: 0 !important;   /* fondo cuadrado */
}

.ideologia-bar {
  border-radius: 0 !important;   /* barra cuadrada */
}


/* 🔑 CLAVE ABSOLUTA: evitar que el grid estire la columna izquierda */
.actividad-hero-perfil {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}



/* =========================
   ACTIVIDAD — CARDS TRANSPARENTES
========================= */

body.dark .actividad-container .ideologia-card,
body.dark .actividad-container .actividad-hero,
body.dark .actividad-container .actividad-hero-grafico {
  background: transparent !important;
  border: none !important;
  box-shadow: none !important;
}

/* =========================
   ACTIVIDAD — BARRAS NOTICIAS LEÍDAS
========================= */

body.dark .actividad-container .mini-bar {
  background: #ffffff !important;
}

/* =========================
   ACTIVIDAD — BARRAS MEDIOS DOMINANTES
========================= */

body.dark .actividad-container .medio-bar {
  background: #ffffff !important;
}

/* =========================
   ACTIVIDAD — RADIAL (CENTRO)
========================= */

body.dark .actividad-container .radial-center {
  background: transparent !important;
  box-shadow: none !important;
}

body.dark .actividad-container .radial-center strong,
body.dark .actividad-container .radial-center span {
  color: #ffffff !important;
}



/* =========================
   HISTORIAL — FECHA BLANCA
========================= */

body.dark .actividad-container .actividad-fecha {
  color: #ffffff !important;
  opacity: 0.9;
}

/* =========================
   GRID HORIZONTAL — BLANCO
========================= */

/* Eje Y (números) */
body.dark .actividad-container .mini-y-axis span,
body.dark .actividad-container .medios-y-axis span {
  color: rgba(255,255,255,0.75) !important;
}

/* Líneas horizontales implícitas */

body.dark .actividad-container .medios-chart::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(
      to top,
      rgba(255,255,255,0.18) 1px,
      transparent 1px
    );
  background-size: 100% 33%;
  pointer-events: none;
}

/* =========================
   PERFIL HERO — FONDO UNIFICADO
========================= */

body.dark .actividad-container .actividad-hero-perfil {
  background: transparent !important;
  box-shadow: none !important;
  border: none !important;
}

/* =========================
   DONA — CÍRCULO INTERNO REAL
========================= */

body.dark .actividad-container .radial-chart {
  position: relative;
}

/* círculo interno (no transparencia) */
body.dark .actividad-container .radial-chart::after {
  content: "";
  position: absolute;
  inset: 18%;
  border-radius: 50%;
  background: var(--bg-card, #0f172a); /* MISMO fondo del card */
  z-index: 1;
}

/* texto encima del círculo */
body.dark .actividad-container .radial-center {
  position: absolute;
  inset: 0;
  z-index: 2;
  background: none !important;
}

body.dark .actividad-container .radial-center strong,
body.dark .actividad-container .radial-center span {
  color: #ffffff !important;
}

/* =========================
   GRID — NOTICIAS LEÍDAS
========================= */

body.dark .actividad-container .mini-plot {
  position: relative;
}

body.dark .actividad-container .mini-plot::before {
  content: "";
  position: absolute;
  left: 40px; /* deja fuera el eje Y */
  right: 0;
  top: 0;
  bottom: 30px;
  background:
    linear-gradient(
      to top,
      rgba(255,255,255,0.15) 1px,
      transparent 1px
    );
  background-size: 100% 33%;
  pointer-events: none;
}

/* =========================
   EJE X — NOTICIAS LEÍDAS
========================= */

body.dark .actividad-container .mini-chart {
  position: relative;
}

/* línea base del eje X */
body.dark .actividad-container .mini-chart::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: rgba(255,255,255,0.15);
  z-index: 2;
  pointer-events: none;
}



.analisis-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.info-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 16px;
  height: 16px;
  margin-left: 6px;

  border-radius: 50%;
  border: 1px solid currentColor;

  font-size: 11px;
  font-weight: 600;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, sans-serif;

  line-height: 1;
  cursor: pointer;

  opacity: 0.65;
  user-select: none;
}

.info-icon:hover {
  opacity: 1;
}



/* modo oscuro */
body.dark .info-icon {
  border-color: #e5e7eb;
  color: #e5e7eb;
}

.info-tooltip {
  position: absolute;
  max-width: 260px;
  background: #111827;
  color: #fff;
  font-size: 12px;
  line-height: 1.4;
  padding: 8px 10px;
  border-radius: 6px;
  z-index: 9999;
  box-shadow: 0 8px 20px rgba(0,0,0,.35);
}

.info-icon {
  pointer-events: auto;
  cursor: pointer;
  z-index: 5;
  position: relative;
}

.info-tooltip {
  position: absolute;
  max-width: 260px;
  padding: 10px 12px;

  background: #111827;
  color: #f9fafb;

  border-radius: 8px;
  font-size: 13px;
  line-height: 1.4;

  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  z-index: 9999;
}

/* ── Hero header ── */
.actividad-hero { position: relative; }
.actividad-hero-header-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 12px; }
.actividad-hero-user-info h3 { margin: 0 0 2px; }
.actividad-username { font-size: 13px; color: #888; display: block; margin-bottom: 3px; }
.actividad-bio { font-size: 13px; color: #888; font-style: italic; margin: 2px 0 6px; }

/* ── Perfil público toggle ── */
.actividad-toggle-label { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #888; margin-bottom: 6px; cursor: pointer; }
.actividad-toggle-switch { position: relative; display: inline-block; width: 32px; height: 18px; }
.actividad-toggle-switch input { opacity: 0; width: 0; height: 0; }
.actividad-toggle-slider { position: absolute; cursor: pointer; top: 0; left: 0; right: 0; bottom: 0; background: #ccc; border-radius: 18px; transition: .3s; }
.actividad-toggle-slider::before { position: absolute; content: ""; height: 12px; width: 12px; left: 3px; bottom: 3px; background: white; border-radius: 50%; transition: .3s; }
.actividad-toggle-switch input:checked ~ .actividad-toggle-slider { background: #E8A020; }
.actividad-toggle-switch input:checked ~ .actividad-toggle-slider::before { transform: translateX(14px); }

/* ── Noticias leídas chart fills full hero height ── */
.actividad-hero .actividad-hero-grafico {
  display: flex;
  flex-direction: column;
}
.actividad-hero .historias-chart-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.actividad-hero .mini-chart-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.actividad-hero .mini-plot {
  flex: 1;
  height: auto !important;
  min-height: 120px;
  position: relative;
}
