/* 用户中心 */
:root {
  --bg: #f5f7fb;
  --card: #ffffff;
  --line: #e8ecf3;
  --ink: #111827;
  --ink2: #5b6474;
  --ink3: #98a1b0;
  --brand: #2563eb;
  --brand-soft: #eef4ff;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  -webkit-text-size-adjust: 100%;
}

a { color: inherit; text-decoration: none; }

/* ---------------- 登录门 ---------------- */
.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 18px calc(24px + env(safe-area-inset-bottom, 0px));
}

.gate-card {
  width: 100%;
  max-width: 400px;
  background: var(--card);
  border-radius: 20px;
  padding: 26px 22px 22px;
  box-shadow: 0 18px 46px rgba(17, 24, 39, 0.08);
  text-align: center;
}

.gate-brand {
  font-size: 12px;
  color: var(--brand);
  background: var(--brand-soft);
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  margin-bottom: 14px;
}

.gate-title {
  margin: 0 0 8px;
  font-size: 20px;
  font-weight: 700;
}

.gate-sub {
  margin: 0 0 18px;
  font-size: 13px;
  color: var(--ink3);
  line-height: 1.6;
}

#gate-phone {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0 14px;
  font-size: 16px;
  background: #fbfcfe;
  outline: none;
  text-align: center;
  letter-spacing: 1px;
  -webkit-appearance: none;
}

#gate-phone:focus {
  border-color: var(--brand);
  background: #fff;
}

#gate-btn {
  width: 100%;
  height: 48px;
  margin-top: 12px;
  border: 0;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
}

#gate-btn:disabled {
  opacity: 0.6;
}

.gate-err {
  min-height: 18px;
  margin: 10px 0 0;
  font-size: 13px;
  color: #d93a3a;
}

.gate-tip {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--ink3);
  line-height: 1.6;
}

.gate-back {
  display: inline-block;
  margin-top: 16px;
  font-size: 13px;
  color: var(--ink3);
}

/* ---------------- 主体 ---------------- */
.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 14px calc(28px + env(safe-area-inset-bottom, 0px));
}

.hero {
  background: linear-gradient(140deg, #2f6bf0 0%, #1e4fd8 100%);
  border-radius: 20px;
  padding: 16px 18px 18px;
  color: #fff;
  box-shadow: 0 16px 38px rgba(37, 99, 235, 0.22);
}

.hero-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 13px;
  opacity: 0.92;
}

.hero-main {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.hero-avatar {
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.5px;
}

.hero-info { min-width: 0; }

.hero-name {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
}

.hero-phone {
  margin: 4px 0 0;
  font-size: 13px;
  opacity: 0.85;
  letter-spacing: 0.5px;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 14px;
}

.tag {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.18);
}

.tag-pay.tag-hot { background: #ffd9a8; color: #7a3d00; }
.tag-pay.tag-warm { background: rgba(255, 255, 255, 0.24); }
.tag-pay.tag-cool,
.tag-pay.tag-cold { background: rgba(255, 255, 255, 0.14); }

/* ---------------- 卡片 ---------------- */
.card {
  background: var(--card);
  border-radius: 18px;
  padding: 16px 16px 18px;
  margin-top: 14px;
  box-shadow: 0 8px 24px rgba(17, 24, 39, 0.05);
}

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.card-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
}

.card-more {
  font-size: 12.5px;
  color: var(--brand);
  white-space: nowrap;
}

.card-more.muted { color: var(--ink3); }

.stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 14px;
}

.stat {
  background: #f8fafd;
  border-radius: 12px;
  padding: 12px 6px;
  text-align: center;
}

.stat b {
  display: block;
  font-size: 17px;
  font-weight: 700;
  color: var(--ink);
}

.stat span {
  display: block;
  margin-top: 4px;
  font-size: 11.5px;
  color: var(--ink3);
}

.list {
  list-style: none;
  margin: 14px 0 0;
  padding: 0;
}

.list-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 0;
  border-top: 1px solid var(--line);
}

.list-item:first-child { border-top: 0; }

.li-main { min-width: 0; flex: 1 1 auto; }

.li-title {
  margin: 0;
  font-size: 13.5px;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.li-sub {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--ink3);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.li-side {
  flex: 0 0 auto;
  text-align: right;
}

.li-time {
  display: block;
  font-size: 12px;
  color: var(--brand);
}

.li-date {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  color: var(--ink3);
}

.kv { margin-top: 12px; }

.kv-row {
  display: flex;
  align-items: baseline;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px dashed var(--line);
}

.kv-row:first-child { border-top: 0; }

.kv-k {
  flex: 0 0 82px;
  font-size: 12.5px;
  color: var(--ink3);
}

.kv-v {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 13.5px;
  color: var(--ink);
  word-break: break-word;
}

.empty {
  margin: 14px 0 0;
  font-size: 13px;
  color: var(--ink3);
  line-height: 1.7;
}

.advice {
  margin-top: 14px;
  background: #e3edff;
  border-left: 3px solid var(--brand);
  border-radius: 12px;
  padding: 12px 14px;
}

.advice-t {
  margin: 0 0 4px;
  font-size: 12px;
  color: var(--brand);
  font-weight: 600;
}

.advice-b {
  margin: 0;
  font-size: 13px;
  color: #1e2a78;
  line-height: 1.6;
}

.foot {
  margin-top: 18px;
  text-align: center;
  font-size: 12.5px;
  color: var(--ink3);
}

.foot a { color: var(--brand); }

/* ---------------- 横屏 / 大屏 ---------------- */
@media (orientation: landscape) and (max-height: 520px) {
  .wrap { max-width: 900px; padding-top: 10px; }
  .hero { padding: 12px 16px 14px; }
  .stat-row { margin-top: 10px; }
  .stat { padding: 9px 6px; }
}

@media (min-width: 760px) {
  .wrap { padding-top: 24px; }
}
/* 超小屏（≤359px）：统计卡改单列，避免三卡挤压 */
@media (max-width: 359px) {
  .stat-row { grid-template-columns: 1fr; gap: 6px; }
  .stat { padding: 10px 8px; }
  .stat b { font-size: 16px; }
  .hero { padding: 14px 14px 16px; }
  .hero-avatar { width: 42px; height: 42px; font-size: 15px; }
  .hero-name { font-size: 17px; }
  .card { padding: 14px 14px 16px; }
}
