:root {
  --brand: #0a7cff;
  --brand2: #00c6a7;
  --ink: #1a2233;
  --sub: #7b8698;
  --line: #eef1f6;
  --bg: #f5f7fb;
  --card: #ffffff;
  --danger: #ff4d4f;
  --warn: #ff9f1c;
  --ok: #00b578;
  --radius: 16px;
  --shadow: 0 8px 24px rgba(20, 40, 80, 0.07);
}
* { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }
html, body { height: 100%; }
body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); font-size: 15px; line-height: 1.5;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100%; position: relative; background: var(--bg); box-shadow: 0 0 40px rgba(0,0,0,.06); }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 6px;
  height: 52px; padding: 0 12px;
  background: linear-gradient(135deg, var(--brand), var(--brand2));
  color: #fff; box-shadow: 0 2px 10px rgba(10,124,255,.25);
}
.topbar-back { display: none; width: 34px; height: 34px; border: none; background: transparent; color: #fff; font-size: 26px; line-height: 1; cursor: pointer; border-radius: 8px; }
.topbar-title { flex: 1; font-size: 16px; font-weight: 600; text-align: center; }
.topbar-right { width: 60px; font-size: 13px; text-align: right; }
.topbar-right button { background: rgba(255,255,255,.2); border: none; color: #fff; padding: 5px 10px; border-radius: 999px; font-size: 12px; cursor: pointer; }

.view { padding: 14px 14px 90px; }

/* 底部导航 */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 480px; z-index: 50;
  display: flex; background: #fff; border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tabbar a { flex: 1; text-align: center; padding: 8px 0 6px; color: var(--sub); text-decoration: none; font-size: 11px; display: block; }
.tabbar a .ic { display: block; font-size: 20px; line-height: 1.2; }
.tabbar a.on { color: var(--brand); font-weight: 600; }

/* 卡片 */
.card { background: var(--card); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); margin-bottom: 12px; }
.card h3 { font-size: 16px; margin-bottom: 10px; }
.card .sub { color: var(--sub); font-size: 13px; }

/* 按钮 */
.btn { display: inline-flex; align-items: center; justify-content: center; border: none; border-radius: 12px; padding: 12px 16px; font-size: 15px; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn-primary { background: linear-gradient(135deg, var(--brand), var(--brand2)); color: #fff; box-shadow: 0 6px 16px rgba(10,124,255,.28); }
.btn-block { display: flex; width: 100%; }
.btn-ghost { background: #eef4ff; color: var(--brand); }
.btn-danger { background: #fff0f0; color: var(--danger); }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* 表单 */
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.field .req::after { content: " *"; color: var(--danger); }
.input, .select, .textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
  font-size: 15px; background: #fafbfd; color: var(--ink); outline: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); background: #fff; }
.textarea { min-height: 90px; resize: vertical; }
.radio-row { display: flex; flex-wrap: wrap; gap: 8px; }
.radio-pill { padding: 9px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 13px; cursor: pointer; color: var(--sub); background: #fff; }
.radio-pill.on { border-color: var(--brand); color: var(--brand); background: #eef4ff; font-weight: 600; }

/* 列表 */
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.list-item:last-child { border-bottom: none; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .t { font-weight: 600; font-size: 15px; }
.list-item .d { color: var(--sub); font-size: 12px; margin-top: 2px; }

/* 徽标 / 状态 */
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.tag-blue { background: #eef4ff; color: var(--brand); }
.tag-green { background: #e8faf1; color: var(--ok); }
.tag-orange { background: #fff4e6; color: var(--warn); }
.tag-red { background: #fff0f0; color: var(--danger); }
.tag-gray { background: #f0f2f6; color: var(--sub); }

/* 统计网格 */
.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.stat { background: #f7f9fc; border-radius: 12px; padding: 12px 10px; text-align: center; }
.stat .v { font-size: 20px; font-weight: 700; color: var(--brand); }
.stat .k { font-size: 12px; color: var(--sub); margin-top: 2px; }
.stat-grid.cols2 { grid-template-columns: repeat(2, 1fr); }
.stat-grid.cols4 { grid-template-columns: repeat(4, 1fr); }

/* 金额高亮 */
.money { color: #ff7a00; font-weight: 700; }

/* 空状态 */
.empty { text-align: center; color: var(--sub); padding: 48px 20px; font-size: 14px; }
.empty .big { font-size: 44px; margin-bottom: 10px; }

/* 图片上传 */
.img-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.img-cell { position: relative; aspect-ratio: 1; border-radius: 10px; overflow: hidden; background: #f0f2f6; }
.img-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.img-cell .del { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; background: rgba(0,0,0,.55); color: #fff; border: none; cursor: pointer; font-size: 14px; line-height: 1; }
.img-add { aspect-ratio: 1; border: 1px dashed #c8d0dc; border-radius: 10px; color: var(--sub); font-size: 30px; display: flex; align-items: center; justify-content: center; cursor: pointer; background: #fafbfd; }

/* 分享面板 */
.share-panel { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.share-item { text-align: center; padding: 10px 4px; border-radius: 12px; background: #f7f9fc; cursor: pointer; }
.share-item .ic { font-size: 26px; }
.share-item .lb { font-size: 11px; color: var(--sub); margin-top: 4px; }

/* 弹窗 */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal-mask.hidden { display: none; }
.modal-box { background: #fff; border-radius: 16px; width: 100%; max-width: 360px; padding: 20px; }
.modal-box h4 { font-size: 16px; margin-bottom: 12px; }
.modal-box .modal-btns { display: flex; gap: 10px; margin-top: 16px; }
.modal-box .modal-btns .btn { flex: 1; }

/* toast */
.toast { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); background: rgba(0,0,0,.78); color: #fff; padding: 12px 20px; border-radius: 12px; font-size: 14px; z-index: 200; opacity: 0; pointer-events: none; transition: opacity .25s; max-width: 80%; text-align: center; }
.toast.show { opacity: 1; }

/* 分割标题 */
.section-title { font-size: 13px; color: var(--sub); margin: 18px 0 10px; font-weight: 600; }

/* 进度条 */
.progress { height: 8px; background: #eef1f6; border-radius: 999px; overflow: hidden; }
.progress i { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand2)); border-radius: 999px; }

/* 英雄区 */
.hero-card { background: linear-gradient(135deg, #0a7cff, #00c6a7); color: #fff; border-radius: var(--radius); padding: 20px; box-shadow: 0 10px 24px rgba(10,124,255,.3); margin-bottom: 12px; }
.hero-card .money { color: #fff; font-size: 26px; }
.hero-card .lbl { font-size: 12px; opacity: .85; }

/* 步骤/引导 */
.help-tip { background: #fff8e6; color: #8a6d1a; border: 1px solid #ffe8a3; border-radius: 12px; padding: 10px 14px; font-size: 13px; margin-bottom: 12px; }
.help-tip code { background: rgba(0,0,0,.06); padding: 1px 6px; border-radius: 4px; }

@media (min-width: 480px) {
  body { padding: 20px 0; }
  .tabbar { bottom: 20px; }
}
