/* stats.jztapp.com 看板样式（无外部依赖） */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font: 14px/1.5 -apple-system, "Segoe UI", "Microsoft YaHei", sans-serif;
       background: #f1f5f9; color: #1e293b; }
.muted { color: #94a3b8; font-size: 12px; }
.err { color: #ef4444; }

.mask { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex;
        align-items: center; justify-content: center; }
.token-box { background: #fff; padding: 28px 32px; border-radius: 14px; width: 340px;
             box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.token-box h2 { margin-bottom: 6px; }
.token-box input { width: 100%; margin: 14px 0; padding: 10px 12px; border: 1px solid #cbd5e1;
                   border-radius: 8px; font-size: 14px; }

.topbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
          background: #fff; padding: 14px 22px; box-shadow: 0 1px 3px rgba(0,0,0,.08);
          position: sticky; top: 0; z-index: 5; }
.brand { font-size: 18px; font-weight: 700; color: #4f46e5; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.filters select, .filters input { padding: 7px 10px; border: 1px solid #cbd5e1; border-radius: 8px;
                                  font-size: 13px; background: #fff; }
.ranges { display: flex; gap: 0; border: 1px solid #cbd5e1; border-radius: 8px; overflow: hidden; }
.ranges button { border: 0; background: #fff; padding: 7px 12px; cursor: pointer; font-size: 13px;
                 border-right: 1px solid #e2e8f0; }
.ranges button:last-child { border-right: 0; }
.ranges button.on { background: #4f46e5; color: #fff; }
.btn { border: 1px solid #cbd5e1; background: #fff; padding: 7px 14px; border-radius: 8px;
       cursor: pointer; font-size: 13px; }
.btn.primary { background: #4f46e5; border-color: #4f46e5; color: #fff; }

main { max-width: 1280px; margin: 0 auto; padding: 18px 22px 60px; }
.loading { text-align: center; padding: 60px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px;
         margin-bottom: 14px; }
.card { background: #fff; border-radius: 12px; padding: 16px 18px;
        box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card .k { color: #64748b; font-size: 12px; margin-bottom: 6px; }
.card .v { font-size: 26px; font-weight: 700; color: #1e293b; }

.panel { background: #fff; border-radius: 12px; padding: 16px 18px; margin-bottom: 14px;
         box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.panel h3 { font-size: 14px; color: #334155; margin-bottom: 12px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 900px) { .grid2 { grid-template-columns: 1fr; } }

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 7px 8px; border-bottom: 1px solid #f1f5f9; }
th { color: #64748b; font-weight: 600; font-size: 12px; }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.path { font-family: Consolas, Menlo, monospace; font-size: 12px; word-break: break-all; max-width: 300px; }
.tag { background: #eef2ff; color: #4f46e5; border-radius: 5px; padding: 1px 7px; font-size: 12px; }

/* 趋势柱状图 */
.trend { display: flex; align-items: flex-end; gap: 6px; height: 190px; padding-top: 10px; }
.col { flex: 1; display: flex; flex-direction: column; align-items: center; min-width: 0; }
.bars { display: flex; align-items: flex-end; gap: 3px; height: 160px; width: 100%; justify-content: center; }
.bar { width: 40%; max-width: 26px; border-radius: 4px 4px 0 0; transition: height .3s; }
.bar.pv { background: #4f46e5; }
.bar.uv { background: #93c5fd; }
.col .lbl { font-size: 11px; color: #94a3b8; margin-top: 6px; white-space: nowrap; }
.legend { margin-top: 10px; font-size: 12px; color: #64748b; }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin: 0 6px 0 14px; vertical-align: -1px; }
.dot.pv { background: #4f46e5; } .dot.uv { background: #93c5fd; }

/* 横向占比条 */
.hbar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13px; }
.hbar .name { width: 90px; text-align: right; color: #475569; flex-shrink: 0;
              overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hbar .track { flex: 1; height: 14px; background: #f1f5f9; border-radius: 7px; overflow: hidden; }
.hbar .fill { height: 100%; background: linear-gradient(90deg, #6366f1, #818cf8); border-radius: 7px; }
.hbar .num { width: 46px; text-align: right; font-variant-numeric: tabular-nums; }
