/* =========================================================================
 *  Panel de métricas · ABMedia
 *  Misma estética que Sequence Builder: fondo oscuro, metal cálido y el
 *  naranja sólo como acento.
 * ========================================================================= */
:root {
  --bg: #0A0A0A;
  --bg-2: #101010;
  --panel: #161513;
  --panel-2: #1A1917;
  --border: rgba(255,255,255,.10);
  --text: #FFFFFF;
  --muted: #ADAAA5;
  --faint: #7C7873;
  --metal-1: #C9C3BC;
  --metal-2: #EFECE8;
  --acento: #FF5208;
  --acento-lit: #FF8A3D;
  --acento-soft: rgba(255,82,8,.14);
  --ok: #6ee79a;
  --ko: #ff8f92;
  --metal: conic-gradient(from 0deg,
    #4a4a4a, #d8d3cd 8%, #7a7168 16%, #EFECE8 26%, #C9C3BC 32%,
    #8a8078 40%, #efece8 50%, #6d655d 58%, #EFECE8 70%, #b9b2aa 80%,
    #3f3f3f 90%, #4a4a4a);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: 'Figtree', system-ui, sans-serif;
  letter-spacing: -.011em;
  background: var(--bg); color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.hidden { display: none !important; }

h1, h2 {
  font-weight: 600; letter-spacing: -.042em; line-height: 1.05;
  background: linear-gradient(to bottom right, #FFFFFF 30%, rgba(255,255,255,.4));
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent; color: transparent;
}

/* ------------------------------ Estructura ---------------------------- */
.app { display: grid; grid-template-columns: 240px minmax(0, 1fr); min-height: 100vh; }
.sidebar {
  background: linear-gradient(180deg, var(--bg-2), var(--bg));
  border-right: 1px solid var(--border);
  padding: 24px 18px; display: flex; flex-direction: column; gap: 18px;
  position: sticky; top: 0; height: 100vh;
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand .logo { width: 32px; height: 32px; flex-shrink: 0; }
.brand .logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.brand-text strong { display: block; font-size: 14.5px; font-weight: 700; letter-spacing: -.02em; }
.brand-text small { color: var(--faint); font-size: 10.5px; }

.nav { display: flex; flex-direction: column; gap: 4px; }
.nav-item {
  display: flex; align-items: center; gap: 10px;
  font-size: 14px; color: var(--muted);
  padding: 10px 12px; border: 1px solid transparent; border-radius: 11px;
  cursor: pointer; transition: .15s;
}
.nav-item:hover { background: var(--panel); color: var(--text); }
.nav-item.active {
  color: var(--text); font-weight: 600; border-color: transparent;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.055), rgba(255,255,255,.015)),
    linear-gradient(180deg, #1A1917, #131211),
    conic-gradient(from 200deg,
      rgba(255,255,255,.10), rgba(255,255,255,.34) 12%,
      rgba(255,138,61,.55) 26%, rgba(255,82,8,.70) 34%,
      rgba(255,138,61,.45) 44%, rgba(255,255,255,.30) 60%,
      rgba(255,255,255,.10) 78%, rgba(255,255,255,.10));
  background-origin: border-box;
  background-clip: padding-box, padding-box, border-box;
}
.nav-item .ni { width: 19px; height: 19px; fill: var(--muted); flex-shrink: 0; transition: .15s; }
.nav-item.active .ni { fill: var(--acento); }
.sidebar-foot { margin-top: auto; display: flex; gap: 8px; }
.foot-btn {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; cursor: pointer; color: var(--muted);
  background: var(--panel-2); border: 1px solid var(--border); transition: .15s;
}
.foot-btn svg { width: 17px; height: 17px; }
.foot-btn:hover { color: var(--text); border-color: rgba(255,255,255,.28); }

.content { padding: 28px 32px 56px; min-width: 0; position: relative; }
.content::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 380px;
  pointer-events: none; z-index: 0;
  background-image:
    linear-gradient(to right, rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(ellipse 75% 80% at 30% 0%, #000 15%, transparent 75%);
  mask-image: radial-gradient(ellipse 75% 80% at 30% 0%, #000 15%, transparent 75%);
}
.content > * { position: relative; z-index: 1; }

.topbar { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 18px; }
.topbar h1 { font-size: clamp(24px, 2.6vw, 31px); }
.topbar p { color: var(--muted); font-size: 14px; margin-top: 7px; }
.topbar-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* ------------------------------ Controles ----------------------------- */
.segmentos {
  display: inline-flex; gap: 4px; padding: 4px;
  background: var(--panel); border: 1px solid var(--border); border-radius: 999px;
}
.segmentos .seg {
  font-family: inherit; font-size: 13px; font-weight: 600; color: var(--muted);
  background: transparent; border: none; border-radius: 999px;
  padding: 7px 14px; cursor: pointer; transition: .15s; white-space: nowrap;
}
.segmentos .seg:hover { color: var(--text); }
.segmentos .seg.active {
  color: var(--text);
  background: linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.03));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18);
}
.segmentos.pequeno .seg { font-size: 12px; padding: 6px 12px; }

.selector { display: inline-flex; gap: 6px; }
.cuenta-chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px 7px 8px; border-radius: 999px; cursor: pointer;
  background: var(--panel); border: 1px solid var(--border);
  font-size: 13px; font-weight: 600; color: var(--muted);
  font-family: inherit; transition: .15s;
}
.cuenta-chip .ico { width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; flex-shrink: 0; }
.cuenta-chip .ico svg { width: 13px; height: 13px; }
.cuenta-chip:hover { color: var(--text); border-color: rgba(255,255,255,.26); }
.cuenta-chip.active { color: var(--text); border-color: transparent;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.07), rgba(255,255,255,.02)),
    linear-gradient(180deg, #1D1C1A, #141312), var(--metal);
  background-origin: border-box; background-clip: padding-box, padding-box, border-box; }

