:root {
  --accent: #0f766e;
  --accent-strong: #0b5750;
  --accent-soft: rgba(15, 118, 110, 0.10);
  --ink: #16211f;
  --ink-2: #5b6b68;
  --ink-3: #8a9997;
  --line: #e6eae9;
  --bg: #f5f7f7;
  --card: #ffffff;
  --ok: #12866b;
  --warn: #b45309;
  --danger: #c2410c;
  --radius: 14px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

.app {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

/* ---------- 顶栏 ---------- */
.site-head {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 20px;
  padding-top: calc(12px + env(safe-area-inset-top, 0px));
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.brand { display: flex; align-items: center; gap: 10px; min-width: 0; }

.brand-mark {
  flex: 0 0 auto;
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
}
.brand-mark img { width: 100%; height: 100%; object-fit: contain; display: block; }

.brand-text { display: flex; flex-direction: column; min-width: 0; }
.brand-text strong { font-size: 15.5px; letter-spacing: 0.3px; white-space: nowrap; }
.brand-text small { font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }

.head-actions { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.head-link {
  font-size: 12.5px; color: var(--ink-2); text-decoration: none;
  padding: 6px 10px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; white-space: nowrap;
}
.head-link:hover { color: var(--accent); border-color: rgba(15,118,110,0.3); }

/* ---------- 布局 ---------- */
.view {
  flex: 1 0 auto;
  width: 100%;
  max-width: 1080px;
  margin: 0 auto;
  padding: 20px 20px 40px;
}

.site-foot {
  flex: 0 0 auto;
  padding: 18px 20px calc(24px + env(safe-area-inset-bottom, 0px));
  text-align: center;
  font-size: 12px;
  color: var(--ink-3);
  border-top: 1px solid var(--line);
  background: #fff;
}
.site-foot .dot { margin: 0 6px; }

/* ---------- 按钮 ---------- */
.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 10px;
  font-family: inherit;
  font-size: 14px;
  padding: 11px 16px;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease, border-color .15s ease;
  white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); }
.btn-primary:disabled { opacity: .6; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--ink-2); border-color: var(--line); }
.btn-ghost:hover { color: var(--accent); border-color: rgba(15,118,110,0.35); }
.btn-sm { padding: 7px 12px; font-size: 12.5px; border-radius: 8px; }
.btn-block { width: 100%; }

/* ---------- 登录 / 注册 ---------- */
.auth-wrap {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 24px;
  max-width: 460px;
  margin: 12px auto 0;
}

.auth-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 26px 24px;
  box-shadow: 0 12px 30px rgba(16, 33, 30, 0.06);
}

.auth-title { margin: 0 0 6px; font-size: 22px; letter-spacing: .2px; }
.auth-sub { margin: 0 0 20px; font-size: 13px; color: var(--ink-2); }

