/* Hemeroteca (#60 · S 27l) */
.hemeroteca { padding: 6px 0 40px; }

.hem-hero { padding: 24px; background: linear-gradient(135deg, #1e3a8a 0%, #1d4ed8 100%); color: #fff; border-radius: 14px; margin-bottom: 18px; }
.hem-hero h2 { color: #fff; font-size: 22px; font-weight: 700; }
.hem-hero-titulo { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 18px; }
.hem-hero .muted { color: rgba(255,255,255,0.85) !important; }
.hem-rango { display: flex; gap: 4px; background: rgba(255,255,255,0.12); padding: 4px; border-radius: 8px; }
.hem-rango .btn { color: #fff; background: transparent; border: 0; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.hem-rango .btn.active { background: #fff; color: #1d4ed8; }

.hem-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.hem-kpi { background: rgba(255,255,255,0.13); padding: 12px 14px; border-radius: 10px; }
.hem-kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; opacity: 0.85; font-weight: 600; }
.hem-kpi-num { font-size: 28px; font-weight: 700; margin: 2px 0; line-height: 1; }
.hem-kpi-sub { font-size: 11px; opacity: 0.8; }
.hem-kpi-positivo { background: rgba(16,185,129,0.25); }
.hem-kpi-neutro   { background: rgba(148,163,184,0.25); }
.hem-kpi-negativo { background: rgba(239,68,68,0.25); }

.hem-admin { display: flex; gap: 8px; margin-bottom: 18px; }
.hem-admin .btn { background: #fff; border: 1px solid var(--border); padding: 6px 12px; font-size: 12px; }

.hem-graf { display: grid; grid-template-columns: 320px 1fr; gap: 14px; margin-bottom: 18px; }
@media (max-width: 900px) { .hem-graf { grid-template-columns: 1fr; } }
.hem-graf-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px; }
.hem-graf-titulo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-2); margin-bottom: 12px; }
.hem-leyenda { font-size: 13px; display: flex; flex-direction: column; gap: 6px; }
.hem-leyenda div { display: flex; align-items: center; gap: 8px; }
.hem-leyenda b { margin-left: auto; }
.hem-leyenda .dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; }

