* { margin: 0; padding: 0; box-sizing: border-box; }
:root {
  --primary: #ff6b35;
  --primary-light: #fff1eb;
  --success: #07c160;
  --danger: #fa5151;
  --warning: #ff9500;
  --text: #1a1a1a;
  --text-2: #666;
  --text-3: #999;
  --bg: #f5f6f8;
  --card: #fff;
  --border: #eee;
}
body { font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif; background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; font-family: inherit; border: none; }
input, textarea, select { font-family: inherit; outline: none; }

.app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: var(--bg); padding-bottom: 70px; }

/* 顶部栏 */
.header { background: linear-gradient(135deg, #ff6b35, #ff8f5e); color: #fff; padding: 20px 16px; }
.header .site-name { font-size: 20px; font-weight: 700; display: flex; align-items: center; gap: 8px; }
.header .site-name::before { content: '💰'; }
.header .user-line { margin-top: 8px; font-size: 13px; opacity: 0.9; display: flex; justify-content: space-between; }

/* 余额卡片 */
.balance-card { background: var(--card); margin: -30px 16px 12px; border-radius: 16px; padding: 20px; box-shadow: 0 4px 20px rgba(0,0,0,0.06); }
.balance-card .label { color: var(--text-3); font-size: 13px; }
.balance-card .amount { font-size: 36px; font-weight: 700; color: var(--primary); margin: 8px 0; }
.balance-card .amount small { font-size: 16px; font-weight: 400; margin-left: 2px; }
.balance-card .stats { display: flex; justify-content: space-between; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }
.balance-card .stat { text-align: center; flex: 1; }
.balance-card .stat .num { font-size: 18px; font-weight: 700; color: var(--text); }
.balance-card .stat .l { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.balance-card .withdraw-btn { display: block; width: 100%; margin-top: 14px; background: var(--primary); color: #fff; border-radius: 24px; padding: 10px; font-size: 15px; font-weight: 600; }

/* 通用卡片 */
.card { background: var(--card); margin: 12px 16px; border-radius: 12px; padding: 16px; }
.card-title { font-size: 16px; font-weight: 700; margin-bottom: 12px; display: flex; align-items: center; justify-content: space-between; }
.card-title .more { font-size: 12px; color: var(--text-3); font-weight: 400; }

/* 任务分类 */
.task-cat { margin-bottom: 16px; }
.task-cat .cat-title { font-size: 14px; color: var(--text-2); font-weight: 600; margin-bottom: 8px; padding-left: 4px; }
.task-item { display: flex; align-items: center; padding: 12px; background: #fafafa; border-radius: 10px; margin-bottom: 8px; }
.task-item .info { flex: 1; min-width: 0; }
.task-item .title { font-size: 15px; font-weight: 600; }
.task-item .desc { font-size: 12px; color: var(--text-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.task-item .platform { display: inline-block; font-size: 11px; color: var(--primary); background: var(--primary-light); padding: 1px 6px; border-radius: 4px; margin-top: 4px; }
.task-item .reward { color: var(--primary); font-weight: 700; font-size: 16px; margin-right: 10px; text-align: right; }
.task-item .reward small { font-size: 11px; color: var(--text-3); font-weight: 400; }
.task-item .action { background: var(--primary); color: #fff; border-radius: 16px; padding: 6px 14px; font-size: 13px; font-weight: 600; }
.task-item .action.done { background: #e5e5e5; color: #999; }

/* 进度条 */
.progress { background: #f0f0f0; border-radius: 10px; height: 8px; overflow: hidden; margin: 8px 0; }
.progress .bar { background: linear-gradient(90deg, #ff6b35, #ffb199); height: 100%; border-radius: 10px; }

/* 底部导航 */
.tabbar { position: fixed; bottom: 0; left: 50%; transform: translateX(-50%); width: 100%; max-width: 480px; background: #fff; display: flex; border-top: 1px solid var(--border); z-index: 100; }
.tabbar .tab { flex: 1; text-align: center; padding: 8px 0; color: var(--text-3); font-size: 11px; }
.tabbar .tab .icon { font-size: 22px; display: block; margin-bottom: 2px; }
.tabbar .tab.active { color: var(--primary); }

/* 页面切换 */
.page { display: none; }
.page.active { display: block; }

/* 表单 */
.form-item { margin-bottom: 14px; }
.form-item label { display: block; font-size: 13px; color: var(--text-2); margin-bottom: 6px; }
.form-item input, .form-item textarea, .form-item select {
  width: 100%; border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; font-size: 14px; background: #fafafa;
}
.form-item input:focus, .form-item textarea:focus { border-color: var(--primary); background: #fff; }
.btn-primary { width: 100%; background: var(--primary); color: #fff; border-radius: 24px; padding: 12px; font-size: 15px; font-weight: 600; }
.btn-primary:disabled { opacity: 0.6; }
.btn-ghost { background: #f5f5f5; color: var(--text-2); border-radius: 24px; padding: 12px; font-size: 15px; }

/* 列表项 */
.list-item { display: flex; justify-content: space-between; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--border); }
.list-item:last-child { border-bottom: none; }
.list-item .left { flex: 1; }
.list-item .title { font-size: 14px; font-weight: 600; }
.list-item .sub { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.list-item .right { text-align: right; }
.list-item .amount { font-size: 15px; font-weight: 700; }
.list-item .amount.plus { color: var(--success); }
.list-item .amount.minus { color: var(--danger); }

/* 状态标签 */
.tag { display: inline-block; padding: 2px 8px; border-radius: 4px; font-size: 11px; }
.tag.pending { background: #fff4e5; color: var(--warning); }
.tag.approved { background: #e8f8ee; color: var(--success); }
.tag.rejected { background: #ffeaea; color: var(--danger); }

/* 登录页 */
.auth-page { min-height: 100vh; background: linear-gradient(160deg, #fff1eb, #fff); padding: 40px 24px; display: flex; flex-direction: column; justify-content: center; }
.auth-page .logo { text-align: center; font-size: 48px; margin-bottom: 8px; }
.auth-page .site-title { text-align: center; font-size: 26px; font-weight: 700; color: var(--primary); margin-bottom: 32px; }
.auth-page .auth-tabs { display: flex; background: #f5f5f5; border-radius: 24px; padding: 4px; margin-bottom: 24px; }
.auth-page .auth-tabs div { flex: 1; text-align: center; padding: 10px; border-radius: 20px; font-weight: 600; color: var(--text-3); }
.auth-page .auth-tabs div.active { background: #fff; color: var(--primary); box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.auth-page .tip { text-align: center; font-size: 12px; color: var(--text-3); margin-top: 16px; }

/* 弹窗 */
.mask { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 200; display: none; align-items: center; justify-content: center; padding: 24px; }
.mask.show { display: flex; }
.modal { background: #fff; border-radius: 16px; width: 100%; max-width: 360px; padding: 20px; max-height: 80vh; overflow-y: auto; }
.modal h3 { font-size: 17px; margin-bottom: 16px; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions button { flex: 1; }

/* 邀请码展示 */
.invite-box { background: var(--primary-light); border-radius: 12px; padding: 20px; text-align: center; }
.invite-box .code { font-size: 28px; font-weight: 800; color: var(--primary); letter-spacing: 4px; margin: 8px 0; }
.invite-box .btn { background: var(--primary); color: #fff; border-radius: 20px; padding: 8px 24px; font-size: 13px; }

/* Toast */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,0.8); color: #fff; padding: 10px 20px; border-radius: 8px; z-index: 999; font-size: 14px; }

/* 头像 */
.avatar { width: 56px; height: 56px; border-radius: 50%; background: var(--primary-light); color: var(--primary); display: flex; align-items: center; justify-content: center; font-size: 22px; font-weight: 700; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }

/* 空状态 */
.empty { text-align: center; padding: 40px 20px; color: var(--text-3); }
.empty .ico { font-size: 48px; margin-bottom: 12px; }
