:root {
  --bg: #0b1020; --card: #141b30; --card2: #1b2440; --line: #26304f;
  --text: #e8ecf6; --muted: #8a94b0; --accent: #3ee0c5; --accent2: #2bb8a2;
  --warn: #f5b84a; --danger: #ff5d6c; --ok: #3ee08a;
  --safe-b: env(safe-area-inset-bottom, 0px);
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body { min-height: 100vh; }
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; position: relative; }
button { font: inherit; color: inherit; border: 0; background: none; cursor: pointer; }
input, select { font: inherit; color: var(--text); }
select.input { appearance: none; -webkit-appearance: none; }
a { color: var(--accent); text-decoration: none; }

/* 顶栏 */
.topbar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; gap: 8px; height: 54px; padding: 0 14px; background: rgba(11,16,32,.92); backdrop-filter: blur(8px); }
.topbar .title { flex: 1; font-weight: 600; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar .back { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; font-size: 22px; }
.lang-btn { display: flex; align-items: center; gap: 4px; padding: 6px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; color: var(--muted); }
.lang-btn svg { width: 15px; height: 15px; }

.page { padding: 8px 16px calc(90px + var(--safe-b)); }
.page.sub { padding-bottom: calc(30px + var(--safe-b)); }

/* 底部导航 */
.tabbar { position: fixed; left: 50%; transform: translateX(-50%); bottom: 0; width: 100%; max-width: 480px; display: flex; background: rgba(15,21,40,.97); border-top: 1px solid var(--line); padding-bottom: var(--safe-b); z-index: 10; }
.tabbar button { flex: 1; padding: 9px 0 8px; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); font-size: 12px; }
.tabbar button.on { color: var(--accent); }
.tabbar svg { width: 24px; height: 24px; }

/* 卡片 */
.card { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 16px; margin-bottom: 14px; }
.card h3 { margin: 0 0 10px; font-size: 15px; font-weight: 600; }
.muted { color: var(--muted); font-size: 13px; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }

