/* ============================================================
   两个人的账本 — 设计系统
   暖白底、金色金库、墨绿点缀。存款是主角，其余都是配角。
   ============================================================ */

:root {
  --bg: #F7F6F3;
  --surface: #FFFFFF;
  --surface-2: #FBFAF7;
  --ink: #1B1F27;
  --ink-2: #4A5160;
  --muted: #8B8F9A;
  --faint: #B6B9C2;
  --line: #EFEDE8;
  --line-2: #E3E0D8;

  --vault: #B8862B;
  --vault-2: #D9A93F;
  --vault-soft: #FBF3E2;
  --vault-deep: #8A6420;

  --income: #2E9E6B;
  --income-soft: #E6F5EE;
  --trip: #6C7CF6;
  --trip-soft: #EDEFFE;
  --danger: #D9534F;

  --r-xs: 10px;
  --r-sm: 14px;
  --r-md: 18px;
  --r-lg: 22px;
  --r-xl: 28px;

  --sh-sm: 0 1px 2px rgba(27, 31, 39, .05);
  --sh: 0 2px 10px -3px rgba(27, 31, 39, .09);
  --sh-lg: 0 16px 40px -18px rgba(27, 31, 39, .24);
  --sh-float: 0 10px 30px -10px rgba(27, 31, 39, .20);

  --ease: cubic-bezier(.22, 1, .36, 1);
  --spring: cubic-bezier(.34, 1.3, .64, 1);

  --tab-h: 60px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "HarmonyOS Sans SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body { min-height: 100vh; }
button, input, textarea, select { font: inherit; color: inherit; }
button { border: 0; background: none; cursor: pointer; padding: 0; }
a { color: inherit; text-decoration: none; }

.num {
  font-family: "SF Pro Display", "DIN Alternate", "Bahnschrift", "HarmonyOS Sans",
               ui-monospace, "PingFang SC", sans-serif;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.app {
  max-width: 560px;
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + 20px);
  position: relative;
  z-index: 1;
}

/* ---------------- 顶栏 ---------------- */

.topbar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: calc(var(--safe-t) + 16px) 18px 6px;
}
.brand { display: flex; align-items: center; gap: 9px; min-width: 0; }
.brand-title { font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.brand-sub { font-size: 11.5px; color: var(--muted); }

.avatars { display: flex; }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: grid; place-items: center;
  font-size: 14px;
  background: var(--surface);
  box-shadow: 0 0 0 2px var(--surface), var(--sh-sm);
  transition: transform .3s var(--spring), opacity .25s;
}
.avatars .avatar + .avatar { margin-left: -8px; }
.avatars .avatar.is-active { transform: translateY(-1px) scale(1.07); z-index: 2; }
.avatars .avatar:not(.is-active) { opacity: .55; }

.topbar-spacer { flex: 1; }

.icon-btn {
  width: 34px; height: 34px;
  border-radius: 11px;
  display: grid; place-items: center;
  color: var(--ink-2);
  background: var(--surface);
  box-shadow: var(--sh-sm);
  transition: transform .2s var(--ease);
}
.icon-btn:active { transform: scale(.92); }
.icon-btn svg { width: 17px; height: 17px; }

.view { padding: 6px 18px 8px; }

/* ---------------- 金库卡 ---------------- */

.vault {
  position: relative;
  border-radius: var(--r-xl);
  background:
    radial-gradient(120% 90% at 50% 0%, #FDF6E7 0%, rgba(253, 246, 231, 0) 62%),
    var(--surface);
  box-shadow: var(--sh-lg);
  padding: 20px 20px 18px;
  text-align: center;
  overflow: hidden;
}
.vault::after {
  content: "";
  position: absolute;
  left: 20px; right: 20px; top: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(184, 134, 43, .35), transparent);
}

.vault-label {
  font-size: 11.5px; color: var(--muted);
  letter-spacing: .04em;
}

