/* =========================================================
   en-vivo.css — módulo «EN VIVO» (js/en-vivo.js). Prefijo ev-.
   Sin modo oscuro (igual que el resto del panel). Se adapta a móvil (375 px).
   ========================================================= */
.ev { display: grid; gap: 14px; }
.ev-hero { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; color: #fff; background: linear-gradient(120deg, #052e16 0%, #166534 55%, #15803d 100%); box-shadow: 0 8px 24px rgba(22, 101, 52, .22); flex-wrap: wrap; }
.ev-hero__t { display: grid; gap: 1px; flex: 1 1 200px; min-width: 0; }
.ev-hero__t b { font-size: 1.15rem; letter-spacing: .01em; }
.ev-hero__t small { opacity: .85; font-size: .8rem; }
.ev-hero__upd { font-size: .76rem; opacity: .85; font-variant-numeric: tabular-nums; }
.ev-pulso { position: relative; width: 16px; height: 16px; flex: none; }
.ev-pulso i { position: absolute; inset: 3px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 0 rgba(74, 222, 128, .7); animation: ev-pulso 1.6s infinite; }
@keyframes ev-pulso { 70% { box-shadow: 0 0 0 11px rgba(74, 222, 128, 0); } 100% { box-shadow: 0 0 0 0 rgba(74, 222, 128, 0); } }
@media (prefers-reduced-motion: reduce) { .ev-pulso i { animation: none; } }
.ev-btn { border: 1px solid rgba(255, 255, 255, .45); background: rgba(255, 255, 255, .14); color: #fff; font: inherit; font-weight: 800; font-size: .82rem; padding: 7px 13px; border-radius: 999px; cursor: pointer; }
.ev-btn:hover { background: rgba(255, 255, 255, .26); }
.ev-btn--claro { color: #1d4ed8; background: #fff; border-color: #c9d8fb; }
.ev-btn--claro:hover { background: #eff4ff; }

/* tipos (chips) */
.ev-tipos { display: flex; gap: 8px; flex-wrap: wrap; }
.ev-tipo { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #d5dff5; background: #fff; color: #1e3a8a; font: inherit; font-weight: 800; font-size: .85rem; padding: 7px 13px; border-radius: 999px; cursor: pointer; }
.ev-tipo b { background: #eef2ff; color: #3730a3; border-radius: 999px; padding: 0 8px; font-size: .78rem; }
.ev-tipo.is-on { background: #1d4ed8; color: #fff; border-color: #1d4ed8; }
.ev-tipo.is-on b { background: rgba(255, 255, 255, .22); color: #fff; }

/* filtros */
.ev-flt { display: grid; grid-template-columns: minmax(200px, 1.6fr) repeat(4, minmax(130px, 1fr)) auto; gap: 8px; align-items: center; padding: 12px; background: #fff; border: 1px solid #e1e8f7; border-radius: 16px; }
.ev-flt__q { display: flex; align-items: center; gap: 6px; border: 1px solid #cdd8ef; border-radius: 12px; padding: 0 10px; background: #f8faff; }
.ev-flt__q input { border: 0; background: transparent; padding: 10px 0; font: inherit; width: 100%; min-width: 0; outline: none; }
.ev-flt__q:focus-within { border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37, 99, 235, .15); }
.ev-flt select { font: inherit; padding: 10px 8px; border: 1px solid #cdd8ef; border-radius: 12px; background: #f8faff; min-width: 0; width: 100%; }
@media (max-width: 1100px) { .ev-flt { grid-template-columns: repeat(2, 1fr); } .ev-flt__q { grid-column: 1 / -1; } .ev-flt .ev-btn { justify-self: start; } }
@media (max-width: 520px) { .ev-flt { grid-template-columns: 1fr; } }

/* KPIs */
.ev-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.ev-kpi { --c: #1d4ed8; --s: #e8efff; display: flex; align-items: center; gap: 12px; padding: 13px 14px; border-radius: 16px; background: linear-gradient(180deg, #fff, var(--s)); border: 1px solid #e1e8f7; border-left: 5px solid var(--c); }
.ev-kpi__i { width: 44px; height: 44px; flex: none; border-radius: 14px; display: grid; place-items: center; font-size: 1.35rem; background: var(--s); }
.ev-kpi__b { display: grid; min-width: 0; }
.ev-kpi__b b { font-size: 1.55rem; line-height: 1.1; color: var(--c); font-variant-numeric: tabular-nums; }
.ev-kpi__b em { font-style: normal; font-weight: 800; font-size: .8rem; color: #0f1f4d; }
.ev-kpi__b small { color: #64748b; font-size: .74rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ev-t-verde { --c: #15803d; --s: #eafaf0; } .ev-t-azul { --c: #1d4ed8; --s: #e8efff; } .ev-t-ambar { --c: #b45309; --s: #fff6e0; }
.ev-t-violeta { --c: #6d28d9; --s: #f0e9ff; } .ev-t-teal { --c: #0f766e; --s: #e2f8f5; } .ev-t-gris { --c: #64748b; --s: #f1f5f9; }

/* paneles y gráficos */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 12px; }
.ev-pan { background: #fff; border: 1px solid #e1e8f7; border-radius: 16px; padding: 14px; min-width: 0; }
.ev-pan h4 { margin: 0 0 10px; font-size: .95rem; color: #0f1f4d; }
.ev-pan h4 small { font-weight: 600; color: #64748b; font-size: .76rem; }
.ev-pan--ancho { grid-column: 1 / -1; }
.ev-nada { color: #64748b; font-size: .88rem; margin: 6px 0; }
.ev-nada--err { color: #b91c1c; }
.ev-bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.ev-bars li { display: grid; grid-template-columns: minmax(70px, 38%) 1fr auto; gap: 8px; align-items: center; font-size: .82rem; }
.ev-bars__t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #334155; font-weight: 700; }
.ev-bars__b { height: 10px; background: #eef2fb; border-radius: 999px; overflow: hidden; }
.ev-bars__b i { display: block; height: 100%; border-radius: 999px; transition: width .5s; }
.ev-bars b { font-variant-numeric: tabular-nums; color: #0f1f4d; }
.ev-cols { display: flex; align-items: flex-end; gap: 8px; height: 140px; }
.ev-cols__c { flex: 1; display: grid; grid-template-rows: auto 1fr auto; justify-items: center; height: 100%; min-width: 0; }
.ev-cols__v { font-size: .75rem; font-weight: 800; color: #1d4ed8; min-height: 1em; }
.ev-cols__b { width: 100%; max-width: 38px; display: flex; align-items: flex-end; background: #f1f5fd; border-radius: 8px 8px 0 0; }
.ev-cols__b i { display: block; width: 100%; border-radius: 8px 8px 0 0; transition: height .5s; }
.ev-cols em { font-style: normal; font-size: .74rem; color: #475569; margin-top: 4px; }
.ev-serie { width: 100%; height: auto; max-height: 170px; display: block; }
.ev-serie text { font-size: 9px; fill: #64748b; }
.ev-serie__pico { fill: #15803d !important; font-weight: 800; font-size: 10px !important; }
.ev-serie__eje { stroke: #d5dff5; stroke-width: 1; }

/* listas */
.ev-lista { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.ev-fila { --p: 4%; display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid #e6ecf8; border-radius: 14px; background: #fff; }
.ev-fila--top { grid-template-columns: 34px auto 1fr auto; }
.ev-fila:first-child.ev-fila--top { background: linear-gradient(90deg, #fffbea, #fff 60%); border-color: #f3dc8d; }
.ev-fila__pos { font-size: 1.35rem; text-align: center; }
.ev-rank { display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: #eef2ff; color: #3730a3; font-size: .8rem; font-weight: 800; }
.ev-av { position: relative; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 1.5rem; background: #eef4ff; border: 1px solid #d5e1fb; }
.ev-av i { position: absolute; right: -3px; bottom: -3px; width: 12px; height: 12px; border-radius: 50%; background: #22c55e; border: 2px solid #fff; }
.ev-fila__t { display: grid; gap: 3px; min-width: 0; }
.ev-fila__t b { color: #0f1f4d; font-size: .95rem; overflow-wrap: anywhere; }
.ev-fila__m { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: .78rem; color: #475569; align-items: center; }
.ev-chip { font-style: normal; font-weight: 800; font-size: .74rem; padding: 1px 9px; border-radius: 999px; background: #e0e7ff; color: #3730a3; }
.ev-chip--acudiente { background: #f0e9ff; color: #6d28d9; } .ev-chip--padrino { background: #e0f2fe; color: #075985; }
.ev-chip--rector { background: #fee2e2; color: #991b1b; } .ev-chip--coordinador { background: #fef3c7; color: #92400e; } .ev-chip--docente { background: #dcfce7; color: #166534; }
.ev-fila__barra { display: block; height: 5px; background: #edf1fb; border-radius: 999px; overflow: hidden; }
.ev-fila__barra i { display: block; height: 100%; width: var(--p); background: linear-gradient(90deg, #22c55e, #2563eb); border-radius: 999px; transition: width .6s; }
.ev-fila__tm { display: grid; justify-items: end; gap: 1px; text-align: right; white-space: nowrap; }
.ev-fila__ing { font-size: .76rem; color: #475569; }
.ev-fila__dur { font-size: 1.05rem; color: #15803d; font-variant-numeric: tabular-nums; }
.ev-fila__tm small { color: #94a3b8; font-size: .72rem; }
.ev-lista--compacta .ev-fila { padding: 8px 10px; }
.ev-lista--compacta .ev-av { width: 38px; height: 38px; font-size: 1.25rem; }
.ev-mas { margin-top: 10px; border-color: #c9d8fb; }
.ev-pie { margin: 0; color: #64748b; font-size: .82rem; text-align: center; }
.ev-vacio { display: grid; justify-items: center; gap: 4px; text-align: center; padding: 34px 16px; background: #fff; border: 1px dashed #c9d8fb; border-radius: 18px; }
.ev-vacio span { font-size: 2.4rem; }
.ev-vacio b { color: #0f1f4d; }
.ev-vacio small { color: #64748b; }

@media (max-width: 640px) {
  .ev-hero { padding: 12px; }
  .ev-fila, .ev-fila--top { grid-template-columns: auto 1fr; }
  .ev-fila--top { grid-template-columns: 28px auto 1fr; }
  .ev-fila__tm { grid-column: 1 / -1; grid-template-columns: 1fr auto; justify-items: start; text-align: left; align-items: center; border-top: 1px dashed #e1e8f7; padding-top: 6px; }
  .ev-fila__tm small { grid-column: 1 / -1; }
  .ev-fila__dur { justify-self: end; }
  .ev-fila--top .ev-fila__tm { grid-column: 1 / -1; }
}

/* tarjetas «En línea ahora» de los resúmenes que llevan a la pestaña En vivo */
.ax-kpi--go { cursor: pointer; text-align: left; font: inherit; border: 0; }
.ax-kpi--go:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(21, 128, 61, .18); }
.ax-kpi__go { display: block; font-size: .7rem; font-weight: 800; color: #15803d; font-style: normal; margin-top: 1px; }