/* 首页算力 */
.core { display: flex; flex-direction: column; align-items: center; padding: 26px 0 10px; }
.ring { position: relative; width: 230px; height: 230px; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 50% 50%, #13203a 0 58%, transparent 59%), conic-gradient(var(--line) 0 100%); }
.ring.on { background: radial-gradient(circle at 50% 50%, #13203a 0 58%, transparent 59%), conic-gradient(from var(--a, 0deg), var(--accent) 0 25%, rgba(62,224,197,.12) 25% 100%); animation: spin 3s linear infinite; }
@property --a { syntax: '<angle>'; initial-value: 0deg; inherits: false; }
@keyframes spin { to { --a: 360deg; } }
.ring-in { text-align: center; }
.ring-in .lbl { color: var(--muted); font-size: 13px; }
.ring-in .val { font-size: 32px; font-weight: 700; letter-spacing: .5px; font-variant-numeric: tabular-nums; margin: 4px 0; }
.ring-in .rate { color: var(--accent); font-size: 14px; font-weight: 600; }
.start-btn { margin-top: 26px; width: 220px; height: 52px; border-radius: 26px; font-size: 17px; font-weight: 700; color: #04211c; background: linear-gradient(90deg, var(--accent), #6cf0d9); box-shadow: 0 8px 24px rgba(62,224,197,.25); }
.start-btn:disabled { background: var(--card2); color: var(--accent); box-shadow: none; border: 1px solid var(--line); }
.state-tip { margin-top: 10px; color: var(--muted); font-size: 13px; text-align: center; min-height: 20px; font-variant-numeric: tabular-nums; }
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 26px; }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 12px 6px; text-align: center; }
.stat b { display: block; font-size: 18px; }
.stat span { color: var(--muted); font-size: 12px; }

/* 我的 */
.profile { display: flex; align-items: center; gap: 12px; }
.avatar { width: 48px; height: 48px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #5b7cff); display: grid; place-items: center; color: #06121f; font-weight: 800; font-size: 20px; }
.big-rate { font-size: 26px; font-weight: 700; color: var(--accent); }
.code-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card2); border-radius: 12px; padding: 10px 12px; }
.code-box .code { font-size: 22px; font-weight: 700; letter-spacing: 3px; font-family: ui-monospace, Menlo, Consolas, monospace; }
.btn-sm { padding: 7px 14px; border-radius: 999px; background: var(--accent); color: #04211c; font-weight: 600; font-size: 13px; white-space: nowrap; }
.menu { background: var(--card); border: 1px solid var(--line); border-radius: 16px; overflow: hidden; margin-bottom: 14px; }
.menu button, .menu a { display: flex; width: 100%; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; color: var(--text); }
.menu > :last-child { border-bottom: 0; }
.menu svg { width: 22px; height: 22px; color: var(--accent); flex: none; }
.menu .lb { flex: 1; }
.menu .rt { color: var(--muted); font-size: 13px; white-space: nowrap; }
.menu .arr { color: var(--muted); }
.badge { display: inline-block; white-space: nowrap; padding: 2px 8px; border-radius: 999px; font-size: 12px; background: var(--card2); color: var(--muted); }
.badge.pending { background: rgba(245,184,74,.15); color: var(--warn); }
.badge.approved { background: rgba(62,224,138,.15); color: var(--ok); }
.badge.rejected { background: rgba(255,93,108,.15); color: var(--danger); }

/* 表单 */
.form label { display: block; font-size: 13px; color: var(--muted); margin: 12px 0 6px; }
.input { width: 100%; height: 46px; border-radius: 12px; border: 1px solid var(--line); background: var(--card2); padding: 0 14px; outline: none; }
.input:focus { border-color: var(--accent); }
.hint { font-size: 12px; color: var(--muted); margin-top: 4px; }
.btn { width: 100%; height: 48px; border-radius: 12px; background: var(--accent); color: #04211c; font-weight: 700; font-size: 16px; margin-top: 18px; }
.btn:disabled { opacity: .5; }
.btn.ghost { background: var(--card2); color: var(--text); border: 1px solid var(--line); }
.btn.danger { background: transparent; color: var(--danger); border: 1px solid var(--line); }
.link { display: block; text-align: center; margin-top: 16px; color: var(--accent); font-size: 14px; }
.amount-row { display: flex; gap: 8px; }
.amount-row .input { flex: 1; }
.amount-row button { padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); color: var(--accent); }

/* 登录页 */
.auth-head { text-align: center; padding: 34px 0 16px; }
.auth-head .logo { width: 64px; height: 64px; }
.auth-head h1 { margin: 10px 0 0; font-size: 22px; }

/* 证件上传 */
.uploads { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.upload { position: relative; aspect-ratio: 1.58; border: 1.5px dashed var(--line); border-radius: 12px; display: grid; place-items: center; overflow: hidden; background: var(--card2); color: var(--muted); font-size: 12px; text-align: center; padding: 6px; }
.upload img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.upload input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.upload .cap { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #fff; padding: 3px; font-size: 11px; }

/* 公告与规则 */
.notice { background: rgba(245,184,74,.09); border: 1px solid rgba(245,184,74,.35); color: #f8d28c; border-radius: 14px; padding: 12px 14px; margin-bottom: 14px; font-size: 13.5px; }
.notice b { display: block; color: var(--warn); margin-bottom: 4px; }
.rules { margin: 0; padding: 0; list-style: none; }
.rules li { display: flex; gap: 8px; padding: 6px 0; font-size: 13.5px; color: var(--muted); }
.rules li .dot { flex: none; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 11px; margin-top: 2px; }
.rules li.done { color: var(--text); }
.rules li.done .dot { background: var(--ok); border-color: var(--ok); color: #04211c; }
.rules li.cur { color: var(--text); }
.rules li.cur .dot { border-color: var(--accent); color: var(--accent); }
.alert { border-radius: 12px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; }
.alert.warn { background: rgba(245,184,74,.1); color: var(--warn); }
.alert.err { background: rgba(255,93,108,.1); color: var(--danger); }
.alert.ok { background: rgba(62,224,138,.1); color: var(--ok); }

/* 列表 */
.list-item { display: flex; justify-content: space-between; align-items: center; padding: 11px 0; border-bottom: 1px solid var(--line); font-size: 14px; gap: 10px; }
.list-item:last-child { border-bottom: 0; }
.empty { color: var(--muted); text-align: center; padding: 18px 0; font-size: 13px; }
.progress { height: 6px; background: var(--card2); border-radius: 3px; overflow: hidden; margin-top: 8px; }
.progress i { display: block; height: 100%; background: var(--accent); }

/* 底部弹层 */
.sheet { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,.5); display: flex; align-items: flex-end; justify-content: center; }
.sheet.hidden { display: none; }
.sheet-in { width: 100%; max-width: 480px; background: var(--card); border-radius: 18px 18px 0 0; padding: 8px 0 calc(10px + var(--safe-b)); }
.sheet-in button { display: flex; width: 100%; padding: 15px 20px; justify-content: space-between; font-size: 16px; }
.sheet-in button.on { color: var(--accent); }
.sheet-in .sheet-title { padding: 12px 20px 6px; color: var(--muted); font-size: 13px; }
.sheet-in .sheet-msg { padding: 16px 20px; font-size: 16px; text-align: center; }
.sheet-in .sheet-btns { display: flex; gap: 10px; padding: 6px 16px 4px; }
.sheet-in .sheet-btns button { justify-content: center; border-radius: 12px; background: var(--card2); padding: 12px; }
.sheet-in .sheet-btns button.primary { background: var(--accent); color: #04211c; font-weight: 700; }

#toast { position: fixed; left: 50%; top: 40%; transform: translate(-50%, -50%); z-index: 60; background: rgba(20,27,48,.96); border: 1px solid var(--line); color: var(--text); padding: 11px 18px; border-radius: 12px; font-size: 14px; max-width: 82%; text-align: center; opacity: 0; pointer-events: none; transition: opacity .2s; }
#toast.show { opacity: 1; }
.center-load { min-height: 70vh; display: grid; place-items: center; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--accent); animation: rot 1s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
#logoutBtn svg { color: var(--danger); }

/* 下载 APP */
.dl-card { display: flex; align-items: center; gap: 12px; background: linear-gradient(135deg, rgba(62,224,197,.14), rgba(91,124,255,.12)); border: 1px solid rgba(62,224,197,.35); border-radius: 16px; padding: 14px 16px; margin-bottom: 14px; color: var(--text); }
.dl-ic { width: 40px; height: 40px; border-radius: 12px; background: var(--accent); color: #04211c; display: grid; place-items: center; flex: none; }
.dl-ic svg { width: 24px; height: 24px; }
.dl-tx { flex: 1; display: flex; flex-direction: column; }
.dl-tx b { font-size: 15px; }
.dl-tx span { color: var(--muted); font-size: 12.5px; }
.dl-go { color: var(--accent); }
.dl-go svg { width: 22px; height: 22px; }
