/* 26.9.0 · Tablero de la empresa (pestaña Hoy). Primero celular: 2 columnas de cifras, carruseles que se deslizan. */
/* 27.0.0 · Filtro de campañas (una o varias), comparación con barras, alcance por red y origen medido o estimado. */
.tb-filtro { display: grid; gap: 8px; min-width: 0; }
.tb-filtro-label { color: var(--mist); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.tb-filtro .tb-filtros { flex-wrap: wrap; overflow: visible; }
.tb-filtro-ayuda { margin: 0; color: var(--mist-2); font-size: .8rem; }
.tb-chip { max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-chip i { font-size: .75em; }
.tb-chip-nota { color: var(--mist-2); font-size: .74rem; font-weight: 500; }
.tb-sub { margin-bottom: 14px; }
.tb-sub .tb-chip { min-height: 32px; padding: 4px 12px; font-size: .8rem; }
.tb-nota { display: flex; gap: 8px; align-items: flex-start; margin: -4px 0 0; color: var(--mist-2); font-size: .8rem; line-height: 1.45; }
.tb-nota i { margin-top: 3px; }
.tb-barras { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.tb-barras li { display: grid; gap: 6px; min-width: 0; }
.tb-barras-top { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; min-width: 0; }
.tb-barras-top span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; font-size: .92rem; }
.tb-barras-top span i { width: 18px; color: var(--blue); }
.tb-barras-top b { font-variant-numeric: tabular-nums; flex: 0 0 auto; }
.tb-barras small { color: var(--mist); font-size: .76rem; }
.tb-barras .tb-barra { height: 10px; }
.tb-origen { position: absolute; top: 10px; right: 10px; padding: 2px 8px; border-radius: 999px; font-size: .68rem; font-weight: 700; }
.tb-origen.medido { color: var(--ok); background: rgba(58, 210, 159, .12); }
.tb-origen.estimado { color: var(--mist); background: rgba(157, 176, 214, .1); }
.tb-redes { display: flex; gap: 8px; justify-content: center; color: var(--mist); font-size: .9rem; min-height: 1em; }
.tb-en { color: var(--blue) !important; font-weight: 600; }
.tb-campana-acciones { display: flex; flex-wrap: wrap; gap: 8px; }

.tb { display: grid; gap: 16px; margin-bottom: 26px; min-width: 0; }
.tb > * { min-width: 0; }
.tb-filtros { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.tb-filtros::-webkit-scrollbar { display: none; }
.tb-chip { flex: 0 0 auto; min-height: 36px; padding: 6px 14px; border-radius: 999px; border: 1px solid var(--trace); background: transparent; color: var(--mist); font: 600 .86rem var(--text); cursor: pointer; }
.tb-chip.activo { background: var(--blue-soft); border-color: var(--blue); color: var(--white); }
.tb-chip:focus-visible, .tb-cifra:focus-visible, .tb-testigo:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }

.tb-cifras { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tb-cifra { display: grid; gap: 6px; align-content: start; min-width: 0; min-height: 112px; padding: 14px 16px; text-align: left;
    border-radius: var(--radius-m); border: 1px solid var(--trace-soft); background: linear-gradient(160deg, var(--panel-2), var(--panel)); color: var(--white); transition: border-color .2s; }
.tb-cifra:hover { border-color: var(--trace); }
.tb-cifra.activa { border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue) inset, 0 10px 30px -18px var(--blue); }
.tb-cifra-top { display: flex; align-items: center; gap: 8px; color: var(--mist); font-size: .84rem; font-weight: 600; }
.tb-cifra-top i { color: var(--blue); }
.tb-cifra strong { font: 800 clamp(1.6rem, 4.6vw, 2.2rem)/1 var(--display); letter-spacing: -.01em; }
.tb-cifra-pie { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-width: 0; }
.tb-cifra-pie small { color: var(--mist); font-size: .76rem; line-height: 1.3; }
.tb-chispa { width: 56%; max-width: 110px; height: 26px; color: var(--blue); flex: 0 1 auto; }
.tb-delta { display: inline-flex; align-items: center; gap: 4px; font-size: .78rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tb-delta.sube { color: var(--ok); background: rgba(58, 210, 159, .12); }
.tb-delta.baja { color: var(--danger); background: rgba(255, 107, 125, .12); }
.tb-delta.neutro { color: var(--mist); background: rgba(157, 176, 214, .1); }
.tb-cargando .tb-chip { width: 64px; height: 36px; }
.tb-cargando .tb-cifra, .tb-hueco { background: linear-gradient(90deg, var(--panel) 0%, var(--panel-2) 50%, var(--panel) 100%); background-size: 200% 100%; animation: tb-brillo 1.4s ease-in-out infinite; }
.tb-hueco { min-height: 260px; }
@keyframes tb-brillo { from { background-position: 100% 0; } to { background-position: -100% 0; } }
@media (prefers-reduced-motion: reduce) { .tb-cargando .tb-cifra, .tb-hueco { animation: none; } }

.tb-estimado { display: flex; gap: 10px; align-items: flex-start; margin: 0; padding: 12px 14px; border-radius: var(--radius-s); background: var(--blue-soft); color: var(--white); font-size: .9rem; line-height: 1.45; }
.tb-estimado i { color: var(--blue); margin-top: 3px; }

.tb-panel { min-width: 0; padding: 18px; border-radius: var(--radius-l); border: 1px solid var(--trace-soft); background: var(--panel); }
.tb-panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.tb-panel-head h2 { display: flex; align-items: center; gap: 10px; margin: 0; font: 800 1.12rem var(--display); }
.tb-panel-head p { margin: 4px 0 0; color: var(--mist); font-size: .86rem; }
.tb-panel-head > div { min-width: 0; }
.tb-panel-head .btn { flex: 0 0 auto; }

.tb-duo { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: stretch; }
.tb-plot { position: relative; color: var(--blue); touch-action: pan-y; padding-top: 16px; }
.tb-plot svg { display: block; width: 100%; height: 210px; overflow: visible; }
.tb-guia { stroke: var(--trace-soft); stroke-width: 1; vector-effect: non-scaling-stroke; }
.tb-cursor { stroke: var(--mist-2); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.tb-max { position: absolute; top: 0; left: 0; color: var(--mist-2); font-size: .74rem; }
.tb-punto { position: absolute; width: 12px; height: 12px; margin: 10px 0 0 -6px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 2px var(--panel); pointer-events: none; }
.tb-globo { position: absolute; top: 20px; transform: translateX(-50%); z-index: 2; display: grid; gap: 3px; min-width: 170px; padding: 10px 12px; border-radius: var(--radius-s);
    border: 1px solid var(--trace); background: var(--ink-2); color: var(--white); font-size: .8rem; pointer-events: none; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .6); }
.tb-globo strong { font-size: .84rem; margin-bottom: 2px; }
.tb-globo strong::first-letter { text-transform: uppercase; }
.tb-globo span { display: flex; justify-content: space-between; gap: 14px; color: var(--mist); }
.tb-globo span.activa { color: var(--white); }
.tb-globo b { font-variant-numeric: tabular-nums; }
.tb-globo small { color: var(--mist-2); }
.tb-ejes { display: flex; justify-content: space-between; margin-top: 6px; color: var(--mist-2); font-size: .72rem; }
.tb-ejes span { flex: 1 1 0; text-align: center; white-space: nowrap; }
.tb-ejes span:first-child { text-align: left; }
.tb-ejes span:last-child { text-align: right; }
.tb-vacio { position: absolute; inset: 42% 0 auto; margin: 0; text-align: center; color: var(--mist); font-size: .9rem; }

.tb-nix { display: flex; flex-direction: column; background: linear-gradient(165deg, rgba(122, 92, 255, .14), rgba(46, 139, 255, .06) 55%, var(--panel)); border-color: rgba(122, 92, 255, .35); }
.tb-nix-ico { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 10px; background: linear-gradient(135deg, #2f7bff, #7a5cff); color: #fff; font-size: .85rem; }
.tb-lectura { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 12px; }
.tb-lectura li { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 10px; align-items: start; }
.tb-lectura li > i { margin-top: 3px; text-align: center; }
.tb-lectura li.bien > i { color: var(--ok); }
.tb-lectura li.ojo > i { color: var(--warn); }
.tb-lectura li.idea > i { color: #a48bff; }
.tb-lectura p { margin: 0; font-size: .9rem; line-height: 1.45; }
.tb-lectura a { display: inline-flex; gap: 6px; align-items: center; margin-top: 4px; font-size: .82rem; font-weight: 700; color: var(--blue); text-decoration: none; }
.tb-nix-cta { margin-top: auto; align-self: flex-start; }

.tb-carrusel { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; scrollbar-width: thin; overscroll-behavior-x: contain; }
.tb-carrusel > * { scroll-snap-align: start; min-width: 0; }
.tb-creador { position: relative; display: grid; justify-items: center; gap: 4px; padding: 16px 12px; border-radius: var(--radius-m); border: 1px solid var(--trace-soft); background: var(--panel-2); color: var(--white); text-decoration: none; text-align: center; }
.tb-creador:hover { border-color: var(--blue); }
.tb-avatar { display: grid; place-items: center; width: 76px; height: 76px; border-radius: 50%; overflow: hidden; background: var(--blue-soft); color: var(--blue); font-size: 1.6rem; margin-bottom: 6px; box-shadow: 0 0 0 3px var(--panel), 0 0 0 5px rgba(46, 139, 255, .45); }
.tb-avatar img { width: 100%; height: 100%; object-fit: cover; }
.tb-creador strong { font: 700 .98rem var(--display); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-creador small { color: var(--mist); font-size: .78rem; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-creador dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; width: 100%; margin: 10px 0 0; }
.tb-creador dl div { padding: 6px 2px; border-radius: var(--radius-s); background: var(--ink-2); }
.tb-creador dt { color: var(--mist-2); font-size: .66rem; }
.tb-creador dd { margin: 0; font-weight: 800; font-size: .9rem; }

.tb-testigos { grid-auto-columns: minmax(170px, 220px); }
.tb-testigo { position: relative; display: block; padding: 0; overflow: hidden; aspect-ratio: 4 / 5; border-radius: var(--radius-m); border: 1px solid var(--trace-soft); background: var(--ink-2); cursor: zoom-in; color: var(--white); text-align: left; }
.tb-testigo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tb-testigo span { position: absolute; inset: auto 0 0; display: grid; gap: 2px; padding: 24px 10px 10px; background: linear-gradient(transparent, rgba(3, 6, 15, .9)); }
.tb-testigo strong { font-size: .85rem; }
.tb-testigo small { color: var(--mist); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tb-testigo em { position: absolute; top: 8px; right: 8px; padding: 2px 8px; border-radius: 999px; background: rgba(3, 6, 15, .75); font-style: normal; font-size: .74rem; font-weight: 700; }
.tb-testigo-full { margin: 0; display: grid; gap: 12px; justify-items: center; }
.tb-testigo-full img { max-width: 100%; max-height: 72vh; border-radius: var(--radius-m); }

.tb-campanas { grid-auto-columns: minmax(250px, 1fr); }
.tb-campana { display: grid; gap: 10px; align-content: start; padding: 16px; border-radius: var(--radius-m); border: 1px solid var(--trace-soft); background: var(--panel-2); }
.tb-campana-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.tb-campana-top small { color: var(--mist); font-size: .76rem; }
.tb-campana-top small.pronto { color: var(--warn); font-weight: 700; }
.tb-campana h3 { margin: 0; font: 700 1rem var(--display); }
.tb-campana-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0; color: var(--mist); font-size: .8rem; }
.tb-campana-meta b { color: var(--white); }
.tb-barra { height: 8px; border-radius: 999px; background: var(--ink-2); overflow: hidden; }
.tb-barra span { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #2f7bff, #7a5cff); }

.tb-svc-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-bottom: 12px; }
.tb-svc-kpis div { padding: 10px 12px; border-radius: var(--radius-s); background: var(--panel-2); min-width: 0; }
.tb-svc-kpis span { display: block; color: var(--mist); font-size: .76rem; }
.tb-svc-kpis strong { font: 800 1.15rem var(--display); overflow-wrap: anywhere; }
.tb-svc { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.tb-svc li { display: grid; grid-template-columns: minmax(0, 1fr) minmax(80px, 30%); gap: 12px; align-items: center; }
.tb-svc strong { display: block; font-size: .9rem; }
.tb-svc small { color: var(--mist); font-size: .76rem; }
.pe-subtitulo { margin: 4px 0 12px; font: 800 1.12rem var(--display); }

@media (max-width: 900px) {
    .tb-duo { grid-template-columns: minmax(0, 1fr); }
    .tb-cifras { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .tb-svc-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .tb { gap: 12px; }
    .tb-panel { padding: 14px; border-radius: var(--radius-m); }
    .tb-panel-head { gap: 8px; }
    .tb-panel-head h2 { font-size: 1.02rem; }
    .tb-panel-head .btn { padding-inline: 12px; }
    .tb-cifras { gap: 8px; }
    .tb-cifra { min-height: 104px; padding: 12px; }
    .tb-chispa { width: 46%; }
    .tb-plot svg { height: 170px; }
    .tb-carrusel { grid-auto-columns: 72%; }
    .tb-testigos { grid-auto-columns: 58%; }
    .tb-campanas { grid-auto-columns: 86%; }
}
