/* Página de Estatísticas (usa as variáveis e o topo de styles.css) */
.page-stats { --chart-fill: #3b82f6; }
.btn--link { display: inline-flex; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.st-head { padding: 28px 0 16px; }
.st-head h1 { margin: 0 0 4px; font-size: clamp(24px, 2.6vw, 32px); letter-spacing: -.02em; }
.st-head p { margin: 0; font-size: 13px; }

.st-kpis { display: grid; grid-template-columns: repeat(6, 1fr); margin: 0 0 22px; border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, var(--card-2), var(--card)); overflow: hidden; }
.st-kpis div { padding: 16px 18px; border-right: 1px solid var(--line); }
.st-kpis div:last-child { border-right: 0; }
.st-kpis dt { font-size: 24px; font-weight: 800; letter-spacing: -.02em; }
.st-kpis dd { margin: 2px 0 4px; color: var(--muted); font-size: 10.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; }
.st-kpis small { font-size: 12px; color: #aab3c7; }
.delta--up { color: #4ade80 !important; font-weight: 700; }
.delta--down { color: #f87171 !important; font-weight: 700; }

.st-week { border: 1px solid rgba(255, 138, 61, .35); border-radius: 18px; padding: 26px 24px 24px; background: linear-gradient(180deg, rgba(255, 138, 61, .05), transparent 40%), var(--bg-2); }
.st-week__head { position: relative; margin-bottom: 18px; }
.eyebrow { display: block; font-size: 12px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--orange); margin-bottom: 4px; }
.st-week h2 { margin: 0 0 6px; font-family: "Russo One", Inter, sans-serif; font-weight: 400; font-size: 26px; }
.st-week__head p { margin: 0; color: #c3c9d9; padding-right: 300px; }
.st-week__note { position: absolute; right: 0; bottom: 0; font-size: 12.5px; }
.grow { color: #4ade80; }
.st-cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.st-col { display: flex; flex-direction: column; border: 1px solid var(--line-2); border-radius: 14px; background: var(--card); padding: 16px 16px 14px; }
.st-col > header { display: flex; align-items: center; gap: 9px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.st-col h3 { margin: 0; font-size: 16px; }
.st-col__ico svg { width: 18px; height: 18px; display: block; }
.st-col__ico--new { color: var(--orange); }
.st-col__ico--cal { color: #60a5fa; }
.st-col__ico--up { color: #4ade80; }
.pill { margin-left: auto; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; white-space: nowrap; }
.pill--orange { color: var(--orange); background: rgba(255, 138, 61, .14); }
.pill--blue { color: #93c5fd; background: rgba(59, 130, 246, .16); }
.pill--green { color: #4ade80; background: rgba(74, 222, 128, .12); }
.st-list { list-style: none; margin: 0; padding: 0; flex: 1; }
.st-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.st-list li:last-child { border-bottom: 0; }
.st-list li > div { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.st-list a { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-list a:hover { text-decoration: underline; }
.st-list a.hl { color: var(--orange); }
.st-list .muted { font-size: 12.5px; }
.mini { flex: none; width: 64px; height: 34px; border-radius: 6px; display: grid; place-items: center; background: radial-gradient(circle at 70% 30%, var(--c), transparent 60%), linear-gradient(135deg, var(--a), var(--b)); border: 1px solid rgba(255, 255, 255, .1); }
.mini b { font-family: "Russo One", Inter, sans-serif; font-weight: 400; font-size: 13px; color: #fff; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.st-list--rank .n { flex: none; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 800; background: var(--bg-2); border: 1px solid var(--line-2); }
.st-list--rank .grow { font-weight: 800; font-size: 15px; }
.st-up__group { padding: 10px 0 4px; border-bottom: 1px solid var(--line); }
.st-up__group:last-child { border-bottom: 0; }
.st-up__lbl { display: block; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.st-up__lbl--hl { color: #34d399; }
.st-up__row { display: flex; justify-content: space-between; gap: 10px; padding: 4px 0 6px; font-size: 14px; }
.st-up__row .muted { font-size: 12.5px; white-space: nowrap; }
#st-up { flex: 1; }
.st-more { margin-top: 10px; padding-top: 12px; border-top: 1px solid var(--line); font-size: 13.5px; font-weight: 700; color: var(--orange); }
.st-more:hover { text-decoration: underline; }

.st-charts { display: grid; grid-template-columns: 1.3fr 1fr; gap: 14px; margin-top: 18px; }
.st-panel { border: 1px solid var(--line-2); border-radius: 14px; background: var(--card); padding: 16px 18px; }
.st-panel__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 12px; }
.st-panel__head h3 { margin: 0 0 2px; font-size: 16px; }
.st-panel__head .muted { font-size: 12.5px; }
.st-panel__total { font-size: 13px; color: var(--muted); white-space: nowrap; }
.st-panel__total b { color: var(--text); font-size: 16px; }
.chart__svg { width: 100%; height: auto; display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart .grid.base { stroke: var(--line-2); }
.chart .ax { fill: var(--muted); font-size: 10.5px; font-family: Inter, sans-serif; stroke: none; }
.chart .fill { fill: var(--chart-fill); stroke: none; }
.chart .partial { fill: url(#hatch); stroke: none; }
.chart .hit { fill: transparent; stroke: none; }
.chart .bar:hover .fill { fill: #60a5fa; }
.chart .bar:hover .hit { fill: rgba(255, 255, 255, .03); }
.hbars { display: grid; gap: 6px; }
.hbar { display: grid; grid-template-columns: 180px 1fr 64px; align-items: center; gap: 10px; padding: 3px 4px; border-radius: 6px; font-size: 13px; }
.hbar:hover { background: rgba(255, 255, 255, .03); }
.hbar__lbl { display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hbar__lbl svg { width: 15px; height: 15px; }
.hbar__lbl small { color: var(--muted); font-size: 11px; }
.hbar__track { height: 12px; border-radius: 0 4px 4px 0; background: var(--bg-2); }
.hbar__track i { display: block; height: 100%; min-width: 3px; border-radius: 0 4px 4px 0; background: var(--chart-fill); }
.hbar:hover .hbar__track i { background: #60a5fa; }
.hbar__val { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; }
.st-moves { margin-top: 14px; }
.st-table-wrap { overflow-x: auto; }
.st-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.st-table th { text-align: left; font-size: 11px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line-2); white-space: nowrap; }
.st-table td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.st-table tr:last-child td { border-bottom: 0; }
.st-table .num { text-align: right; font-variant-numeric: tabular-nums; }
.mv { font-weight: 800; }
.mv--up { color: #4ade80; }
.mv--down { color: #f87171; }
.tip { position: fixed; z-index: 50; pointer-events: none; display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 8px; background: #0f1320; border: 1px solid var(--line-2); box-shadow: 0 10px 30px rgba(0, 0, 0, .5); font-size: 12.5px; }
.tip[hidden] { display: none; }
.tip b { font-size: 14px; }

@media (max-width: 1100px) {
  .st-kpis { grid-template-columns: repeat(3, 1fr); }
  .st-kpis div:nth-child(3) { border-right: 0; }
  .st-kpis div:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
  .st-cols, .st-charts { grid-template-columns: 1fr; }
  .st-week__head p { padding-right: 0; }
  .st-week__note { position: static; display: block; margin-top: 6px; }
}
@media (max-width: 600px) {
  .st-kpis { grid-template-columns: repeat(2, 1fr); }
  .st-kpis div { border-right: 1px solid var(--line) !important; border-bottom: 1px solid var(--line); }
  .st-kpis div:nth-child(2n) { border-right: 0 !important; }
  .st-kpis div:nth-last-child(-n+2) { border-bottom: 0; }
  .st-week { padding: 20px 14px; }
  .hbar { grid-template-columns: 110px 1fr 56px; }
  .topbar .btn--link { font-size: 12px; padding: 0 10px; }
}