.seg {
  display: flex;
  padding: 3px;
  background: #f1f4f3;
  border-radius: 10px;
  margin-bottom: 18px;
}
.seg button {
  flex: 1 1 0;
  border: 0;
  background: transparent;
  padding: 9px 0;
  border-radius: 8px;
  font-family: inherit;
  font-size: 14px;
  color: var(--ink-2);
  cursor: pointer;
}
.seg button.on { background: #fff; color: var(--accent); font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,0.06); }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 12.5px; color: var(--ink-2); margin-bottom: 6px; }
.field input {
  width: 100%;
  font-family: inherit;
  font-size: 16px;
  padding: 12px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: #fbfcfc;
  color: var(--ink);
  outline: none;
  transition: border-color .15s ease, background-color .15s ease;
}
.field input:focus { border-color: rgba(15,118,110,0.55); background: #fff; }
.field .hint { margin-top: 5px; font-size: 11.5px; color: var(--ink-3); }

.field-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }

.auth-note {
  margin-top: 14px;
  font-size: 12px;
  color: var(--ink-3);
  line-height: 1.7;
}
.auth-note code { background: #f1f4f3; padding: 1px 5px; border-radius: 5px; font-size: 11.5px; }

.auth-error {
  display: none;
  margin-bottom: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  background: rgba(194, 65, 12, 0.08);
  color: var(--danger);
  font-size: 12.5px;
}
.auth-error.show { display: block; }

/* ---------- 卡片通用 ---------- */
.grid { display: grid; gap: 14px; }
.stats { grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 18px;
}

.stat .k { font-size: 12px; color: var(--ink-2); }
.stat .v { font-size: 24px; font-weight: 700; letter-spacing: -.2px; margin-top: 2px; }
.stat .v small { font-size: 12px; font-weight: 500; color: var(--ink-3); margin-left: 3px; }
.stat .s { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; }

.section { margin-top: 22px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.section-head h2 {
  margin: 0;
  font-size: 16px;
  letter-spacing: .2px;
}
.section-head .sub { font-size: 12px; color: var(--ink-3); }

/* ---------- 个人资料 ---------- */
.profile {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  padding: 20px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(15,118,110,0.10), rgba(14,159,138,0.05));
  border: 1px solid rgba(15,118,110,0.16);
}

.avatar {
  flex: 0 0 auto;
  width: 62px; height: 62px;
  border-radius: 50%;
  background: #0f766e;
  color: #fff;
  font-size: 24px;
  font-weight: 700;
  display: flex; align-items: center; justify-content: center;
  overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }

.profile-main { flex: 1 1 220px; min-width: 0; }
.profile-name { font-size: 21px; font-weight: 700; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.profile-meta { font-size: 12.5px; color: var(--ink-2); margin-top: 4px; word-break: break-all; }

.tag {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
  border: 1px solid transparent;
  white-space: nowrap;
}
.tag-level { color: #fff; }
.tag-paid { background: rgba(180, 83, 9, 0.12); color: #b45309; border-color: rgba(180, 83, 9, 0.22); }
.tag-guest { background: rgba(91, 107, 104, 0.1); color: var(--ink-2); border-color: rgba(91,107,104,0.2); }
.tag-ok { background: rgba(18, 134, 107, 0.1); color: var(--ok); border-color: rgba(18,134,107,0.2); }
.tag-off { background: rgba(194, 65, 12, 0.1); color: var(--danger); border-color: rgba(194,65,12,0.2); }

.profile-side { flex: 0 0 auto; text-align: right; }
.profile-side .num { font-size: 22px; font-weight: 700; color: var(--accent); }
.profile-side .lbl { font-size: 11.5px; color: var(--ink-2); }

/* ---------- 进度 ---------- */
.bar {
  position: relative;
  height: 8px;
  border-radius: 999px;
  background: #eef2f1;
  overflow: hidden;
  margin: 10px 0 8px;
}
.bar i {
  position: absolute; inset: 0 auto 0 0;
  display: block;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f766e, #14b8a6);
}
.bar-meta { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); }

.ladder { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.ladder span {
  flex: 1 1 100px;
  text-align: center;
  padding: 8px 6px;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-2);
  background: #fbfcfc;
}
.ladder span.on { border-color: transparent; color: #fff; font-weight: 600; }
.ladder span i { display: block; font-style: normal; font-size: 10.5px; opacity: .8; }

/* ---------- 权益 ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  border-radius: 10px;
  background: #f7f9f9;
  border: 1px solid var(--line);
  font-size: 12.5px;
  color: var(--ink-2);
}
.chip.on { background: rgba(18,134,107,0.08); border-color: rgba(18,134,107,0.2); color: #0f5f4f; }
.chip .dot-mark { width: 6px; height: 6px; border-radius: 50%; background: var(--ink-3); }
.chip.on .dot-mark { background: var(--ok); }

/* ---------- 表格 / 列表 ---------- */
.list { display: flex; flex-direction: column; }
.row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1.4fr) auto;
  gap: 10px;
  align-items: center;
  padding: 12px 2px;
  border-bottom: 1px dashed var(--line);
  font-size: 13.5px;
}
.row:last-child { border-bottom: 0; }
.row .t1 { font-weight: 600; }
.row .t2 { color: var(--ink-3); font-size: 12.5px; word-break: break-all; }
.row .t3 { color: var(--ink-2); font-size: 12.5px; }
.row .num.time { font-weight: 500; font-size: 12.5px; color: var(--ink-2); white-space: nowrap; }
.row .num { font-variant-numeric: tabular-nums; font-weight: 600; }
.num.pos { color: var(--ok); }
.num.neg { color: var(--danger); }

.empty {
  padding: 26px 8px;
  text-align: center;
  color: var(--ink-3);
  font-size: 13px;
}

.more-wrap { display: flex; justify-content: center; padding-top: 12px; }

/* ---------- 设置 ---------- */
.settings { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.settings .card h3 { margin: 0 0 4px; font-size: 14.5px; }
.settings .card p { margin: 0 0 12px; font-size: 12px; color: var(--ink-3); }
.inline-form { display: flex; flex-wrap: wrap; gap: 10px; }
.inline-form input {
  flex: 1 1 160px; min-width: 0;
  font-family: inherit; font-size: 16px;
  padding: 11px 12px;
  border: 1px solid var(--line); border-radius: 10px;
  background: #fbfcfc; outline: none;
}
.inline-form input:focus { border-color: rgba(15,118,110,0.55); background: #fff; }
.inline-form .btn { flex: 0 0 auto; }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed;
  left: 50%; bottom: calc(22px + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px;
  z-index: 60;
  width: min(92vw, 420px);
  pointer-events: none;
}
.toast {
  padding: 11px 14px;
  border-radius: 10px;
  background: rgba(22, 33, 31, 0.92);
  color: #fff;
  font-size: 13px;
  text-align: center;
  box-shadow: 0 8px 24px rgba(0,0,0,0.18);
}
.toast.err { background: #9a3412; }

.loading-card {
  padding: 40px;
  text-align: center;
  color: var(--ink-3);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}


/* ===== 字号放大（2026-11-21） ===== */
body { font-size: 16px; }
.brand-text strong { font-size: 17px; }
.brand-text small { font-size: 12.5px; }
.head-link { font-size: 13.5px; }
.auth-title { font-size: 25px; }
.auth-sub { font-size: 14px; }
.seg button { font-size: 15px; }
.field label { font-size: 13.5px; }
.field .hint { font-size: 12.5px; }
.auth-note { font-size: 13px; }
.stat .k { font-size: 13px; }
.stat .v { font-size: 26px; }
.stat .s { font-size: 12.5px; }
.section-head h2 { font-size: 18px; }
.section-head .sub { font-size: 13px; }
.profile-name { font-size: 22px; }
.profile-meta { font-size: 13.5px; }
.tag { font-size: 12.5px; }
.profile-side .num { font-size: 24px; }
.profile-side .lbl { font-size: 12.5px; }
.bar-meta { font-size: 13px; }
.ladder span { font-size: 13px; }
.chip { font-size: 13.5px; }
.row { font-size: 14.5px; }
.row .t2 { font-size: 13.5px; }
.row .num { font-size: 14.5px; }
.row .num.time { font-size: 13.5px; }
.empty { font-size: 14px; }
.settings .card h3 { font-size: 15.5px; }
.settings .card p { font-size: 13px; }
.site-foot { font-size: 12.5px; }
.toast { font-size: 14px; }

/* ---------- 移动端 ---------- */
@media (max-width: 640px) {
  body { font-size: 15.5px; }
  .site-head { padding: 10px 14px; padding-top: calc(10px + env(safe-area-inset-top, 0px)); }
  .brand-text small { display: none; }
  .brand-mark { width: 32px; height: 32px; }
  .head-link { display: none; }
  .view { padding: 14px 12px 32px; }
  .auth-card { padding: 22px 18px; border-radius: 16px; }
  .auth-title { font-size: 22px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
  .stat .v { font-size: 23px; }
  .profile {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 12px;
    row-gap: 10px;
    align-items: start;
    padding: 16px;
    border-radius: 16px;
  }
  .avatar { width: 52px; height: 52px; font-size: 20px; }
  .profile-main { min-width: 0; }
  .profile-name { font-size: 18px; }
  .profile-meta { font-size: 12px; line-height: 1.65; }
  .profile-side {
    grid-column: 1 / -1;
    text-align: left;
    padding-top: 10px;
    border-top: 1px dashed var(--line);
  }
  .row { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 10px; padding: 11px 2px; }
  .row .t1 { grid-column: 1 / 2; font-size: 15px; }
  .row .num { grid-column: 2 / 3; grid-row: 1 / 2; text-align: right; }
  .row .t2 { grid-column: 1 / -1; font-size: 13px; color: var(--ink-3); }
  .row .num.time { grid-row: 1 / 2; }
  .ladder span { flex: 1 1 30%; }
  .settings { grid-template-columns: minmax(0, 1fr); }
}

/* ===== 验证码登录 / 密码重置（2026-11-21） ===== */
.code-row { display: flex; gap: 8px; }
.code-row input { flex: 1 1 auto; }
.btn-code { white-space: nowrap; min-width: 108px; padding: 0 12px; height: 42px; }
.auth-note a { color: var(--accent); text-decoration: none; }
.auth-note a:hover { text-decoration: underline; }
.seg button { padding-left: 2px; padding-right: 2px; }

@media (max-width: 640px) {
  .code-row input { min-width: 0; }
  .btn-code { min-width: 100px; }
  .seg button { font-size: 14px; }
}
