:root {
  color-scheme: light;
  --ink: #152233;
  --jade: #0e7a62;
  --gold: #a67c2d;
  --bg: #f3f6f8;
  --card: #fff;
  --line: #e4ebf1;
  --muted: #6c7b8a;
  --danger: #b4333c;
  --warn: #9a6408;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: #d5dee7;
  display: flex;
  justify-content: center;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
.boot { width: 100%; display: grid; place-items: center; color: var(--muted); }
.app {
  width: min(430px, 100%);
  height: 100%;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  box-shadow: 0 0 40px rgba(16, 32, 48, .12);
}
.m-top, .tabbar { flex: none; background: white; }
.m-top { padding: 14px 16px 10px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.m-top h1 { margin: 0; font-size: 18px; }
.m-top p { margin: 2px 0 0; color: var(--muted); font-size: 12px; }
.back { width: 36px; height: 36px; border: 0; border-radius: 10px; background: #f3f6f8; }
.m-view { flex: 1; overflow: auto; padding: 12px 12px 18px; }
.tabbar { display: flex; border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabbar button { flex: 1; border: 0; background: transparent; color: var(--muted); padding: 8px 0 10px; font-size: 11px; }
.tabbar button svg { width: 22px; height: 22px; display: block; margin: 0 auto 2px; }
.tabbar button.active { color: var(--jade); font-weight: 650; }
.login-app { padding: 28px 20px; overflow: auto; background:
  radial-gradient(300px 160px at 100% 0%, #f6e7c8, transparent 60%),
  linear-gradient(#f7fbf9, #f3f6f8 40%); }
.login-app h1 { font-family: "Palatino Linotype", "Songti SC", "SimSun", serif; font-size: 40px; margin: 12px 0 8px; }
.mark { width: 48px; height: 48px; border-radius: 14px; background: var(--jade); color: white; display: grid; place-items: center; font-family: "Palatino Linotype", "Songti SC", serif; font-size: 26px; }
.card, .dialog { background: var(--card); border: 1px solid var(--line); border-radius: 16px; }
.card { padding: 14px; margin-bottom: 12px; }
.kpis { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.kpi b { display: block; margin-top: 6px; font-size: 22px; }
.kpi span, .muted, .hint { color: var(--muted); font-size: 12px; }
.row { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.member { display: flex; gap: 10px; align-items: center; width: 100%; text-align: left; border: 0; background: white; }
.avatar { width: 40px; height: 40px; border-radius: 50%; color: white; display: grid; place-items: center; flex: none; }
.badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 12px; background: #eef2f5; }
.st-ok { background: #e5f6f1; color: var(--jade); }
.st-loss { background: #fff1df; color: var(--warn); }
.st-freeze { background: #e7eef8; color: #24548f; }
.st-off { background: #eef1f4; color: #708090; }
.vip { border-radius: 16px; padding: 16px; color: white; min-height: 132px; display: flex; flex-direction: column; justify-content: space-between; margin-bottom: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 10px; }
input, select, textarea { width: 100%; border: 1px solid #d7e0e8; border-radius: 12px; padding: 12px; background: white; font-size: 16px; }
textarea { min-height: 72px; }
.btn { height: 44px; border: 0; border-radius: 12px; padding: 0 14px; background: white; }
.btn.primary { background: var(--jade); color: white; width: 100%; }
.btn.ghost { border: 1px solid #d7e0e8; }
.btn.small { height: 32px; padding: 0 10px; width: auto; font-size: 13px; }
.btn.danger { background: #fdecec; color: var(--danger); }
.btn.warn { background: #fff6e8; color: var(--warn); }
.btn:disabled { opacity: .45; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 10px 0; }
.chips, .seg { display: flex; gap: 8px; overflow: auto; padding-bottom: 4px; }
.chip, .seg button, .scheme { border: 1px solid var(--line); background: white; border-radius: 999px; padding: 8px 12px; white-space: nowrap; }
.chip.on, .scheme.on, .seg button.on { background: #e7f6f1; border-color: var(--jade); color: var(--jade); }
.line { display: flex; justify-content: space-between; gap: 8px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.product { width: 100%; text-align: left; border: 0; background: transparent; padding: 0; }
.warn-text { color: var(--danger); font-size: 13px; }
.ok-text { color: var(--jade); }
h3 { margin: 0 0 8px; font-size: 16px; }
.menu button { width: 100%; text-align: left; border: 0; background: white; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 16px; }
#modal[hidden] { display: none !important; }
#modal { position: fixed; inset: 0; background: rgba(16,28,44,.45); z-index: 30; display: flex; align-items: flex-end; justify-content: center; }
.dialog { width: min(430px, 100%); max-height: 88vh; overflow: auto; border-radius: 18px 18px 0 0; padding: 14px 14px 20px; }
.dialog-hd { display: flex; justify-content: space-between; align-items: center; }
.icon-btn { border: 0; background: transparent; font-size: 24px; }
#toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50; width: min(400px, calc(100% - 24px)); }
.toast { background: #142033; color: white; border-radius: 999px; padding: 10px 14px; margin-bottom: 8px; text-align: center; }
.links { display: flex; gap: 16px; margin-top: 16px; }
.links a { color: var(--jade); text-decoration: none; }
.tag { display: inline-block; margin-right: 6px; padding: 2px 8px; border-radius: 99px; background: #f3f6f8; font-size: 12px; }
@media (max-width: 480px) {
  body { background: var(--bg); }
  .app { box-shadow: none; }
}