.buscador {
  font-family: inherit; font-size: 13.5px; color: var(--text);
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 999px; padding: 9px 16px; min-width: 220px;
}
.buscador:focus { outline: none; border-color: rgba(255,255,255,.28); }

.aviso-demo {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 12.5px; color: var(--muted);
  background: var(--acento-soft); border: 1px solid rgba(255,82,8,.28);
  padding: 8px 15px; border-radius: 999px; margin-bottom: 22px;
}
.aviso-demo .punto { width: 7px; height: 7px; border-radius: 999px; background: var(--acento); flex-shrink: 0; }

/* ------------------------------- Tarjetas ----------------------------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 14px; margin-bottom: 18px; }
.kpi {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 18px 20px 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.kpi .etiqueta { font-size: 12px; color: var(--faint); font-weight: 600; letter-spacing: .02em; }
.kpi .valor { font-size: 28px; font-weight: 700; letter-spacing: -.04em; line-height: 1.1; }
.kpi .pie { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.delta { display: inline-flex; align-items: center; gap: 3px; font-weight: 700; }
.delta.sube { color: var(--ok); }
.delta.baja { color: var(--ko); }
.delta svg { width: 11px; height: 11px; fill: currentColor; }

.panel {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; padding: 20px 22px 18px; margin-bottom: 16px;
}
.panel-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.panel-head h2 { font-size: 17px; }
.panel-head p { font-size: 12.5px; color: var(--faint); margin-top: 5px; }
.dos-columnas { display: grid; grid-template-columns: repeat(auto-fit, minmax(340px, 1fr)); gap: 16px; }
.dos-columnas .panel { margin-bottom: 0; }

/* ------------------------------- Gráficos ----------------------------- */
.gr { width: 100%; display: block; overflow: visible; }
.gr .barra { transition: .15s; }
.gr g:hover .barra { filter: brightness(1.22); }
.gr .rejilla { stroke: rgba(255,255,255,.07); stroke-width: 1; }
.gr .eje { fill: var(--faint); font-size: 11px; font-family: inherit; font-weight: 500; }
.gr .linea { fill: none; stroke: var(--metal-2); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }

