* { box-sizing: border-box; }
html, body { margin: 0; background: #f5f7fa; color: #1f2329;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif; }
.topbar { height: 56px; background: #fff; border-bottom: 1px solid #ebeef5; display: flex; align-items: center;
  padding: 0 24px; gap: 24px; position: sticky; top: 0; z-index: 10; }
.topbar .brand { font-weight: 600; font-size: 17px; }
.topbar .nav { display: flex; gap: 4px; flex: 1; }
.topbar .nav a { padding: 6px 12px; border-radius: 6px; color: #4e5969; text-decoration: none; font-size: 14px; }
.topbar .nav a.on { background: #ecf5ff; color: #409eff; }
.page { max-width: 1280px; margin: 0 auto; padding: 20px 24px 60px; }
.head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.head .sp { flex: 1; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 10px; padding: 16px 18px; border: 1px solid #ebeef5; }
.stat .k { font-size: 13px; color: #86909c; }
.stat .v { font-size: 26px; font-weight: 600; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat .v small { font-size: 14px; color: #86909c; font-weight: 400; }
.panel { background: #fff; border-radius: 10px; border: 1px solid #ebeef5; padding: 16px; margin-bottom: 16px; }
.panel h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.charts { display: grid; grid-template-columns: 3fr 2fr; gap: 16px; }
.chart { height: 260px; }
.tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.tools .sp { flex: 1; }
.thumb { width: 52px; height: 52px; border-radius: 4px; border: 1px solid #ebeef5; }
.link { color: #409eff; cursor: pointer; word-break: break-all; }
.muted { color: #86909c; font-size: 12px; }
.login { max-width: 360px; margin: 14vh auto 0; background: #fff; border-radius: 12px; padding: 32px 28px;
  border: 1px solid #ebeef5; }
.login h2 { margin: 0 0 24px; text-align: center; font-weight: 600; }
.qrbox { text-align: center; }
.qrbox img { width: 280px; height: 280px; border: 1px solid #ebeef5; border-radius: 8px; }
.upimg { display: flex; align-items: center; gap: 10px; }
.upimg img { width: 64px; height: 64px; border: 1px solid #ebeef5; border-radius: 6px; object-fit: contain; }
.cd-wrap { display: flex; gap: 20px; align-items: flex-start; }
.cd-form { flex: 1; min-width: 0; }
.bg-guide { margin: 8px 0 4px; padding: 8px 12px; background: #f0f9eb; border: 1px solid #c2e7b0; border-radius: 6px;
  font-size: 12px; line-height: 1.7; color: #4e5969; }
.bg-guide-t { font-weight: 600; color: #3a7d1e; }
.bg-guide ol { margin: 2px 0 4px; padding-left: 18px; }
.bg-guide a { color: #409eff; }
.cd-sec { margin: 4px 0 14px; padding-left: 8px; border-left: 3px solid #409eff; font-weight: 600; font-size: 13px; color: #4e5969; }
.cd-preview { width: 240px; flex-shrink: 0; position: sticky; top: 0; }
.phone { width: 240px; height: 460px; border-radius: 22px; border: 6px solid #1f2329; background: #fff;
  padding: 0 14px; overflow: hidden; display: flex; align-items: center; position: relative; }
/* 有背景图：和扫码页一样，背景铺满顶部对齐，白色名片在上方约 58% 的区域 */
.phone.has-bg { align-items: flex-start; padding: 10px 10px 0; background: #e9e9e9; }
.pbg { position: absolute; left: 0; top: 0; width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.phone.has-bg .pcard { position: relative; background: #fff; border-radius: 8px; padding: 8px 9px 7px; box-shadow: 0 4px 14px rgba(0,0,0,.28); }
.phone.has-bg .pq { width: 118px; height: 118px; margin-top: 7px; }
.phone.has-bg .pn { margin-top: 4px; }
.phone.has-bg .ph { margin-top: 5px; }
.pcard { width: 100%; text-align: center; }
.phd { display: flex; align-items: center; gap: 7px; text-align: left; }
.pav { width: 30px; height: 30px; border-radius: 3px; object-fit: cover; flex: none; }
.pht { min-width: 0; flex: 1; }
.pt { font-size: 11px; font-weight: 600; word-break: break-all; line-height: 1.35; }
.pp { font-size: 9px; color: #576069; margin-top: 2px; white-space: pre-wrap; word-break: break-all; line-height: 1.4; }
.pq { width: 150px; height: 150px; margin: 12px auto 0; border: 1px dashed #c9cdd4; border-radius: 4px; display: flex;
  align-items: center; justify-content: center; color: #86909c; font-size: 12px; background: #fafafa; }
.pn { font-size: 7px; color: #8a8a8a; margin-top: 6px; transform: scale(.9); white-space: nowrap; }
.ph { font-size: 9px; color: #8a8a8a; margin-top: 12px; }
.dm-lock { display: flex; align-items: center; gap: 10px; }
.dm-steps { margin: 0; padding-left: 20px; line-height: 1.9; color: #4e5969; font-size: 13px; }
.dm-steps code { background: #f2f3f5; padding: 1px 5px; border-radius: 4px; }
.dm-ck { margin-left: 6px; font-size: 12px; }
.dm-err { color: #f56c6c; }
@media (max-width: 800px) {
  .cd-wrap { flex-direction: column; }
  .cd-preview { position: static; margin: 0 auto; }
  .charts { grid-template-columns: 1fr; }
  .page { padding: 16px 12px 40px; }
  .topbar { padding: 0 12px; gap: 10px; }
}
