/* =============================================================================
 * detect.css — 风险检测中心 页面样式（基于 jiguang-tokens.css 的语义变量）
 * 不依赖 Tailwind，便于独立验证；后续可平移为 Tailwind class。
 * ============================================================================= */

.dx-wrap { max-width: var(--jg-container); margin: 0 auto; padding: 16px; }
.dx-h1 { font-size: 22px; font-weight: 800; color: var(--jg-text); margin: 8px 0 2px; }
.dx-sub { font-size: 13px; color: var(--jg-text-2); margin: 0 0 16px; }

/* ---- 检测搜索条 ---- */
.dx-search { background: var(--jg-card); border: 1px solid var(--jg-line);
  border-radius: var(--jg-radius-card); box-shadow: var(--jg-shadow-card); padding: 14px; margin-bottom: 16px; }
.dx-chains { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 8px; scrollbar-width: none; }
.dx-chains::-webkit-scrollbar { display: none; }
.dx-chip { flex: 0 0 auto; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: var(--jg-radius-pill); border: 1px solid var(--jg-line);
  background: #fff; color: var(--jg-text-2); font-size: 13px; font-weight: 600; cursor: pointer; }
.dx-chip[data-active="1"] { border-color: var(--jg-blue); color: var(--jg-blue); background: var(--jg-blue-50); }
.dx-chip .dot { width: 8px; height: 8px; border-radius: 50%; }
.dx-input-row { display: flex; gap: 8px; margin-top: 10px; }
.dx-input { flex: 1; min-width: 0; height: 44px; border: 1px solid var(--jg-line);
  border-radius: var(--jg-radius-sm); padding: 0 14px; font-size: 14px; color: var(--jg-text);
  background: var(--jg-bg-subtle); }
.dx-input:focus { outline: none; border-color: var(--jg-blue); background: #fff; }
.dx-btn { flex: 0 0 auto; height: 44px; padding: 0 20px; border: none; border-radius: var(--jg-radius-pill);
  background: var(--jg-blue); color: #fff; font-size: 14px; font-weight: 700; cursor: pointer; white-space: nowrap; }
.dx-btn:hover { background: var(--jg-blue-600); }

/* ---- 主网格 ---- */
.dx-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 16px; }
.dx-col { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.dx-card { background: var(--jg-card); border: 1px solid var(--jg-line);
  border-radius: var(--jg-radius-card); box-shadow: var(--jg-shadow-card); padding: 16px; }
.dx-card-title { display: flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 700;
  color: var(--jg-text); margin: 0 0 12px; }
.dx-card-title .i { color: var(--jg-blue); }

/* ---- Score 总览 ---- */
.dx-score { display: flex; align-items: center; gap: 18px; }
.dx-ring { position: relative; flex: 0 0 auto; }
.dx-ring .num { position: absolute; inset: 0; display: flex; flex-direction: column;
  align-items: center; justify-content: center; }
.dx-ring .num b { font-size: 30px; font-weight: 800; line-height: 1; color: var(--jg-text); }
.dx-ring .num span { font-size: 11px; color: var(--jg-text-3); margin-top: 2px; }
.dx-score-meta { flex: 1; min-width: 0; }
.dx-grade { font-size: 28px; font-weight: 800; line-height: 1.1; }
.dx-grade-desc { font-size: 13px; color: var(--jg-text-2); margin-top: 2px; }
.dx-token { display: flex; align-items: center; gap: 8px; margin-top: 12px; flex-wrap: wrap; }
.dx-token .sym { font-weight: 700; color: var(--jg-text); }
.dx-token .addr { font-size: 12px; color: var(--jg-text-3); font-family: ui-monospace, monospace; }
.dx-kpis { display: flex; gap: 16px; margin-top: 12px; flex-wrap: wrap; }
.dx-kpi { font-size: 12px; color: var(--jg-text-3); }
.dx-kpi b { display: block; font-size: 15px; color: var(--jg-text); font-weight: 700; }

/* ---- 雷达 ---- */
.dx-radar { display: flex; justify-content: center; }
.dx-radar svg { max-width: 100%; height: auto; }

/* ---- 8 维度拆解 ---- */
.dx-dim { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--jg-line); }
.dx-dim:last-child { border-bottom: none; }
.dx-dim .label { flex: 0 0 88px; font-size: 13px; color: var(--jg-text); }
.dx-bar { flex: 1; height: 8px; border-radius: 999px; background: var(--jg-bg-subtle); overflow: hidden; }
.dx-bar i { display: block; height: 100%; border-radius: 999px; }
.dx-dim .val { flex: 0 0 34px; text-align: right; font-size: 13px; font-weight: 700; color: var(--jg-text); }

/* ---- 风险预警 ---- */
.dx-alert { display: flex; gap: 10px; padding: 10px; border-radius: var(--jg-radius-sm);
  background: var(--jg-bg-subtle); margin-bottom: 8px; }
.dx-alert:last-child { margin-bottom: 0; }
.dx-alert .ic { flex: 0 0 auto; width: 28px; height: 28px; border-radius: 8px; display: flex;
  align-items: center; justify-content: center; font-size: 13px; }
.dx-alert .tx { flex: 1; min-width: 0; }
.dx-alert .tx b { display: block; font-size: 13px; color: var(--jg-text); }
.dx-alert .tx span { font-size: 12px; color: var(--jg-text-2); }

/* ---- 检测历史 ---- */
.dx-hist { display: flex; flex-direction: column; }
.dx-hist-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--jg-line); }
.dx-hist-row:last-child { border-bottom: none; }
.dx-hist-row .sym { flex: 1; font-weight: 600; color: var(--jg-text); font-size: 13px; }
.dx-hist-row .chain { font-size: 11px; color: var(--jg-text-3); }
.dx-hist-row .sc { font-size: 13px; font-weight: 800; }
.dx-hist-row .tm { flex: 0 0 auto; font-size: 11px; color: var(--jg-text-3); width: 64px; text-align: right; }

/* ---- JGT 成长值提示 ---- */
.dx-jgt { display: flex; align-items: center; gap: 12px; margin-top: 16px; padding: 12px 14px;
  border-radius: var(--jg-radius-card); background: var(--jgt-gold-bg); border: 1px solid #efe0bb; }
.dx-jgt .ic { color: var(--jgt-gold); font-size: 18px; }
.dx-jgt .tx { flex: 1; font-size: 13px; color: #7a5b16; }
.dx-jgt a { font-size: 13px; font-weight: 700; color: var(--jg-blue); text-decoration: none; white-space: nowrap; }

/* ---- 合规提示 ---- */
.dx-compliance { margin-top: 16px; padding: 12px 14px; border-radius: var(--jg-radius-sm);
  background: var(--jg-bg-subtle); font-size: 12px; line-height: 1.7; color: var(--jg-text-3); }

/* ---- 徽章 ---- */
.dx-badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px;
  border-radius: var(--jg-radius-pill); font-size: 12px; font-weight: 700; }

/* ============================ 移动端 ============================ */
@media (max-width: 860px) {
  .dx-grid { grid-template-columns: 1fr; }
  .dx-input-row { flex-direction: column; }
  .dx-btn { width: 100%; }
  .dx-score { gap: 14px; }
  .dx-grade { font-size: 24px; }
}
/* 防横向溢出 — 限定在 detect-v2 命名空间内，避免污染其他页面 */
.dx-wrap, .dx-card, .dx-grid, .dx-col { max-width: 100%; }
.dx-wrap img, .dx-wrap svg { max-width: 100%; }