.ring-wrap {
  position: relative;
  width: 188px; height: 188px;
  margin: 8px auto 2px;
}
.ring { transform: rotate(-90deg); }
.ring circle { fill: none; stroke-linecap: round; }
.ring .track { stroke: #F0EBE0; }
.ring .bar { stroke: url(#vaultGrad); transition: stroke-dashoffset .9s var(--ease); }

.ring-inner {
  position: absolute; inset: 0;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
}
.ring-amount {
  display: flex; align-items: baseline; gap: 2px;
  font-size: 30px; font-weight: 600; letter-spacing: -.03em;
  color: var(--ink);
}
.ring-amount .cur { font-size: 15px; font-weight: 500; color: var(--vault); margin-right: 1px; }
.ring-amount .dec { font-size: 16px; font-weight: 500; color: var(--muted); }
.ring-sub { font-size: 11.5px; color: var(--vault); margin-top: 4px; font-weight: 500; }

.vault-goal {
  font-size: 11.5px; color: var(--muted);
  margin-top: 2px;
}
.vault-goal b { color: var(--ink-2); font-weight: 500; }

.vault-split {
  display: flex; gap: 10px;
  margin-top: 14px; padding-top: 14px;
  border-top: 1px solid var(--line);
}
.vault-person {
  flex: 1;
  display: flex; align-items: center; gap: 8px;
}
.vault-person .avatar { width: 26px; height: 26px; font-size: 12px; }
.vault-person-body { text-align: left; min-width: 0; }
.vault-person-name { font-size: 11px; color: var(--muted); }
.vault-person-val { font-size: 14px; font-weight: 500; letter-spacing: -.01em; }

/* ---------------- 今日打卡 ---------------- */

.today {
  margin-top: 12px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  padding: 14px 16px;
}
.today-head {
  display: flex; align-items: center;
  font-size: 12px; color: var(--muted);
  margin-bottom: 10px;
}
.today-head b { color: var(--ink); font-weight: 500; }
.today-head .link {
  margin-left: auto; font-size: 11.5px; color: var(--faint);
  display: flex; align-items: center; gap: 2px;
}
.today-actions { display: flex; gap: 9px; }
.today-btn {
  flex: 1;
  display: flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 0;
  border-radius: 13px;
  font-size: 13.5px; font-weight: 500;
  background: var(--surface-2);
  color: var(--ink-2);
  border: 1.5px solid transparent;
  transition: all .2s var(--ease);
}
.today-btn:active { transform: scale(.97); }
.today-btn.wild.on { background: var(--income-soft); color: #1D7A50; border-color: #A8DEC4; }
.today-btn.trip.on { background: var(--trip-soft); color: #4A56C9; border-color: #C2C8FA; }

.today-done {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 14px;
  border-radius: 13px;
  font-size: 13.5px;
  background: var(--income-soft); color: #1D7A50;
}
.today-done.trip { background: var(--trip-soft); color: #4A56C9; }

/* ---------------- 本月三指标 ---------------- */

.monthly {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 10px; margin-top: 12px;
}
.mcard {
  background: var(--surface);
  border-radius: var(--r-md);
  padding: 13px 14px;
  box-shadow: var(--sh-sm);
}
.mcard .k { font-size: 11px; color: var(--muted); }
.mcard .v {
  font-size: 18px; font-weight: 600; letter-spacing: -.02em;
  margin-top: 3px;
}
.mcard .v small { font-size: 10.5px; font-weight: 400; color: var(--muted); margin-left: 1px; }
.mcard .x { font-size: 10.5px; color: var(--faint); margin-top: 1px; }

/* ---------------- 区块标题 ---------------- */

.section-title {
  display: flex; align-items: baseline; gap: 8px;
  margin: 22px 2px 10px;
  font-size: 12.5px; font-weight: 500; color: var(--muted);
}
.section-title .more { margin-left: auto; font-size: 11.5px; color: var(--faint); }

/* ---------------- 流水 ---------------- */

.list {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  overflow: hidden;
}

.day-head {
  display: flex; align-items: center; gap: 8px;
  padding: 11px 16px 5px;
  font-size: 11.5px; color: var(--muted);
}
.day-head .sum { margin-left: auto; font-size: 11.5px; color: var(--faint); }

.rec {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 16px;
  position: relative;
  transition: background .18s;
}
.rec:active { background: var(--surface-2); }

.rec-ico {
  width: 36px; height: 36px; border-radius: 12px;
  display: grid; place-items: center;
  font-size: 16px; flex: none;
}
.rec-body { flex: 1; min-width: 0; }
.rec-title {
  font-size: 14px; font-weight: 500;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rec-sub {
  font-size: 11px; color: var(--muted);
  display: flex; align-items: center; gap: 4px; margin-top: 1px;
}
.rec-amt {
  font-size: 15px; font-weight: 600; letter-spacing: -.01em; flex: none;
}
.rec-amt.plus { color: var(--income); }
.rec-amt.minus { color: var(--danger); }
.rec-amt.mute { color: var(--muted); font-size: 12.5px; font-weight: 400; }

.tag {
  font-size: 10px; padding: 1px 6px; border-radius: 5px;
  background: var(--surface-2); color: var(--muted);
}

/* ---------------- 筛选 chips ---------------- */

.filters {
  display: flex; gap: 7px;
  padding: 2px 0 14px;
  overflow-x: auto;
  scrollbar-width: none;
}
.filters::-webkit-scrollbar { display: none; }
.fchip {
  flex: none;
  padding: 7px 14px;
  border-radius: 11px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12.5px;
  box-shadow: var(--sh-sm);
  transition: all .2s var(--ease);
}
.fchip.on { background: var(--ink); color: #fff; }

/* ---------------- 月份 ---------------- */

.monthbar {
  display: flex; align-items: center; gap: 8px;
  padding: 2px 0 12px;
}
.month-title { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.month-title span { font-size: 12.5px; font-weight: 400; color: var(--muted); margin-left: 4px; }
.month-title em {
  font-style: normal; font-size: 11.5px; font-weight: 400;
  color: var(--faint); margin-left: 7px;
}
.month-nav { margin-left: auto; display: flex; gap: 6px; }
.month-nav button {
  /* 触屏最小可点尺寸按 40px 给，31px 手指经常点空 */
  width: 40px; height: 40px; border-radius: 12px;
  display: grid; place-items: center;
  background: var(--surface); color: var(--ink-2);
  box-shadow: var(--sh-sm);
  transition: transform .18s var(--ease), opacity .18s;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
}
.month-nav button svg { width: 19px; height: 19px; }
.month-nav button:active { transform: scale(.9); background: var(--surface-2); }
.month-nav button:disabled { opacity: .3; box-shadow: none; }
.month-nav button:disabled { opacity: .3; }
.month-nav svg { width: 14px; height: 14px; }

/* ---------------- 底部导航 ---------------- */

.tabbar-wrap {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 30;
  padding: 0 16px calc(var(--safe-b) + 10px);
  pointer-events: none;
}
.tabbar {
  max-width: 528px;
  margin: 0 auto;
  height: var(--tab-h);
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(20px) saturate(1.6);
  -webkit-backdrop-filter: blur(20px) saturate(1.6);
  border-radius: 20px;
  box-shadow: var(--sh-float), 0 0 0 1px rgba(27, 31, 39, .04);
  display: grid;
  grid-template-columns: 1fr 1fr 1fr 1fr auto;
  align-items: center;
  padding-right: 5px;
  pointer-events: auto;
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 2px;
  color: var(--faint);
  font-size: 10.5px;
  padding: 6px 0;
  transition: color .2s;
}
.tab svg { width: 20px; height: 20px; transition: transform .3s var(--spring); }
.tab.active { color: var(--ink); }
.tab.active svg { transform: translateY(-1px) scale(1.06); }
.tab.active span { font-weight: 500; }

.tab-add {
  width: 44px; height: 44px;
  margin: 0 4px 0 2px;
  border-radius: 15px;
  background: var(--ink);
  color: #fff;
  display: grid; place-items: center;
  box-shadow: 0 8px 18px -8px rgba(27, 31, 39, .5);
  transition: transform .25s var(--spring);
}
.tab-add:active { transform: scale(.9); }
.tab-add svg { width: 20px; height: 20px; }

/* ---------------- 抽屉 ---------------- */

.scrim {
  position: fixed; inset: 0; z-index: 40;
  background: rgba(24, 26, 30, .32);
  backdrop-filter: blur(2px);
  opacity: 0; pointer-events: none;
  transition: opacity .28s var(--ease);
}
.scrim.show { opacity: 1; pointer-events: auto; }

.sheet {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 41;
  max-width: 560px;
  margin: 0 auto;
  background: var(--surface);
  border-radius: 24px 24px 0 0;
  box-shadow: 0 -18px 50px -22px rgba(27, 31, 39, .3);
  transform: translateY(102%);
  transition: transform .34s var(--ease);
  padding: 8px 20px calc(var(--safe-b) + 18px);
  max-height: 92vh;
  overflow-y: auto;
}
.sheet.show { transform: translateY(0); }
.sheet-grip {
  width: 36px; height: 4px; border-radius: 99px;
  background: var(--line-2);
  margin: 6px auto 14px;
}
.sheet-title {
  font-size: 16.5px; font-weight: 600; margin-bottom: 16px;
  display: flex; align-items: center; gap: 8px;
}

/* ---------------- 表单 ---------------- */

.field { margin-bottom: 16px; }
.field-label {
  font-size: 11.5px; color: var(--muted); margin-bottom: 7px;
  display: flex; align-items: center; justify-content: space-between;
}

.amount-input {
  display: flex; align-items: baseline; gap: 5px;
  border-bottom: 2px solid var(--line-2);
  padding-bottom: 7px;
  transition: border-color .2s;
}
.amount-input:focus-within { border-color: var(--ink); }
.amount-input .cur { font-size: 19px; color: var(--ink-2); }
.amount-input input {
  flex: 1; border: 0; outline: 0; background: none;
  font-size: 33px; font-weight: 600; letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
  min-width: 0;
}
.amount-input input::placeholder { color: var(--faint); font-weight: 400; }

.input {
  width: 100%; border: 1.5px solid var(--line-2); border-radius: var(--r-sm);
  padding: 11px 13px; background: var(--surface-2);
  outline: 0; font-size: 15px;
  transition: border-color .2s, background .2s;
}
.input:focus { border-color: var(--ink); background: var(--surface); }

.seg {
  display: grid; grid-auto-flow: column; gap: 4px;
  background: var(--surface-2); border-radius: 13px; padding: 4px;
}
.seg button {
  padding: 9px 0; border-radius: 10px; font-size: 13.5px; color: var(--muted);
  transition: all .2s var(--ease);
}
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--sh-sm); }

.who-pick { display: flex; gap: 9px; }
.who-btn {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px; border-radius: 13px;
  background: var(--surface-2); border: 1.5px solid transparent;
  font-size: 13.5px; color: var(--ink-2);
  transition: all .2s var(--ease);
}
.who-btn .avatar { width: 23px; height: 23px; font-size: 11px; box-shadow: none; }

.btn-row { display: flex; gap: 10px; margin-top: 20px; }
.btn {
  flex: 1; padding: 14px; border-radius: 15px;
  font-size: 15px; font-weight: 500;
  transition: transform .2s var(--ease), opacity .2s;
  text-align: center;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--ink); color: #fff; }
.btn-ghost { background: var(--surface-2); color: var(--ink-2); }
.btn-danger { background: #FDF0EF; color: var(--danger); }
.btn:disabled { opacity: .45; }

/* ---------------- 月历 ---------------- */

.cal-week {
  display: grid; grid-template-columns: repeat(7, 1fr);
  margin-bottom: 5px;
}
.cal-week span { text-align: center; font-size: 11px; color: var(--faint); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }

.cal-day {
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 1px;
  font-size: 13px; color: var(--ink-2);
  position: relative;
  transition: background .18s, color .18s, transform .18s var(--ease);
}
.cal-day.blank { pointer-events: none; }
.cal-day.today { color: var(--ink); font-weight: 600; box-shadow: inset 0 0 0 1.5px var(--ink); }
.cal-day:active { transform: scale(.9); }
.cal-day.wild { background: var(--income-soft); color: #1D7A50; font-weight: 500; box-shadow: none; }
.cal-day.trip { background: var(--trip-soft); color: #4A56C9; font-weight: 500; box-shadow: none; }
.cal-day .mk { font-size: 8.5px; line-height: 1; opacity: .85; }

.cal-legend {
  display: flex; gap: 16px; justify-content: center;
  margin-top: 14px; padding-top: 12px;
  border-top: 1px solid var(--line);
  font-size: 11.5px; color: var(--muted);
}
.cal-legend i {
  width: 8px; height: 8px; border-radius: 3px; display: inline-block; margin-right: 5px;
}

/* ---------------- Toast ---------------- */

.toast-wrap {
  position: fixed; left: 0; right: 0;
  bottom: calc(var(--tab-h) + var(--safe-b) + 32px);
  z-index: 60;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none;
}
.toast {
  background: rgba(27, 31, 39, .93);
  color: #fff;
  padding: 10px 18px;
  border-radius: 13px;
  font-size: 13.5px;
  box-shadow: var(--sh-lg);
  animation: toast-in .3s var(--spring);
  max-width: 80vw;
}
.toast.out { animation: toast-out .25s var(--ease) forwards; }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px) scale(.94); }
  to { opacity: 1; transform: none; }
}
@keyframes toast-out { to { opacity: 0; transform: translateY(-6px) scale(.96); } }

/* ---------------- 进场 ---------------- */

.view > * { animation: rise .42s var(--ease) both; }
.view > *:nth-child(2) { animation-delay: .04s; }
.view > *:nth-child(3) { animation-delay: .08s; }
.view > *:nth-child(4) { animation-delay: .11s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(9px); }
  to { opacity: 1; transform: none; }
}

.empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--muted);
  font-size: 13px;
}
.empty .ico { font-size: 32px; display: block; margin-bottom: 10px; opacity: .5; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------------- 登录页 ---------------- */

.login-wrap {
  min-height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  padding: 28px;
  background:
    radial-gradient(80% 55% at 50% 0%, #FBF3E2 0%, rgba(251, 243, 226, 0) 62%),
    var(--bg);
}
.login-card {
  width: 100%; max-width: 350px;
  background: var(--surface);
  border-radius: var(--r-xl);
  padding: 32px 26px 26px;
  box-shadow: var(--sh-lg);
  text-align: center;
}
.login-mark { font-size: 38px; margin-bottom: 12px; }
.login-title { font-size: 19px; font-weight: 600; letter-spacing: -.02em; }
.login-sub { font-size: 12.5px; color: var(--muted); margin-top: 6px; margin-bottom: 24px; }
.login-card .input { text-align: center; letter-spacing: .3em; font-size: 17px; }
.login-card .btn { margin-top: 14px; }
.login-err { color: var(--danger); font-size: 12.5px; margin-top: 12px; min-height: 18px; }

/* ---------------- 收入年表 ---------------- */

.persona {
  display: flex; gap: 8px; padding: 2px 0 12px;
}
.persona button {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 7px;
  padding: 10px; border-radius: 14px;
  background: var(--surface); box-shadow: var(--sh-sm);
  font-size: 13px; color: var(--muted);
  border: 1.5px solid transparent;
  transition: all .22s var(--ease);
}
.persona button.on { color: var(--ink); font-weight: 500; }
.persona .avatar { width: 22px; height: 22px; font-size: 11px; box-shadow: none; }

.seg-view {
  display: flex; gap: 4px; background: var(--surface-2);
  border-radius: 12px; padding: 3px; margin-bottom: 12px;
}
.seg-view button {
  flex: 1; padding: 8px 0; border-radius: 9px;
  font-size: 12.5px; color: var(--muted); transition: all .2s var(--ease);
}
.seg-view button.on {
  background: var(--surface); color: var(--ink); font-weight: 500; box-shadow: var(--sh-sm);
}

.tbl-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  overflow: hidden;
  position: relative;
}
/* 右边还有科目没露出来时，用一层渐隐提示「可以横滑」 */
.tbl-card.scrollable::after {
  content: "";
  position: absolute; top: 0; bottom: 0; right: 74px; width: 30px;
  background: linear-gradient(to right, rgba(255, 255, 255, 0), var(--surface) 88%);
  pointer-events: none; z-index: 4;
  transition: opacity .25s var(--ease);
}
.tbl-card.scrollable.is-end::after { opacity: 0; }
.tbl-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

table.inc {
  border-collapse: separate; border-spacing: 0;
  width: max-content; min-width: 100%;
  font-size: 11.5px;
}
.inc th, .inc td {
  padding: 9px 7px; text-align: right; white-space: nowrap;
  border-bottom: 1px solid var(--line);
}
.inc th {
  font-weight: 500; color: var(--muted); font-size: 11px;
  background: var(--surface-2);
  position: sticky; top: 0; z-index: 1;
}
.inc th:first-child, .inc td:first-child {
  position: sticky; left: 0; z-index: 2;
  text-align: left; background: var(--surface);
  padding-left: 14px; min-width: 42px;
}
.inc th:first-child { background: var(--surface-2); z-index: 3; }
.inc th:last-child, .inc td:last-child {
  position: sticky; right: 0; z-index: 2;
  background: var(--surface); font-weight: 500;
  border-left: 1px solid var(--line);
  padding-right: 12px; padding-left: 10px;
  min-width: 74px;
}
.inc th:last-child { background: var(--surface-2); z-index: 3; }

.inc td.month { color: var(--ink-2); font-weight: 500; }
.inc td.cell { cursor: pointer; transition: background .15s; }
.inc td.cell:active { background: var(--vault-soft); }
.inc td.cell.has { color: var(--ink); }
.inc td.cell.blank { color: var(--faint); }
.inc td.total { color: var(--vault-deep); }
.inc tr.foot td {
  border-bottom: 0; border-top: 1px solid var(--line-2);
  font-weight: 600; color: var(--ink);
  background: var(--surface-2);
}
.inc tr.foot td:first-child { background: var(--surface-2); }
.inc tr.foot td:last-child { background: var(--surface-2); color: var(--vault-deep); }

.month-note {
  padding: 8px 14px 10px;
  font-size: 11px; color: var(--muted); line-height: 1.6;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
}

/* ---------------- 收入月表 ---------------- */

.mrow {
  display: flex; align-items: center; gap: 12px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .16s;
}
.mrow:last-child { border-bottom: 0; }
.mrow:active { background: var(--surface-2); }
.mrow-name { font-size: 13.5px; color: var(--ink-2); flex: 1; }
.mrow-val { font-size: 15px; font-weight: 600; letter-spacing: -.01em; }
.mrow-val.none { font-size: 12px; font-weight: 400; color: var(--faint); }
.mrow-total {
  display: flex; align-items: center;
  padding: 14px 16px; background: var(--surface-2);
  border-top: 1px solid var(--line-2);
}
.mrow-total .mrow-name { font-weight: 500; color: var(--ink); }
.mrow-total .mrow-val { color: var(--vault-deep); font-size: 17px; }

/* ---------------- 批量录入 ---------------- */

.batch-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0; border-bottom: 1px solid var(--line);
}
.batch-row:last-child { border-bottom: 0; }
.batch-name { width: 58px; flex: none; font-size: 13px; color: var(--ink-2); }
.batch-input {
  flex: 1; min-width: 0;
  border: 1.5px solid var(--line-2); border-radius: 11px;
  padding: 9px 11px; background: var(--surface-2);
  outline: 0; font-size: 15px; text-align: right;
  font-variant-numeric: tabular-nums;
  transition: border-color .2s, background .2s;
}
.batch-input:focus { border-color: var(--ink); background: var(--surface); }
.batch-total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 14px 2px 4px; font-size: 13px; color: var(--muted);
}
.batch-total b { font-size: 19px; color: var(--vault-deep); }

/* ---------------- 打卡页 ---------------- */

.cal-card {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  padding: 14px 12px 10px;
}
.cal-day.sel {
  outline: 2px solid var(--ink);
  outline-offset: 1px;
}
.cal-day.wild.sel, .cal-day.trip.sel { outline-color: var(--ink); }

.pick-hint {
  text-align: center;
  font-size: 12px; color: var(--faint);
  padding: 16px 0 4px;
}
.pick-bar {
  margin-top: 12px;
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  padding: 14px 16px 16px;
}
.pick-date {
  font-size: 12.5px; color: var(--muted);
  margin-bottom: 10px;
}
.pick-clear {
  width: 100%; margin-top: 9px; padding: 10px;
  border-radius: 12px; font-size: 12.5px;
  background: #FDF0EF; color: var(--danger);
}

.year-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}
.ycell {
  background: var(--surface);
  border-radius: 13px;
  box-shadow: var(--sh-sm);
  padding: 9px 4px 8px;
  display: flex; flex-direction: column; align-items: center; gap: 1px;
  border: 1.5px solid transparent;
  transition: all .2s var(--ease);
}
.ycell .ym { font-size: 10.5px; color: var(--muted); }
.ycell .yn { font-size: 15px; font-weight: 600; color: var(--ink-2); }
.ycell.on { border-color: var(--ink); }
.ycell.on .ym { color: var(--ink); }
.ycell.on .yn { color: var(--ink); }
.ycell.future { opacity: .35; }
.ycell:active { transform: scale(.95); }

/* ---------------- 设置里的免密入口 ---------------- */

.entry-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1.5px solid var(--line-2);
  border-radius: 14px;
  background: var(--surface-2);
}
.entry-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.entry-name { font-size: 13px; font-weight: 500; color: var(--ink); }
.entry-url {
  font-size: 10.5px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.entry-copy {
  flex: none;
  padding: 8px 11px;
  border-radius: 10px;
  background: var(--ink); color: #fff;
  font-size: 11.5px;
}
.entry-copy:active { transform: scale(.95); }
.entry-tip {
  font-size: 11px; color: var(--faint);
  line-height: 1.7; margin-top: 9px;
}

/* ---------------- 明细页月度合计 ---------------- */

.msum {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  padding: 13px 15px 12px;
  margin-bottom: 12px;
}
.msum-head {
  font-size: 11.5px; color: var(--muted);
  margin-bottom: 6px;
}
.msum-row {
  display: grid;
  grid-template-columns: 66px 1fr 1fr;
  align-items: center;
  gap: 8px;
  padding: 4px 0;
}
.msum-who {
  display: flex; align-items: center; gap: 5px;
  font-size: 12.5px; color: var(--ink-2);
  min-width: 0;
}
.msum-who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.msum-cell {
  display: flex; flex-direction: column; align-items: flex-end;
  line-height: 1.25;
}
.msum-cell i {
  font-style: normal; font-size: 9.5px; color: var(--faint);
}
.msum-cell b { font-size: 12.5px; font-weight: 600; }
.msum-foot {
  display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px;
  margin-top: 9px; padding-top: 9px;
  border-top: 1px solid var(--line);
  font-size: 11px; color: var(--muted);
}
.msum-foot b { color: var(--ink-2); font-weight: 500; }
.msum-days { margin-left: auto; color: var(--faint); }

/* ---------------- 存款全部视图 ---------------- */

.vault-mini {
  background: var(--surface);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  padding: 16px 16px 14px;
  margin-bottom: 12px;
  text-align: center;
}
.vm-label { font-size: 11.5px; color: var(--muted); }
.vm-value {
  font-size: 27px; font-weight: 600; letter-spacing: -.02em;
  color: var(--vault-deep); margin: 3px 0 2px;
}
.vm-sub { font-size: 10.5px; color: var(--faint); }

.srow {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
  transition: background .16s;
}
.srow:last-child { border-bottom: 0; }
.srow:active { background: var(--surface-2); }
.srow-right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 1px;
  flex: none;
}
.srow-bal { font-size: 9.5px; color: var(--faint); }

.build-tag {
  text-align: center;
  font-size: 10.5px; color: var(--faint);
  padding: 14px 0 2px;
  font-variant-numeric: tabular-nums;
}
