/* Central de estatísticas (#/stats/<id>). Usa só os tokens do tema (claro/escuro) e bordas finas de 1px. */
.st-wrap { max-width: 1180px; }
.st-head { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.st-hid { flex: 1 1 260px; min-width: 0; }
.st-title { margin: 0; font: 700 22px/1.2 var(--redes-font-display, system-ui, sans-serif); overflow-wrap: anywhere; }
.st-sub { margin: 4px 0 0; font-size: 13px; color: var(--redes-muted); overflow-wrap: anywhere; }
.st-act { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.st-sel { width: auto; min-width: 150px; min-height: 36px; }
.st-range { display:flex; align-items:end; gap:10px; flex-wrap:wrap; margin:0 0 14px; }
.st-range label { display:grid; gap:4px; font-size:12px; color:var(--redes-muted); }
.st-datetime { width:auto; min-width:200px; min-height:38px; }
.st-range-error { color:var(--redes-danger, #d4493a); margin:0; flex-basis:100%; }
.st-activity { display:grid; gap:8px; max-height:600px; overflow:auto; }
.st-visit { border:1px solid var(--redes-line); border-radius:10px; padding:10px 12px; }
.st-visit b,.st-visit small { display:block; overflow-wrap:anywhere; }
.st-visit small { color:var(--redes-muted); margin-top:4px; }
.st-visit ul { margin:8px 0 0; padding-left:20px; font-size:13px; }
.st-info { display: grid; gap: 8px; }
.st-callout { margin: 0 0 12px; padding: 10px 14px; border: 1px solid var(--redes-line); border-left: 3px solid var(--redes-primary); border-radius: 10px; background: var(--redes-surface); font-size: 13.5px; line-height: 1.45; }

.st-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.st-kpi { display: flex; flex-direction: column; gap: 3px; padding: 14px; border: 1px solid var(--redes-line); border-radius: 12px; background: var(--redes-surface); min-width: 0; }
.st-kl { font-size: 12px; font-weight: 600; color: var(--redes-muted); }
.st-kpi b { font: 700 28px/1.1 var(--redes-font-display, system-ui, sans-serif); overflow-wrap: anywhere; }
.st-kf { font-size: 12px; color: var(--redes-muted); line-height: 1.35; }
.st-d { font-size: 11.5px; font-weight: 600; color: var(--redes-muted); margin-top: 2px; }
.st-d.up { color: #2fa77a; } .st-d.down { color: #d4493a; }

.st-sec { border: 1px solid var(--redes-line); border-radius: 14px; background: var(--redes-surface); padding: 16px; margin-bottom: 14px; min-width: 0; }
.st-sh h2 { margin: 0; font: 700 16px/1.3 var(--redes-font-display, system-ui, sans-serif); }
.st-sh p { margin: 3px 0 0; font-size: 12.5px; color: var(--redes-muted); }
.st-sh { margin-bottom: 12px; }
.st-none { margin: 0; padding: 14px; border: 1px dashed var(--redes-line); border-radius: 10px; font-size: 13px; color: var(--redes-muted); line-height: 1.5; }
.st-note { margin: 10px 0 0; font-size: 12.5px; color: var(--redes-muted); line-height: 1.45; }
.st-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 14px; align-items: start; }
.st-cols .st-sec { margin-bottom: 0; }

/* gráfico por dia */
.st-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--redes-muted); margin-bottom: 8px; }
.st-legend .lg:before { content: ''; display: inline-block; width: 10px; height: 10px; border-radius: 2px; margin-right: 6px; vertical-align: -1px; }
.st-legend .lg.v:before { background: var(--redes-primary); } .st-legend .lg.c:before { background: var(--redes-accent-gold, #e6b772); }
.st-max { margin-left: auto; }
.st-days { display: flex; align-items: flex-end; gap: 2px; height: 160px; padding-bottom: 1px; border-bottom: 1px solid var(--redes-line); }
.st-dc { flex: 1 1 0; min-width: 0; height: 100%; display: flex; align-items: flex-end; gap: 1px; }
.st-dc i { flex: 1 1 0; border-radius: 2px 2px 0 0; min-width: 1px; }
.st-dc i.v { background: var(--redes-primary); } .st-dc i.c { background: var(--redes-accent-gold, #e6b772); }
.st-dc:hover { background: rgba(127, 127, 127, .12); }
.st-axis { display: flex; justify-content: space-between; font-size: 11.5px; color: var(--redes-muted); margin-top: 4px; }

/* funil */
.st-fun { display: grid; gap: 8px; }
.st-fs { position: relative; min-height: 46px; border: 1px solid var(--redes-line); border-radius: 10px; overflow: hidden; }
.st-fbar { position: absolute; inset: 0 auto 0 0; background: var(--redes-primary); opacity: .22; }
.st-fs.c .st-fbar { background: var(--redes-accent-gold, #e6b772); opacity: .3; } .st-fs.l .st-fbar { background: #2fa77a; opacity: .3; }
.st-ft { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 12px 14px; font-size: 13.5px; }
.st-ft b { font-size: 13.5px; }

/* linhas com barra */
.st-br { display: grid; grid-template-columns: minmax(110px, 190px) 1fr auto; align-items: center; gap: 10px; padding: 5px 0; }
.st-bl { min-width: 0; font-size: 13px; overflow-wrap: anywhere; } .st-bl small { display: block; font-size: 11.5px; color: var(--redes-muted); }
.st-bt { height: 8px; border-radius: 4px; background: rgba(127, 127, 127, .2); overflow: hidden; }
.st-bt i { display: block; height: 100%; border-radius: 4px; background: var(--redes-primary); }
.st-br.good .st-bt i { background: #2fa77a; }
.st-bn { font-size: 12.5px; font-weight: 600; white-space: nowrap; text-align: right; }

/* tabelas */
.st-tb { display: grid; }
.st-th, .st-tr { display: grid; grid-template-columns: minmax(160px, 2.4fr) repeat(4, minmax(70px, 1fr)); gap: 10px; align-items: center; padding: 10px 4px; border-bottom: 1px solid var(--redes-line); }
.st-th.pg, .st-tr.pg { grid-template-columns: minmax(160px, 2.4fr) repeat(5, minmax(64px, 1fr)); }
.st-th { font-size: 11.5px; font-weight: 700; color: var(--redes-muted); text-transform: uppercase; letter-spacing: .03em; padding-top: 0; }
.st-tr:last-child { border-bottom: 0; }
.st-tc { font-size: 13.5px; min-width: 0; font-variant-numeric: tabular-nums; }
.st-tc.main { display: grid; gap: 3px; font-weight: 600; overflow-wrap: anywhere; } .st-tc.main small { font-weight: 400; font-size: 11.5px; color: var(--redes-muted); }
.st-tc.main .st-bt { height: 5px; max-width: 260px; }

/* vídeos */
.st-vids { display: grid; gap: 14px; }
.st-vid { border: 1px solid var(--redes-line); border-radius: 12px; padding: 14px; background: var(--redes-bg); }
.st-vid h3 { margin: 0; font: 700 15px/1.3 var(--redes-font-display, system-ui, sans-serif); }
.st-vid h4 { margin: 0 0 6px; font-size: 12px; font-weight: 700; color: var(--redes-muted); text-transform: uppercase; letter-spacing: .03em; }
.st-vm { display: block; margin: 3px 0 12px; font-size: 12.5px; color: var(--redes-muted); }
.st-vg { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.st-stack { display: flex; height: 18px; border-radius: 9px; overflow: hidden; background: rgba(127, 127, 127, .2); margin: 8px 0 10px; }
.st-stack i { display: block; min-width: 3px; }
.st-sl { display: grid; gap: 5px; font-size: 12.5px; }
.st-sl span { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; } .st-sl i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.st-chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }
.st-chip { display: flex; flex-direction: column; gap: 1px; padding: 8px 12px; border: 1px solid var(--redes-line); border-radius: 10px; background: var(--redes-surface); min-width: 92px; }
.st-chip b { font: 700 18px/1.2 var(--redes-font-display, system-ui, sans-serif); } .st-chip span { font-size: 11.5px; color: var(--redes-muted); }

/* horas */
.st-hours { display: flex; align-items: flex-end; gap: 2px; height: 110px; border-bottom: 1px solid var(--redes-line); padding-bottom: 1px; }
.st-hc { flex: 1 1 0; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; position: relative; min-width: 0; }
.st-hc i { width: 100%; background: var(--redes-primary); border-radius: 2px 2px 0 0; opacity: .85; }
.st-hc span { position: absolute; top: 100%; margin-top: 3px; font-size: 10.5px; color: var(--redes-muted); }
.st-hours + .st-note { margin-top: 20px; }

@media (max-width: 720px) {
  .st-th { display: none; }
  .st-tr, .st-tr.pg { grid-template-columns: 1fr 1fr; gap: 6px 10px; }
  .st-tr .st-tc.main { grid-column: 1 / -1; }
  .st-tr .st-tc[data-l]:before { content: attr(data-l); display: block; font-size: 11px; color: var(--redes-muted); }
  .st-br { grid-template-columns: 1fr auto; } .st-br .st-bt { grid-column: 1 / -1; grid-row: 2; }
  .st-act { width: 100%; } .st-sel { flex: 1; }
}

/* janela de zerar */
.st-chk { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; padding: 10px 12px; border: 1px solid var(--redes-line); border-radius: 10px; cursor: pointer; font-size: 13.5px; line-height: 1.4; }
.st-chk input { width: 18px; height: 18px; margin-top: 2px; flex: none; accent-color: var(--redes-primary); }
.st-chk small { display: block; margin-top: 3px; font-size: 12px; color: var(--redes-muted); }
