/* 数据统计 · 用户分析（2026-11-16） */
.ua-page {
  --ua-blue: #1677ff;
  --ua-green: #0aa62b;
  --ua-orange: #ff851b;
  --ua-cyan: #08c7e6;
  --ua-text: #142548;
  --ua-sub: #7b8bab;
  --ua-line: #e4ebf7;
  margin: 0 -32px;
  padding: 10px 20px 12px;
  background: #f3f6fc;
  min-height: 100%;
  color: var(--ua-text);
  font-variant-numeric: tabular-nums;
}
/* 参考图该页无面包屑，且内容需在 1586×992 内完整呈现 */
body.ua-route .crumb { display: none; }
body.ua-route .content { padding-bottom: 12px; }
.ua-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.ua-title h1 {
  margin: 0;
  font-size: 24px;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: .2px;
}
.ua-title p {
  margin: 3px 0 0;
  font-size: 13px;
  color: var(--ua-sub);
}
.ua-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.ua-select {
  height: 36px;
  min-width: 132px;
  border: 1px solid var(--ua-line);
  border-radius: 8px;
  background: #fff;
  color: #41567d;
  font-size: 13px;
  padding: 0 10px;
  outline: none;
}
.ua-select:focus { border-color: #9cc4ff; box-shadow: 0 0 0 3px rgba(22,119,255,.10); }
.ua-range {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 3px;
  border-radius: 8px;
  background: #e9f1fd;
}
.ua-range button {
  border: 0;
  background: transparent;
  color: #5a6f96;
  font-size: 13px;
  height: 28px;
  padding: 0 12px;
  border-radius: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.ua-range button:hover { color: var(--ua-blue); }
.ua-range button.active {
  background: #fff;
  color: var(--ua-blue);
  font-weight: 600;
  box-shadow: 0 1px 3px rgba(22,119,255,.18);
}
.ua-custom {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--ua-sub);
}
.ua-custom[hidden] { display: none; }
.ua-custom input {
  height: 34px;
  border: 1px solid var(--ua-line);
  border-radius: 7px;
  background: #fff;
  color: #41567d;
  font-size: 12px;
  padding: 0 8px;
}
.ua-btn {
  height: 36px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--ua-line);
  background: #fff;
  color: #41567d;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
}
.ua-btn:hover { border-color: #b9d4ff; color: var(--ua-blue); }
.ua-btn.primary {
  background: var(--ua-blue);
  border-color: var(--ua-blue);
  color: #fff;
  box-shadow: 0 2px 8px rgba(22,119,255,.22);
}
.ua-btn.primary:hover { background: #0d68e6; color: #fff; }
.ua-btn:disabled { opacity: .62; cursor: not-allowed; box-shadow: none; }
.ua-btn svg { width: 15px; height: 15px; }
.ua-btn.loading svg { animation: ua-spin .8s linear infinite; }
@keyframes ua-spin { to { transform: rotate(360deg); } }

.ua-panel {
  background: #fff;
  border: 1px solid var(--ua-line);
  border-radius: 10px;
  box-shadow: 0 2px 10px rgba(20,37,72,.04);
  padding: 9px 16px 8px;
  margin-bottom: 8px;
}
.ua-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
  min-height: 20px;
}
.ua-block-head h2 {
  margin: 0;
  font-size: 16px;
  font-weight: 700;
  color: var(--ua-text);
  display: flex;
  align-items: center;
  gap: 8px;
}
.ua-block-head h2::before {
  content: '';
  width: 3px;
  height: 15px;
  border-radius: 2px;
  background: var(--ua-blue);
  display: inline-block;
}
.ua-asof { font-size: 12px; color: #93a1bd; }
.ua-unit {
  font-size: 12px;
  font-weight: 600;
  color: #8a99b8;
  letter-spacing: .4px;
}
.ua-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.ua-metric {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding: 9px 14px;
  border: 1px solid #e9f0fb;
  border-radius: 8px;
  background: #f8fbff;
}
.ua-metric .ic {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  background: #e9f2ff;
  color: var(--ua-blue);
}
.ua-metric .ic svg { width: 19px; height: 19px; }
.ua-metric .ic.green { background: #e8f8ea; color: var(--ua-green); }
.ua-metric .ic.orange { background: #fff1e4; color: var(--ua-orange); }
.ua-metric .ic.cyan { background: #e5f9fc; color: var(--ua-cyan); }
.ua-metric .ic.slate { background: #edf2fa; color: #7186ab; }
.ua-metric .lb {
  font-size: 13px;
  color: var(--ua-sub);
  white-space: nowrap;
}
.ua-metric .val {
  margin-top: 1px;
  font-size: 26px;
  line-height: 1.1;
  font-weight: 700;
  color: var(--ua-text);
  letter-spacing: .2px;
}
.ua-metric .val.green { color: var(--ua-green); }
.ua-metric .val.orange { color: var(--ua-orange); }
.ua-metric .val.cyan { color: #06a8c4; }
.ua-metric .val.muted { color: #9aa8c2; }

.ua-grid { display: grid; gap: 8px; }
.ua-grid-61 { grid-template-columns: minmax(0, 61fr) minmax(0, 39fr); }
.ua-grid-51 { grid-template-columns: minmax(0, 51fr) minmax(0, 49fr); }
.ua-grid > .ua-panel { margin-bottom: 0; }
.ua-grid + .ua-grid { margin-top: 8px; }

.ua-legend { display: flex; align-items: center; gap: 16px; font-size: 12px; color: #6f82a5; }
.ua-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-right: 6px;
}
.ua-chart { position: relative; width: 100%; height: 190px; }
.ua-chart svg { display: block; width: 100%; height: 100%; overflow: visible; }
.ua-tip {
  position: absolute;
  z-index: 3;
  min-width: 128px;
  padding: 8px 10px;
  border: 1px solid #e1eaf8;
  border-radius: 8px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 6px 18px rgba(20,37,72,.14);
  font-size: 12px;
  color: #566b90;
  pointer-events: none;
}
.ua-tip b { display: block; margin-bottom: 5px; color: var(--ua-text); font-size: 12px; }
.ua-tip div { display: flex; align-items: center; justify-content: space-between; gap: 14px; line-height: 1.7; }
.ua-tip i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.ua-tip strong { color: var(--ua-text); }
.ua-note {
  margin-top: 8px;
  font-size: 12px;
  color: #93a1bd;
  line-height: 1.6;
}
.ua-note.warn { color: #a76a12; background: #fff8e8; border: 1px solid #f6e6bf; border-radius: 7px; padding: 7px 10px; }

.ua-donut-body {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  min-height: 190px;
  padding: 0;
}
.ua-donut-wrap { position: relative; width: 180px; height: 180px; flex: 0 0 auto; }
.ua-donut-wrap svg { display: block; width: 100%; height: 100%; }
.ua-donut-legend { flex: 1 1 auto; min-width: 150px; max-width: 240px; }
.ua-dl {
  display: grid;
  grid-template-columns: 10px minmax(52px, 1fr) auto auto;
  align-items: center;
  gap: 8px;
  padding: 9px 0;
  border-bottom: 1px dashed #eef3fb;
  font-size: 13px;
  color: #5d7094;
}
.ua-dl:last-child { border-bottom: 0; }
.ua-dl i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.ua-dl b { color: var(--ua-text); font-size: 15px; font-weight: 700; }
.ua-dl em { font-style: normal; color: #93a1bd; font-size: 12px; min-width: 50px; text-align: right; }

.ua-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.ua-table th {
  padding: 8px 8px;
  text-align: left;
  font-size: 12px;
  font-weight: 600;
  color: #8a99b8;
  background: #fbfcff;
  border-bottom: 1px solid #eef3fb;
  white-space: nowrap;
}
.ua-table td {
  padding: 5px 8px;
  border-bottom: 1px solid #f1f5fc;
  color: #41567d;
  vertical-align: middle;
}
.ua-table tbody tr:last-child td { border-bottom: 0; }
.ua-table .num { text-align: right; white-space: nowrap; }
.ua-table .strong { color: var(--ua-text); font-weight: 600; }
.ua-table .empty-row td { text-align: center; color: #a3b0c8; padding: 30px 8px; }

.ua-rank {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #f1f5fc;
  color: #8a99b8;
  font-size: 12px;
  font-weight: 700;
}
.ua-rank.gold { background: #fff2d2; color: #b8860b; }
.ua-rank.silver { background: #edf1f7; color: #72829c; }
.ua-rank.bronze { background: #fbe9dd; color: #b06a3b; }
.ua-champion {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 62%;
  padding: 6px 12px;
  border: 1px solid #f3e2b8;
  border-radius: 999px;
  background: #fff9ea;
  color: #8a6a13;
  font-size: 12px;
  line-height: 1.2;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.ua-champion svg { width: 14px; height: 14px; flex: 0 0 auto; color: #d9a623; }
.ua-champion strong { color: #7a5100; font-weight: 700; }
.ua-mlink { color: var(--ua-text); font-weight: 600; text-decoration: none; }
.ua-mlink:hover { color: var(--ua-blue); text-decoration: underline; }
.ua-user { display: flex; align-items: center; gap: 9px; min-width: 0; }
.ua-user .av {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #edf4ff;
  color: #6b9cf5;
  flex: 0 0 auto;
}
.ua-user .av svg { width: 14px; height: 14px; }
.ua-uname { color: var(--ua-text); font-weight: 600; font-size: 13px; line-height: 1.3; }
.ua-uphone { color: #93a1bd; font-size: 11px; line-height: 1.4; margin-top: 1px; }
.ua-badge-green {
  display: inline-block;
  padding: 2px 7px;
  border-radius: 999px;
  background: #e8f8ea;
  color: var(--ua-green);
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}
.ua-more {
  border: 0;
  background: none;
  color: var(--ua-blue);
  font-size: 12px;
  cursor: pointer;
  padding: 4px 0 4px 8px;
  white-space: nowrap;
}
.ua-more:hover { text-decoration: underline; }
.ua-foot {
  margin-top: 5px;
  padding-top: 5px;
  border-top: 1px dashed #eef3fb;
  font-size: 11px;
  color: #9aa8c2;
  line-height: 1.5;
}

.ua-skeleton {
  border-radius: 8px;
  background: linear-gradient(90deg, #f4f7fc 25%, #eaf1fa 37%, #f4f7fc 63%);
  background-size: 400% 100%;
  animation: ua-shimmer 1.3s ease infinite;
}
.ua-skeleton.metric { height: 66px; }
.ua-skeleton.chart { height: 190px; }
.ua-skeleton.table { height: 190px; }
@keyframes ua-shimmer { 0% { background-position: 100% 0; } 100% { background-position: 0 0; } }

.ua-error {
  min-height: 70px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px dashed #f0c9c9;
  border-radius: 8px;
  background: #fffafa;
  color: #b45656;
  font-size: 12px;
  text-align: center;
  padding: 16px;
}
.ua-error.tall { min-height: 296px; }
.ua-error button {
  height: 28px;
  padding: 0 12px;
  border: 1px solid #f0c9c9;
  background: #fff;
  color: #b45656;
  border-radius: 6px;
  font-size: 12px;
  cursor: pointer;
}
.ua-empty {
  min-height: 296px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  color: #a3b0c8;
  font-size: 13px;
}
.ua-empty b { color: #7b8bab; font-size: 26px; font-weight: 700; }

/* 用户明细弹层 */
.ua-modal-layer {
  position: fixed;
  inset: 0;
  z-index: 3000;
  background: rgba(18,32,58,.38);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.ua-modal {
  width: min(760px, 96vw);
  max-height: 86vh;
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgba(14,28,54,.28);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.ua-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #eef3fb;
}
.ua-modal-head h3 { margin: 0; font-size: 16px; color: var(--ua-text); }
.ua-modal-head button {
  border: 0;
  background: none;
  font-size: 22px;
  line-height: 1;
  color: #93a1bd;
  cursor: pointer;
}
.ua-modal-tools { display: flex; gap: 8px; padding: 12px 20px; border-bottom: 1px solid #f2f6fc; }
.ua-modal-tools input {
  flex: 1;
  height: 34px;
  border: 1px solid var(--ua-line);
  border-radius: 7px;
  padding: 0 10px;
  font-size: 13px;
  outline: none;
}
.ua-modal-tools input:focus { border-color: #9cc4ff; }
.ua-modal-tools .ua-btn { height: 34px; }
.ua-modal-body { flex: 1; overflow: auto; padding: 4px 20px 8px; }
.ua-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 20px;
  border-top: 1px solid #eef3fb;
  font-size: 12px;
  color: #8a99b8;
}
.ua-modal-foot .ua-btn { height: 30px; padding: 0 12px; }
.ua-modal-foot .ua-btn + .ua-btn { margin-left: 6px; }

@media (max-width: 1440px) {
  .ua-metric { gap: 11px; }
}
@media (max-width: 1280px) {
  .ua-grid-61, .ua-grid-51 { grid-template-columns: minmax(0, 1fr); }
  .ua-grid > .ua-panel + .ua-panel { margin-top: 14px; }
}
@media (max-width: 960px) {
  .ua-page { margin: 0 -32px; padding: 14px 16px 26px; }
  .ua-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ua-head { align-items: stretch; }
}
@media (max-width: 620px) {
  .ua-metrics { grid-template-columns: minmax(0, 1fr); }
  .ua-donut-body { flex-direction: column; }
  .ua-donut-legend { max-width: none; width: 100%; }
  .ua-champion { max-width: 100%; }
  .ua-table { font-size: 12px; }
  .ua-table th, .ua-table td { padding: 9px 5px; }
}
