:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-soft: #eff4ff;
  --bg: #f4f6fb;
  --text: #1f2937;
  --sub: #6b7280;
  --muted: #9aa3b2;
  --line: #eef1f7;
  --green: #059669;
  --amber: #b45309;
  --red: #b91c1c;
  --purple: #7c3aed;
  --radius: 14px;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: #e9edf5;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Helvetica Neue", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--blue); text-decoration: none; }
input, textarea, select, button { font-family: inherit; font-size: 15px; color: inherit; }
img { display: block; max-width: 100%; }

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  background: var(--bg);
  padding-bottom: calc(72px + env(safe-area-inset-bottom));
  position: relative;
}
.app.no-tabbar { padding-bottom: 24px; }

/* ---------- 顶部栏 ---------- */
.hd {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 8px;
  height: 50px;
  padding: 0 12px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.hd-title { font-size: 16px; font-weight: 600; flex: 1; text-align: center; }
.hd-back {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; color: var(--text); margin-left: -4px;
  background: none; border: 0; padding: 0;
}
.hd-right { min-width: 32px; text-align: right; font-size: 13px; color: var(--blue); }

/* ---------- 首页头部 ---------- */
.hero {
  background: linear-gradient(150deg, #3b82f6, #2563eb 60%, #1d4ed8);
  color: #fff;
  padding: 22px 18px 56px;
  border-radius: 0 0 22px 22px;
}
.hero-top { display: flex; align-items: center; justify-content: space-between; }
.hero-name { font-size: 21px; font-weight: 700; letter-spacing: .5px; }
.hero-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.hero-user {
  font-size: 12px; background: rgba(255,255,255,.2);
  padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255,255,255,.35);
}
.hero-stats {
  display: flex; margin: 18px -18px -46px; padding: 14px 6px;
  background: #fff; border-radius: 16px;
  box-shadow: 0 8px 24px rgba(15,23,42,.1);
  margin-left: 18px; margin-right: 18px;
}
.hero-stats .st { flex: 1; text-align: center; position: relative; }
.hero-stats .st + .st::before {
  content: ''; position: absolute; left: 0; top: 6px; bottom: 6px; width: 1px; background: var(--line);
}
.hero-stats .n { font-size: 19px; font-weight: 700; color: var(--blue); display: block; }
.hero-stats .l { font-size: 11px; color: var(--muted); }

/* ---------- 通用容器 ---------- */
.wrap { padding: 14px 14px 0; }
.hero-gap { height: 34px; }

.card {
  background: #fff;
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
  box-shadow: 0 1px 2px rgba(15,23,42,.04);
}
.card.flush { padding: 0; }
.card-title {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 15px; font-weight: 600; margin-bottom: 12px;
}
.card-title .muted { font-weight: 400; }

.row { display: flex; align-items: center; }
.between { display: flex; align-items: center; justify-content: space-between; }
.flex1 { flex: 1; min-width: 0; }
.gap8 > * + * { margin-left: 8px; }
.mt8 { margin-top: 8px; }
.mt12 { margin-top: 12px; }
.mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; }
.mb12 { margin-bottom: 12px; }
.center { text-align: center; }
.muted { color: var(--muted); font-size: 12px; }
.sub { color: var(--sub); font-size: 13px; }
.small { font-size: 12px; }
.bold { font-weight: 600; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pre { white-space: pre-wrap; word-break: break-word; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 18px;
  border-radius: 12px; border: 0;
  background: var(--blue); color: #fff;
  font-size: 15px; font-weight: 500;
  cursor: pointer;
  transition: opacity .15s;
}
.btn:active { opacity: .85; }
.btn[disabled] { opacity: .55; }
.btn-block { display: flex; width: 100%; }
.btn-sm { height: 34px; padding: 0 14px; font-size: 13px; border-radius: 10px; }
.btn-ghost { background: #fff; color: var(--sub); border: 1px solid #e2e8f2; }
.btn-soft { background: var(--blue-soft); color: var(--blue); }
.btn-red { background: #fee2e2; color: var(--red); }
.btn-plain { background: none; color: var(--blue); height: auto; padding: 0; font-size: 13px; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-block; padding: 2px 8px; border-radius: 6px;
  font-size: 11px; line-height: 18px; background: #f1f3f8; color: #5b6474;
}
.tag-blue { background: #e0ecff; color: var(--blue); }
.tag-green { background: #e7f8ef; color: var(--green); }
.tag-amber { background: #fef3c7; color: var(--amber); }
.tag-red { background: #fee2e2; color: var(--red); }
.tag-purple { background: #f1eaff; color: var(--purple); }
.tag-gray { background: #f1f3f8; color: #5b6474; }

/* ---------- 表单 ---------- */
.field { margin-bottom: 14px; }
.field > label { display: block; font-size: 13px; color: var(--sub); margin-bottom: 6px; }
.field .req { color: #ef4444; margin-left: 2px; }
.input, .textarea, select.input {
  width: 100%; padding: 11px 12px;
  background: #f8fafc; border: 1px solid #e6ebf3; border-radius: 10px;
  outline: none; transition: border-color .15s;
}
.input:focus, .textarea:focus { border-color: var(--blue); background: #fff; }
.textarea { min-height: 110px; resize: vertical; line-height: 1.7; }
.hint { font-size: 11px; color: var(--muted); margin-top: 5px; line-height: 1.6; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 6px 14px; border-radius: 999px;
  background: #f1f4f9; color: #5b6474; font-size: 13px;
  border: 1px solid transparent; cursor: pointer;
}
.chip.active { background: var(--blue-soft); color: var(--blue); border-color: #c7dbff; font-weight: 500; }

.tabs { display: flex; background: #fff; border-radius: 12px; padding: 4px; margin-bottom: 12px; }
.tabs .tab {
  flex: 1; text-align: center; padding: 8px 4px; border-radius: 9px;
  font-size: 14px; color: var(--sub); cursor: pointer;
}
.tabs .tab.active { background: var(--blue-soft); color: var(--blue); font-weight: 600; }

/* ---------- 列表 ---------- */
.list-item { background: #fff; border-radius: var(--radius); padding: 14px; margin-bottom: 10px; }
.list-item .t { font-size: 15px; font-weight: 600; line-height: 1.5; margin: 8px 0 6px; }
.list-item .sum { font-size: 13px; color: var(--sub); line-height: 1.6; }
.meta { font-size: 12px; color: var(--muted); display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.meta .dot { color: #cbd5e1; }

.progress { height: 7px; background: #eef1f7; border-radius: 999px; overflow: hidden; }
.progress-inner { height: 100%; background: linear-gradient(90deg, #93c5fd, #2563eb); border-radius: 999px; }

.empty { text-align: center; padding: 56px 0; color: var(--muted); }
.empty .ico { font-size: 34px; margin-bottom: 8px; }

/* ---------- 附件 ---------- */
.attach-grid { display: flex; flex-wrap: wrap; gap: 8px; }
.attach-grid img { width: 88px; height: 88px; object-fit: cover; border-radius: 8px; background: #f1f4f9; }
.file-row {
  display: flex; align-items: center; gap: 8px;
  background: #f8fafc; border-radius: 10px; padding: 10px 12px; margin-top: 8px;
  font-size: 13px; color: var(--sub);
}
.file-row .nm { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upload-box {
  width: 88px; height: 88px; border-radius: 8px;
  border: 1px dashed #cbd5e1; background: #fbfcfe;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: var(--muted); font-size: 11px; gap: 2px; cursor: pointer;
}
.upload-box .plus { font-size: 20px; line-height: 1; }
.thumb { position: relative; width: 88px; height: 88px; }
.thumb img { width: 88px; height: 88px; border-radius: 8px; object-fit: cover; }
.thumb .del {
  position: absolute; top: -6px; right: -6px;
  width: 20px; height: 20px; border-radius: 50%;
  background: rgba(17,24,39,.75); color: #fff;
  font-size: 13px; line-height: 20px; text-align: center;
}

/* ---------- 步骤 ---------- */
.steps { display: flex; align-items: flex-start; }
.step { flex: 1; text-align: center; position: relative; }
.step .dotbox {
  width: 18px; height: 18px; border-radius: 50%; margin: 0 auto 6px;
  background: #e5eaf2; color: #fff; font-size: 11px; line-height: 18px;
}
.step.done .dotbox { background: var(--blue); }
.step .txt { font-size: 11px; color: var(--muted); }
.step.done .txt { color: var(--blue); }

/* ---------- 评分 ---------- */
.stars { display: flex; align-items: center; }
.star { font-size: 26px; color: #e2e8f0; cursor: pointer; padding-right: 2px; }
.star.on { color: #f59e0b; }

/* ---------- 图表 ---------- */
.chart-row { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.chart-label { width: 96px; font-size: 12px; color: var(--sub); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chart-bar { flex: 1; height: 9px; background: #eef1f7; border-radius: 999px; overflow: hidden; }
.chart-inner { height: 100%; background: linear-gradient(90deg, #93c5fd, #2563eb); }
.chart-val { width: 52px; text-align: right; font-size: 12px; color: var(--sub); }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px;
  display: flex;
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
  z-index: 50;
  backdrop-filter: blur(8px);
}
.tabbar.hidden { display: none; }
.tabbar .item {
  flex: 1; text-align: center; padding: 8px 0 7px;
  color: #98a1b0; font-size: 11px;
}
.tabbar .item .ico { display: block; font-size: 19px; line-height: 1.25; }
.tabbar .item.active { color: var(--blue); font-weight: 600; }

/* ---------- 悬浮按钮 ---------- */
.fab {
  position: fixed; right: 16px;
  bottom: calc(84px + env(safe-area-inset-bottom));
  height: 44px; padding: 0 18px; border-radius: 999px;
  background: var(--blue); color: #fff; font-size: 14px; font-weight: 500;
  display: flex; align-items: center; gap: 4px;
  box-shadow: 0 8px 20px rgba(37,99,235,.35);
  border: 0; z-index: 40;
}

/* ---------- 底部操作条 ---------- */
.footer-bar {
  position: fixed; bottom: 0; left: 50%; transform: translateX(-50%);
  width: 100%; max-width: 560px;
  display: flex; gap: 10px;
  padding: 10px 14px calc(10px + env(safe-area-inset-bottom));
  background: #fff; border-top: 1px solid var(--line);
  z-index: 45;
}

/* ---------- Toast / 加载 / 弹窗 ---------- */
.toast {
  position: fixed; left: 50%; top: 50%;
  transform: translate(-50%, -50%) scale(.96);
  max-width: 76%; padding: 11px 18px;
  background: rgba(17,24,39,.88); color: #fff;
  border-radius: 10px; font-size: 14px; line-height: 1.6;
  opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s;
  z-index: 200; text-align: center;
}
.toast.show { opacity: 1; transform: translate(-50%, -50%) scale(1); }

.loading-mask {
  position: fixed; inset: 0; display: none;
  align-items: center; justify-content: center;
  background: rgba(255,255,255,.55); z-index: 150;
}
.loading-mask.show { display: flex; }
.spinner {
  width: 30px; height: 30px; border-radius: 50%;
  border: 3px solid #dbeafe; border-top-color: var(--blue);
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

.modal-mask {
  position: fixed; inset: 0; background: rgba(17,24,39,.45);
  display: flex; align-items: center; justify-content: center;
  padding: 24px; z-index: 180;
}
.modal-box {
  width: 100%; max-width: 320px; background: #fff;
  border-radius: 14px; padding: 20px; text-align: center;
}
.modal-box h3 { margin: 0 0 8px; font-size: 16px; }
.modal-box p { margin: 0 0 16px; font-size: 13px; color: var(--sub); line-height: 1.7; }
.modal-actions { display: flex; gap: 10px; }
.modal-actions .btn { flex: 1; height: 40px; font-size: 14px; }

/* ---------- 首页入口 ---------- */
.entry-grid { display: flex; flex-wrap: wrap; }
.entry {
  width: 33.333%; text-align: center; padding: 10px 0; cursor: pointer;
}
.entry .ico {
  width: 46px; height: 46px; margin: 0 auto 6px;
  border-radius: 14px; display: flex; align-items: center; justify-content: center;
  font-size: 21px; background: var(--blue-soft);
}
.entry .nm { font-size: 12px; color: var(--text); }
.entry:nth-child(1) .ico { background: #e0ecff; }
.entry:nth-child(2) .ico { background: #fef3c7; }
.entry:nth-child(3) .ico { background: #ede9fe; }
.entry:nth-child(4) .ico { background: #dcfce7; }
.entry:nth-child(5) .ico { background: #fee2e2; }

.notice-scroll { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 2px; }
.notice-scroll::-webkit-scrollbar { display: none; }
.notice-scroll .n-item {
  flex: 0 0 78%; scroll-snap-align: start;
  background: #f8fafc; border-radius: 12px; padding: 12px 14px;
  border-left: 3px solid #bfdbfe; cursor: pointer;
}
.notice-scroll .n-item .nt { font-size: 13px; line-height: 1.5; height: 38px; overflow: hidden; }

.disclaimer { background: #fffbeb; border-radius: 12px; padding: 12px 14px; font-size: 12px; color: var(--amber); line-height: 1.75; }
.disclaimer .more { display: none; }
.disclaimer.open .more { display: block; }
.disclaimer .toggle { color: var(--blue); margin-left: 4px; cursor: pointer; }

/* ---------- 我的 ---------- */
.mine-hd {
  background: linear-gradient(150deg, #3b82f6, #2563eb 60%, #1d4ed8);
  color: #fff; padding: 24px 18px 66px; border-radius: 0 0 22px 22px;
  display: flex; align-items: center; gap: 12px;
}
.mine-avatar {
  width: 54px; height: 54px; border-radius: 50%;
  background: rgba(255,255,255,.22); border: 1px solid rgba(255,255,255,.5);
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 600;
}
.mine-name { font-size: 17px; font-weight: 600; }
.mine-sub { font-size: 12px; opacity: .85; margin-top: 2px; }
.mine-stats {
  display: flex; margin: -50px 14px 0; background: #fff; border-radius: 14px;
  padding: 14px 4px; box-shadow: 0 8px 24px rgba(15,23,42,.1);
}
.mine-stats .st { flex: 1; text-align: center; }
.mine-stats .n { display: block; font-size: 18px; font-weight: 700; color: var(--blue); }
.mine-stats .l { font-size: 11px; color: var(--muted); }

.menu-item {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 4px; border-bottom: 1px solid var(--line);
  font-size: 14px; cursor: pointer;
}
.menu-item:last-child { border-bottom: 0; }
.menu-item .ic { width: 20px; text-align: center; }
.menu-item .ar { color: #c3cbd8; font-size: 16px; }

.agree-row { display: flex; align-items: flex-start; gap: 8px; font-size: 12px; color: var(--sub); line-height: 1.7; }
.agree-row input { margin-top: 2px; }

.auth-box { text-align: center; padding: 18px 0; }
.auth-box .ico { font-size: 40px; }
.auth-box .t { font-size: 16px; font-weight: 600; margin: 8px 0 4px; }

@media (min-width: 600px) {
  body { padding: 18px 0; }
  .app { border-radius: 18px; overflow: hidden; box-shadow: 0 10px 40px rgba(15,23,42,.12); }
  .tabbar, .footer-bar { bottom: 0; }
}