.hem-bars { display: flex; flex-direction: column; gap: 8px; }
.hem-bar-row { display: grid; grid-template-columns: 140px 1fr 40px; gap: 10px; align-items: center; cursor: pointer; padding: 4px; border-radius: 6px; }
.hem-bar-row:hover { background: #f1f5f9; }
.hem-bar-label { font-size: 13px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hem-bar-track { display: flex; height: 18px; background: #f1f5f9; border-radius: 9px; overflow: hidden; }
.hem-bar-fill { height: 100%; transition: width 0.3s; }
.hem-bar-num { font-size: 13px; font-weight: 700; text-align: right; }

.hem-ranking { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.hem-ranking-titulo { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-2); margin-bottom: 14px; }
.hem-ranking-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 8px; }
.hem-rank-row { display: flex; gap: 10px; align-items: center; padding: 8px; border-radius: 8px; cursor: pointer; }
.hem-rank-row:hover { background: #f1f5f9; }
.hem-rank-row .av { width: 34px; height: 34px; border-radius: 50%; color: #fff; font-weight: 700; font-size: 12px; display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; }
.hem-rank-info { flex: 1; min-width: 0; font-size: 13px; }
.hem-rank-bar { display: flex; height: 6px; background: #f1f5f9; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.hem-rank-bar div { height: 100%; transition: width 0.3s; }
.hem-rank-num { text-align: right; min-width: 50px; }

.hem-filtros { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 18px; }
.hem-busqueda { position: relative; margin-bottom: 14px; }
.hem-busqueda input { width: 100%; padding: 12px 40px 12px 42px; font-size: 14px; border: 1px solid var(--border); border-radius: 10px; background-color: #f8fafc; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: 14px center; }
.hem-busqueda input:focus { outline: none; border-color: var(--primary); background-color: #fff; }
.hem-q-clear { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); background: var(--border); color: var(--text-2); border: 0; width: 22px; height: 22px; border-radius: 50%; cursor: pointer; font-size: 11px; }

.hem-chips-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 10px; }
.hem-chips-label { font-size: 11px; font-weight: 600; color: var(--text-2); text-transform: uppercase; letter-spacing: 0.5px; margin-right: 6px; }
.chip { background: #f1f5f9; color: var(--text-1); border: 1px solid transparent; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.chip:hover { background: #e2e8f0; }
.chip-active { background: var(--primary, #1d4ed8); color: #fff; border-color: var(--primary, #1d4ed8); }
.chip-positivo.chip-active { background: #10b981; border-color: #10b981; color: #fff; }
.chip-neutro.chip-active   { background: #64748b; border-color: #64748b; color: #fff; }
.chip-negativo.chip-active { background: #ef4444; border-color: #ef4444; color: #fff; }

.hem-chip-aplicado { display: inline-flex; align-items: center; gap: 8px; background: #dbeafe; color: #1d4ed8; padding: 5px 11px; border-radius: 999px; font-size: 12px; font-weight: 500; margin-top: 4px; }
.hem-chip-x { background: transparent; border: 0; color: #1d4ed8; cursor: pointer; font-size: 14px; padding: 0; }

.hem-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); gap: 14px; }
.hem-card { background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 18px; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; }
.hem-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,0.06); border-color: #cbd5e1; }
.hem-card-positivo { border-left: 4px solid #10b981; }
.hem-card-neutro   { border-left: 4px solid #94a3b8; }
.hem-card-negativo { border-left: 4px solid #ef4444; }
.hem-card-pendiente{ border-left: 4px solid #f59e0b; }
.hem-card-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; flex-wrap: wrap; }
.hem-card-titulo { font-size: 16px; font-weight: 700; line-height: 1.35; margin: 0 0 8px; color: var(--text-1); }
.hem-card-resumen { font-size: 13px; line-height: 1.5; color: var(--text-2); margin: 0 0 12px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.hem-card-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.hem-card-cats { display: flex; flex-wrap: wrap; gap: 4px; flex: 1; min-width: 0; }
.hem-card-link { font-size: 12px; font-weight: 600; color: var(--primary, #1d4ed8); text-decoration: none; white-space: nowrap; }
.hem-card-link:hover { text-decoration: underline; }

.cat-chip { display: inline-block; background: #f1f5f9; color: var(--text-2); padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 500; }

.medio-badge { padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.3px; }

.sent-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.sent-badge.sent-positivo { background: #d1fae5; color: #065f46; }
.sent-badge.sent-neutro   { background: #f1f5f9; color: #475569; }
.sent-badge.sent-negativo { background: #fee2e2; color: #991b1b; }
.sent-badge.sent-pending  { background: #fef3c7; color: #92400e; }
.sent-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }

.hem-vacio { background: #fff; border: 1px dashed var(--border); border-radius: 12px; padding: 50px 30px; text-align: center; color: var(--text-2); font-size: 14px; }

.hem-detalle { font-family: var(--font-sans); }
.hem-det-resumen { background: linear-gradient(135deg, #ede9fe 0%, #ddd6fe 100%); padding: 14px 16px; border-radius: 10px; margin: 14px 0; }
.hem-det-resumen-label { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: #6d28d9; }
.hem-det-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin: 14px 0; }
.hem-det-sub { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; color: var(--text-2); margin-bottom: 8px; }
.hem-det-personas { display: flex; flex-direction: column; gap: 6px; }
.hem-det-persona { display: flex; align-items: center; justify-content: space-between; background: #f8fafc; padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.hem-det-temas { display: flex; flex-wrap: wrap; gap: 5px; }
.hem-det-snippet { margin-top: 16px; padding: 12px; background: #f8fafc; border-radius: 8px; border-left: 3px solid var(--border); }
