/* v2 极简版：白底 + 大数字 + 一行行流水，学微信记账本 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: #f7f7f7; color: #1a1a1a; font-size: 15px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
#app { max-width: 480px; margin: 0 auto; min-height: 100vh; background: #f7f7f7; padding-bottom: 72px; }
.boot { padding: 60px 0; text-align: center; color: #b0b0b0; font-size: 14px; }
button, input, select, textarea { font-family: inherit; font-size: 15px; }

/* ---------- 顶部 ---------- */
.top {
  position: sticky; top: 0; z-index: 20; background: #fff;
  border-bottom: 0.5px solid #ededed;
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; padding-top: calc(12px + env(safe-area-inset-top));
}
.top h1 { font-size: 17px; font-weight: 500; margin: 0; flex: 1; }
.top .back { font-size: 22px; color: #1a1a1a; width: 24px; margin-left: -4px; cursor: pointer; line-height: 1; }
.top .act { color: #07c160; font-size: 15px; cursor: pointer; }
.top .act.gray { color: #9a9a9a; }

/* ---------- 大数字卡 ---------- */
.hero { background: #fff; padding: 20px 16px 22px; }
.hero .lbl { font-size: 13px; color: #9a9a9a; }
.hero .num { font-size: 40px; font-weight: 500; letter-spacing: -1px; line-height: 1.15; margin-top: 2px; }
.hero .num small { font-size: 15px; font-weight: 400; color: #9a9a9a; margin-left: 4px; letter-spacing: 0; }
.hero .sub { font-size: 13px; color: #9a9a9a; margin-top: 4px; }
.hero .sub b { color: #1a1a1a; font-weight: 500; }

/* ---------- 列表 ---------- */
.sec { margin-top: 10px; background: #fff; }
.sec-h { font-size: 12px; color: #9a9a9a; padding: 14px 16px 6px; background: #f7f7f7; }
.row { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 0.5px solid #f0f0f0; cursor: pointer; }
.row:last-child { border-bottom: 0; }
.row:active { background: #fafafa; }
.av { width: 38px; height: 38px; border-radius: 50%; background: #eef7f1; color: #07874a; display: flex; align-items: center; justify-content: center; font-size: 15px; flex: none; }
.row .mid { flex: 1; min-width: 0; }
.row .nm { font-size: 16px; }
.row .ds { font-size: 12px; color: #9a9a9a; margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.row .rt { flex: none; text-align: right; }
.row .rt .v { font-size: 17px; font-weight: 500; }
.row .rt .v.zero { color: #d9534f; }
.row .rt .k { font-size: 11px; color: #9a9a9a; }
.arw { color: #d0d0d0; font-size: 16px; flex: none; }

/* ---------- 详情三数 ---------- */
.trio { display: flex; background: #fff; padding: 18px 0; }
.trio > div { flex: 1; text-align: center; }
.trio .n { font-size: 26px; font-weight: 500; letter-spacing: -0.5px; }
.trio .n.ok { color: #07c160; }
.trio .n.bad { color: #e64340; }
.trio .k { font-size: 12px; color: #9a9a9a; margin-top: 2px; }

/* ---------- 操作按钮 ---------- */
.ops { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px; background: #f7f7f7; }
.op { background: #fff; border-radius: 12px; padding: 15px 12px; text-align: center; font-size: 15px; border: 0; cursor: pointer; color: #1a1a1a; }
.op:active { background: #f2f2f2; }
.op.danger { color: #e64340; }
.op b { display: block; font-weight: 500; }
.op span { display: block; font-size: 11px; color: #9a9a9a; margin-top: 2px; }

/* ---------- 流水 ---------- */
.day { font-size: 12px; color: #9a9a9a; padding: 16px 16px 6px; background: #f7f7f7; }
.ls { display: flex; align-items: center; gap: 12px; padding: 13px 16px; background: #fff; border-bottom: 0.5px solid #f0f0f0; cursor: pointer; }
.ls:last-child { border-bottom: 0; }
.ls .tm { font-size: 15px; font-weight: 500; width: 46px; flex: none; }
.ls .body { flex: 1; min-width: 0; }
.ls .sj { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ls .who { font-size: 12px; color: #9a9a9a; margin-top: 1px; }
.tag { font-size: 12px; padding: 2px 8px; border-radius: 10px; flex: none; }
.tag.done { background: #eef7f1; color: #07874a; }
.tag.planned { background: #eef3fd; color: #2f6fd0; }
.tag.cancel { background: #f2f2f2; color: #9a9a9a; }

/* ---------- 表单 ---------- */
.form { background: #fff; margin-top: 10px; }
.fld { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 0.5px solid #f0f0f0; }
.fld:last-child { border-bottom: 0; }
.fld label { width: 88px; flex: none; font-size: 15px; color: #1a1a1a; }
.fld input, .fld select, .fld textarea {
  flex: 1; border: 0; outline: 0; padding: 4px 0; background: transparent; font-size: 15px; color: #1a1a1a;
  text-align: right; width: 100%; min-width: 0;
}
.fld input::placeholder { color: #c8c8c8; }
.fld .hint { font-size: 12px; color: #9a9a9a; }
.fld.col { flex-direction: column; align-items: stretch; gap: 6px; }
.fld.col input, .fld.col textarea { text-align: left; }
.btn {
  display: block; width: calc(100% - 32px); margin: 16px auto 0; padding: 14px;
  background: #07c160; color: #fff; border: 0; border-radius: 12px; font-size: 16px; font-weight: 500; cursor: pointer;
}
.btn:active { opacity: .85; }
.btn.ghost { background: #fff; color: #1a1a1a; border: 0.5px solid #e0e0e0; }
.btn.danger { background: #fff; color: #e64340; border: 0.5px solid #f0d4d4; }
.btn[disabled] { opacity: .5; }
.tip { font-size: 12px; color: #9a9a9a; padding: 10px 16px 0; line-height: 1.6; }
.tip b { color: #1a1a1a; font-weight: 500; }

/* ---------- 日历 ---------- */
.cal { background: #fff; padding: 4px 10px 14px; }
.cal-h { display: flex; align-items: center; justify-content: center; gap: 22px; padding: 12px 0 8px; }
.cal-h .m { font-size: 16px; font-weight: 500; min-width: 110px; text-align: center; }
.cal-h .nb { width: 32px; height: 32px; display: flex; align-items: center; justify-content: center; color: #9a9a9a; font-size: 18px; cursor: pointer; }
.cal-w { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; font-size: 12px; color: #b0b0b0; padding-bottom: 6px; }
.cal-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.cd { aspect-ratio: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 10px; font-size: 15px; cursor: pointer; position: relative; color: #1a1a1a; }
.cd.blank { cursor: default; }
.cd.past { color: #c8c8c8; }
.cd.sel { background: #07c160; color: #fff; }
.cd.today .d { font-weight: 500; }
.cd .dot { width: 4px; height: 4px; border-radius: 50%; background: #07c160; margin-top: 2px; }
.cd.sel .dot { background: #fff; }
.cd.past .dot { background: #d8d8d8; }

/* ---------- 底部导航 ---------- */
.tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  background: #fff; border-top: 0.5px solid #ededed;
  display: flex; padding-bottom: env(safe-area-inset-bottom);
  max-width: 480px; margin: 0 auto;
}
.tabbar a { flex: 1; text-align: center; padding: 9px 0 10px; font-size: 11px; color: #9a9a9a; text-decoration: none; }
.tabbar a.on { color: #07c160; }
.tabbar .ic { display: block; font-size: 18px; line-height: 1.2; }

/* ---------- 登录 ---------- */
.login { padding: 56px 24px 24px; }
.login h2 { font-size: 24px; font-weight: 500; margin: 0 0 6px; }
.login p.sub { font-size: 13px; color: #9a9a9a; margin: 0 0 32px; }
.login .fld { border-bottom: 0.5px solid #f0f0f0; border-radius: 0; padding-left: 0; padding-right: 0; }
.login .fld label { width: 74px; }
.tabs2 { display: flex; gap: 8px; margin-bottom: 20px; }
.tabs2 button {
  flex: 1; padding: 9px; border-radius: 10px; border: 0; background: #f2f2f2; color: #666; font-size: 14px; cursor: pointer;
}
.tabs2 button.on { background: #eef7f1; color: #07874a; font-weight: 500; }
.roles { display: flex; gap: 8px; padding: 12px 0; }
.roles button { flex: 1; padding: 11px 4px; border-radius: 10px; border: 0.5px solid #e5e5e5; background: #fff; font-size: 14px; cursor: pointer; color: #666; }
.roles button.on { border-color: #07c160; color: #07874a; background: #eef7f1; }

/* ---------- toast / 弹层 ---------- */
.toast {
  position: fixed; left: 50%; bottom: 88px; transform: translateX(-50%) translateY(12px);
  background: rgba(0,0,0,.82); color: #fff; font-size: 14px; padding: 10px 16px; border-radius: 10px;
  opacity: 0; pointer-events: none; transition: .22s; z-index: 60; max-width: 80vw; text-align: center;
}
.toast.on { opacity: 1; transform: translateX(-50%) translateY(0); }
.mask { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 50; display: flex; align-items: flex-end; }
.mask .panel { background: #fff; width: 100%; max-width: 480px; margin: 0 auto; border-radius: 16px 16px 0 0; padding: 8px 0 calc(12px + env(safe-area-inset-bottom)); max-height: 76vh; overflow: auto; }
.mask .panel .t { font-size: 13px; color: #9a9a9a; text-align: center; padding: 14px; }
.mask .opt { padding: 15px 20px; font-size: 16px; border-bottom: 0.5px solid #f2f2f2; cursor: pointer; }
.mask .opt:active { background: #fafafa; }
.mask .opt.cancel { color: #9a9a9a; border-top: 6px solid #f7f7f7; border-bottom: 0; text-align: center; }
.empty { text-align: center; color: #b0b0b0; font-size: 14px; padding: 48px 20px; }
.bar { position: sticky; bottom: 0; background: #fff; border-top: 0.5px solid #ededed; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
.bar .sum { font-size: 13px; color: #9a9a9a; margin-bottom: 8px; text-align: center; }
.bar .sum b { color: #07874a; font-weight: 500; }

/* ---------- 三个按钮并排 ---------- */
.ops3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 14px 12px; background: #f7f7f7; }
.ops3 .op { padding: 12px 4px; border-radius: 12px; background: #fff; border: 0; font-size: 15px; text-align: center; cursor: pointer; color: #1a1a1a; }
.ops3 .op:active { background: #f2f2f2; }
.ops3 .op span { display: block; font-size: 10px; color: #9a9a9a; margin-top: 2px; }
.ops3 .op b { font-weight: 500; }

/* ---------- 双月日历 ---------- */
.cal-head { display: flex; align-items: center; justify-content: center; gap: 20px; padding: 14px 0 8px; background: #fff; }
.cal-head .ttl { font-size: 14px; font-weight: 500; }
.cal-head .nb { width: 34px; height: 34px; display: flex; align-items: center; justify-content: center; color: #9a9a9a; font-size: 19px; cursor: pointer; }
.m2 { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; padding: 0 6px 14px; background: #fff; }
.mm { min-width: 0; }
.mm-t { font-size: 12px; color: #9a9a9a; text-align: center; padding: 8px 0 5px; }
.mm-w { display: grid; grid-template-columns: repeat(7, 1fr); font-size: 9px; color: #c4c4c4; text-align: center; padding-bottom: 3px; }
.mm-g { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.mc { min-height: 33px; display: flex; flex-direction: column; align-items: center; justify-content: center; border-radius: 6px; font-size: 13px; line-height: 1.05; }
.mc .dm { font-size: 8px; color: #07874a; line-height: 1.25; }
.mc.has { background: #eef7f1; cursor: pointer; }
.mc.has .dn { color: #07874a; font-weight: 500; }
.mc.pastb { opacity: .5; }
.mc.now { outline: 1px solid #07c160; }