.gr .punto { fill: var(--acento); stroke: #0A0A0A; stroke-width: 2; opacity: 0; transition: .15s; }
.gr .col:hover .punto { opacity: 1; }
.gr .col:hover .franja { fill: rgba(255,255,255,.04); }
.gr .franja { fill: transparent; }

.pista {
  position: fixed; pointer-events: none; z-index: 60;
  background: #1C1B19; border: 1px solid rgba(255,255,255,.16);
  border-radius: 10px; padding: 9px 13px; font-size: 12.5px;
  box-shadow: 0 14px 34px rgba(0,0,0,.6); white-space: nowrap;
  opacity: 0; transition: opacity .12s;
}
.pista.visible { opacity: 1; }
.pista b { display: block; font-size: 14px; margin-bottom: 2px; }
.pista span { color: var(--faint); }

/* ------------------------------ Listas -------------------------------- */
.lista-top { display: flex; flex-direction: column; gap: 8px; }
.item-top {
  display: grid; grid-template-columns: 62px 1fr auto; gap: 13px;
  align-items: center; padding: 9px; border-radius: 12px; transition: .15s;
}
.item-top:hover { background: rgba(255,255,255,.04); }
.item-top .mini {
  width: 62px; height: 40px; border-radius: 8px; object-fit: cover;
  background: linear-gradient(135deg, #2a2724, #171614);
  border: 1px solid var(--border); display: block;
}
.item-top .txt { min-width: 0; }
.item-top .tit {
  font-size: 13.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.item-top .meta { font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.item-top .cifra { font-size: 15px; font-weight: 700; letter-spacing: -.02em; text-align: right; white-space: nowrap; }
.item-top .cifra small { display: block; font-size: 10.5px; color: var(--faint); font-weight: 500; letter-spacing: 0; }

/* ------------------------------- Tabla -------------------------------- */
.tabla-wrap { overflow-x: auto; }
.tabla { width: 100%; border-collapse: collapse; min-width: 680px; }
.tabla th {
  text-align: left; font-size: 11px; font-weight: 700; color: var(--faint);
  text-transform: uppercase; letter-spacing: .1em;
  padding: 0 12px 11px; cursor: pointer; white-space: nowrap; user-select: none;
}
.tabla th:hover { color: var(--muted); }
.tabla th .flecha { opacity: 0; margin-left: 4px; }
.tabla th.orden .flecha { opacity: 1; }
.tabla td { padding: 11px 12px; border-top: 1px solid var(--border); font-size: 13.5px; vertical-align: middle; }
.tabla tbody tr:hover { background: rgba(255,255,255,.03); }
.tabla .col-num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tabla .celda-tit { display: flex; align-items: center; gap: 11px; min-width: 0; }
.tabla .celda-tit img { width: 54px; height: 34px; border-radius: 6px; object-fit: cover; flex-shrink: 0; background: #201E1B; border: 1px solid var(--border); }
.tabla .celda-tit span {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.35;
}
.etiqueta-tipo {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  padding: 3px 8px; border-radius: 999px; color: var(--muted);
  background: rgba(255,255,255,.06); border: 1px solid var(--border); white-space: nowrap;
}

/* ------------------------------ Cuentas ------------------------------- */
.cuentas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cuenta-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 18px; padding: 20px; display: flex; flex-direction: column; gap: 14px;
}
.cuenta-card .cab { display: flex; align-items: center; gap: 12px; }
.cuenta-card .ico-grande {
  width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0;
}
.cuenta-card .ico-grande svg { width: 22px; height: 22px; }
.cuenta-card .nom { font-size: 15px; font-weight: 600; }
.cuenta-card .han { font-size: 12.5px; color: var(--faint); }
.cuenta-card .cifras { display: flex; gap: 22px; }
.cuenta-card .cifras div span { display: block; font-size: 11px; color: var(--faint); }
.cuenta-card .cifras div strong { font-size: 17px; font-weight: 700; letter-spacing: -.02em; }
.estado-con { display: inline-flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.estado-con .pt { width: 7px; height: 7px; border-radius: 999px; }
.estado-con .pt.si { background: var(--ok); box-shadow: 0 0 8px rgba(110,231,154,.5); }
.estado-con .pt.no { background: var(--faint); }
.btn {
  font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--text);
  border: 1px solid var(--border); background: var(--panel-2);
  border-radius: 11px; padding: 11px 16px; cursor: pointer; transition: .15s;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn:hover { border-color: rgba(255,255,255,.28); }
.btn.principal {
  border-color: transparent;
  background-image:
    linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.02)),
    linear-gradient(180deg, #1D1C1A, #141312), var(--metal);
  background-origin: border-box; background-clip: padding-box, padding-box, border-box;
}
.ico-yt { background: rgba(255,0,0,.14); color: #ff5b5b; }
.ico-ig { background: rgba(214,36,159,.14); color: #ff6ac1; }

.vacio { color: var(--faint); font-size: 13px; text-align: center; padding: 26px 0; }

/* ------------------------------ Responsive ---------------------------- */
@media (max-width: 1000px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: static; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 12px; padding: 14px 16px; }
  .sidebar .brand { flex: 1; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .sidebar-foot { margin-top: 0; }
  .content { padding: 20px 16px 44px; }
}
@media (max-width: 640px) {
  .topbar-tools { width: 100%; }
  .kpis { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
  .kpi .valor { font-size: 23px; }
  .panel { padding: 16px 15px 14px; border-radius: 15px; }
  .dos-columnas { grid-template-columns: 1fr; }
}

/* --------------------- Insights Report · añadidos ---------------------- */
.head-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

.item-top { text-decoration: none; color: inherit; }
.item-top .mini.sinfoto { display: grid; place-items: center; color: var(--faint); }
.item-top .mini.sinfoto svg { width: 17px; height: 17px; }

.cabecera-canal {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 16px; padding: 16px 20px; margin-bottom: 16px;
}
.cabecera-canal .cc-txt { flex: 1; min-width: 0; }
.cabecera-canal .cc-nom { font-size: 15.5px; font-weight: 600; }
.cabecera-canal .cc-han { font-size: 12.5px; color: var(--faint); margin-top: 2px; }
.ico-grande { width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.ico-grande svg { width: 22px; height: 22px; }

/* Destacados */
.fila-out {
  display: grid; grid-template-columns: 74px 1fr auto auto; gap: 14px;
  align-items: center; padding: 10px; border-radius: 12px;
  text-decoration: none; color: inherit; transition: .15s;
}
.fila-out:hover { background: rgba(255,255,255,.04); }
.fila-out .mini { width: 74px; height: 44px; border-radius: 8px; object-fit: cover;
  border: 1px solid var(--border); background: #201E1B; display: block; }
.fila-out .mini.sinfoto { display: grid; place-items: center; color: var(--faint); }
.fila-out .txt { min-width: 0; }
.fila-out .tit { font-size: 13.5px; font-weight: 600; line-height: 1.35;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.fila-out .meta { font-size: 11.5px; color: var(--faint); margin-top: 3px; }
.fila-out .factor { text-align: right; font-size: 15px; font-weight: 700; letter-spacing: -.02em; white-space: nowrap; }
.fila-out .factor.alto { color: var(--ok); }
.fila-out .factor.bajo { color: var(--ko); }
.fila-out .factor small { display: block; font-size: 10px; color: var(--faint); font-weight: 500; letter-spacing: 0; }
.fila-out .cifra { text-align: right; font-size: 14px; font-weight: 600; white-space: nowrap; }
.fila-out .cifra small { display: block; font-size: 10px; color: var(--faint); font-weight: 500; }

.lecturas { list-style: none; display: flex; flex-direction: column; gap: 11px; }
.lecturas li { font-size: 13.5px; color: var(--muted); line-height: 1.5;
  padding-left: 15px; position: relative; }
.lecturas li::before { content: ""; position: absolute; left: 0; top: 8px;
  width: 5px; height: 5px; border-radius: 999px; background: var(--acento); }
.lecturas b { color: var(--text); font-weight: 600; }

/* Tabla con miniaturas */
.tabla .celda-tit a { color: inherit; text-decoration: none; }
.tabla .celda-tit a:hover { color: var(--metal-2); }
.mini-tabla { width: 54px; height: 34px; border-radius: 6px; flex-shrink: 0;
  background: #201E1B; border: 1px solid var(--border);
  display: grid; place-items: center; color: var(--faint); }
.mini-tabla svg { width: 15px; height: 15px; }
.ico-mini { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; }
.ico-mini svg { width: 14px; height: 14px; }

/* Miniaturas más grandes: son lo primero que se mira */
.item-top { grid-template-columns: 92px 1fr auto; }
.item-top .mini { width: 92px; height: 56px; }
.fila-out { grid-template-columns: 104px 1fr auto auto; }
.fila-out .mini { width: 104px; height: 62px; }
.tabla .celda-tit img, .mini-tabla { width: 74px; height: 44px; }
.aviso-demo b { color: var(--text); font-weight: 600; }


/* -------------------- Sección pendiente de conectar -------------------- */
.pendiente {
  display: flex; gap: 18px; align-items: flex-start;
  background: linear-gradient(180deg, rgba(255,255,255,.025), transparent);
  border: 1px dashed rgba(255,255,255,.16); border-radius: 14px; padding: 20px 22px;
}
.pendiente-ico {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: rgba(214,36,159,.14); color: #ff6ac1;
}
.pendiente-ico svg { width: 21px; height: 21px; }
.pendiente strong { font-size: 14.5px; font-weight: 600; display: block; margin-bottom: 6px; }
.pendiente p { font-size: 13px; color: var(--muted); line-height: 1.6; }
.pendiente .matiz { font-size: 12px; color: var(--faint); margin-top: 9px; }

/* El distintivo de plataforma dentro de la línea de datos */
.fila-out .meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.fila-out .meta .ico-mini { width: 18px; height: 18px; border-radius: 5px; }
.fila-out .meta .ico-mini svg { width: 11px; height: 11px; }

/* ======================= Gráficos nuevos ============================== */
.gr .franja:hover { fill: rgba(255,255,255,.045); }
.gr g:hover .franja { fill: rgba(255,255,255,.045); }
.gr .eje-tit { fill: var(--faint); font-size: 10.5px; font-family: inherit;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }

/* Dispersión */
.gr .bola { fill: rgba(255,82,8,.5); stroke: #FF8A3D; stroke-width: 1.2; transition: .15s; cursor: pointer; }
.gr .bola:hover { fill: var(--acento); r: 8; }

/* Anillo */
.anillo-wrap { display: flex; align-items: center; gap: 26px; flex-wrap: wrap; }
.anillo-wrap .gr { width: 176px; flex-shrink: 0; }
.gr .sector { transition: .15s; cursor: pointer; stroke: #131211; stroke-width: 2; }
.gr .sector:hover { filter: brightness(1.25); }
.anillo-num { fill: var(--text); font-size: 22px; font-weight: 700;
  font-family: inherit; letter-spacing: -.03em; }
.anillo-etq { fill: var(--faint); font-size: 10.5px; font-family: inherit;
  font-weight: 600; letter-spacing: .08em; text-transform: uppercase; }
.leyenda { list-style: none; flex: 1; min-width: 150px; display: flex;
  flex-direction: column; gap: 9px; }
.leyenda li { display: flex; align-items: center; gap: 9px; font-size: 13px; }
.leyenda .pt { width: 9px; height: 9px; border-radius: 3px; flex-shrink: 0; }
.leyenda .ln { color: var(--muted); flex: 1; min-width: 0; }
.leyenda .lv { font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }

/* Mapa de calor */
.mapa-calor { display: flex; flex-direction: column; gap: 5px; overflow-x: auto; }
.mc-fila { display: flex; align-items: center; gap: 5px; }
.mc-etq { width: 62px; flex-shrink: 0; font-size: 11.5px; color: var(--faint); font-weight: 600; }
.mc-celda { flex: 1; min-width: 16px; height: 26px; border-radius: 5px;
  border: 1px solid rgba(255,255,255,.05); transition: .12s; cursor: pointer; }
.mc-celda:hover { transform: scale(1.12); border-color: rgba(255,255,255,.3); }
.mc-col { flex: 1; min-width: 16px; text-align: center; font-size: 10.5px;
  color: var(--faint); font-weight: 600; }
.mc-cab { margin-bottom: 2px; }

/* Embudo */
.embudo { display: flex; flex-direction: column; gap: 15px; }
.emb-cab { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 6px; }
.emb-nom { font-size: 13px; font-weight: 600; color: var(--muted); }
.emb-val { font-size: 15px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.emb-barra { height: 12px; border-radius: 999px; background: rgba(255,255,255,.05);
  border: 1px solid var(--border); overflow: hidden; }
.emb-relleno { height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, #FF5208, #FF8A3D); min-width: 3px; }
.emb-pie { font-size: 11.5px; color: var(--faint); margin-top: 5px; }

/* Demostración de reels de prueba */
.prueba-demo { margin-top: 18px; }
.prueba-tit { font-size: 11.5px; color: var(--faint); font-weight: 600;
  letter-spacing: .06em; text-transform: uppercase; margin-bottom: 8px; }

/* Leyenda en horizontal, bajo un gráfico de líneas */
.leyenda-fila { flex-direction: row; flex-wrap: wrap; gap: 18px; margin-top: 10px; padding-left: 48px; }
.leyenda-fila li { font-size: 12.5px; }
.leyenda-fila .pt { border-radius: 999px; }
.leyenda-fila .ln { flex: none; }

/* El marcador de plataforma dentro de una miniatura vacía, a su tamaño */
.fila-out .mini.sinfoto svg { width: 20px; height: 20px; }

/* ------- La tabla de contenido necesita sitio para los títulos --------- */
.tabla { min-width: 1010px; }
.tabla th:first-child, .tabla td:first-child { width: 34%; min-width: 300px; }
.tabla .celda-tit a {
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; line-height: 1.35;
}

/* En paneles a media anchura, las filas destacadas van más justas */
.dos-columnas .fila-out { grid-template-columns: 78px minmax(0, 1fr) auto auto; gap: 11px; }
.dos-columnas .fila-out .mini { width: 78px; height: 48px; }
.dos-columnas .fila-out .meta { font-size: 11px; }

/* ============================== Acceso ================================= */
.login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-caja {
  width: 100%; max-width: 380px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: 20px; padding: 30px 28px 28px;
  display: flex; flex-direction: column; gap: 14px;
}
.login-caja .brand { margin-bottom: 6px; }
.login-caja h2 { font-size: 20px; letter-spacing: -.02em; }
.login-sub { font-size: 13.5px; color: var(--faint); margin-top: -8px; }
.campo { display: flex; flex-direction: column; gap: 6px; }
.campo span { font-size: 12px; color: var(--faint); font-weight: 600; }
.campo input {
  font-family: inherit; font-size: 14px; color: var(--text);
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 11px; padding: 12px 14px; width: 100%;
}
.campo input:focus { outline: none; border-color: rgba(255,255,255,.3); }
.login-err { font-size: 13px; color: var(--ko); min-height: 18px; }
.btn.full { width: 100%; }
.btn:disabled { opacity: .55; cursor: default; }

/* El botón de refrescar gira mientras trae datos */
@keyframes gira { to { transform: rotate(360deg); } }
.foot-btn.girando svg { animation: gira .9s linear infinite; }

/* Aclaración de qué dato publica cada plataforma y cuál no */
.nota-fuente { font-size: 11.5px; color: var(--faint); line-height: 1.5;
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--border); }

/* ------------- Comparativa "top 10% frente al resto" ------------------- */
.tabla.comparativa { min-width: 0; }
.tabla.comparativa th:first-child, .tabla.comparativa td:first-child {
  width: auto; min-width: 0; color: var(--muted); font-size: 13px;
}
.tabla.comparativa td.destacado { color: var(--acento); font-weight: 700; }
.tabla.comparativa th { cursor: default; }
.tabla.comparativa th:hover { color: var(--faint); }

.percentiles { margin-top: 20px; }
.pct-fila { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 12px; }
.pct {
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 12px; padding: 13px 14px;
  display: flex; flex-direction: column; gap: 3px;
}
.pct-num { font-size: 19px; font-weight: 700; letter-spacing: -.03em; }
.pct-etq { font-size: 11.5px; color: var(--faint); line-height: 1.4; }

/* ------------------------------ Cuentas -------------------------------- */
.av-canal {
  width: 46px; height: 46px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: #201E1B; border: 1px solid var(--border); display: block;
}
.av-caja { position: relative; overflow: hidden; display: block; }
.av-caja img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; border-radius: 50%;
}
.av-fondo { position: absolute; inset: 0; display: grid; place-items: center; color: var(--faint); }
.av-fondo svg { width: 45%; height: 45%; }
.cuenta-card .cab { align-items: center; }
.cuenta-card .cc-txt { min-width: 0; }
.cuenta-card .nom { font-size: 15px; font-weight: 600; line-height: 1.3; }
.cuenta-card .han {
  font-size: 12.5px; color: var(--faint); margin-top: 4px;
  display: flex; align-items: center; gap: 6px;
}
.cuenta-card .han .ico-mini { width: 18px; height: 18px; border-radius: 5px; }
.cuenta-card .han .ico-mini svg { width: 11px; height: 11px; }
.cuenta-card .acciones { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; }
.estado-con .pt.ko { background: var(--ko); }

.btn.pequeno { font-size: 12.5px; padding: 8px 13px; border-radius: 9px; }
.btn.peligro { color: var(--ko); border-color: rgba(255,120,120,.28); }
.btn.peligro:hover { border-color: var(--ko); }

.alta-canal { display: flex; gap: 10px; flex-wrap: wrap; }
.buscador.ancho { flex: 1; min-width: 240px; }
.hallado {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: var(--panel-2); border: 1px solid var(--border);
  border-radius: 14px; padding: 14px 16px; margin-top: 14px;
}
.hallado .cc-txt { flex: 1; min-width: 140px; }
.hallado .nom { font-size: 14.5px; font-weight: 600; }
.hallado .han { font-size: 12.5px; color: var(--faint); margin-top: 3px; }

/* La cabecera de canal con su foto */
.cabecera-canal .av-canal { width: 44px; height: 44px; }
