/* ============ 记账 App · 移动端样式（浅色主题） ============ */
:root {
  --bg: #f4f5f7;
  --bg-2: #ffffff;
  --card: #ffffff;
  --card-2: #f1f2f5;
  --line: #e5e7eb;
  --line-2: #eef0f3;
  --text: #171a20;
  --text-2: #3f4753;
  --muted: #7b8494;
  --primary: #4f46e5;
  --primary-2: #6366f1;
  --primary-soft: rgba(79, 70, 229, .10);
  --expense: #e11d48;
  --income: #059669;
  --warn: #d97706;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .05);
  --shadow-lg: 0 10px 30px rgba(16, 24, 40, .10);
  --tab-h: 58px;
  --keypad-h: 226px;
  --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; height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

body { overflow: hidden; }

.app {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  max-width: 620px;
  margin: 0 auto;
  position: relative;
  background: var(--bg);
}

/* ---------- 顶栏 ---------- */
.topbar {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: calc(var(--safe-t) + 12px) 18px 11px;
  background: var(--bg);
  box-shadow: 0 1px 0 var(--line), 0 6px 14px -10px rgba(16, 24, 40, .28);
  position: relative;
  z-index: 10;
}
.topbar-l h1 {
  margin: 0; font-size: 21px; font-weight: 680; letter-spacing: .2px; color: var(--text);
}
.topbar-l p {
  margin: 3px 0 0; font-size: 12px; color: var(--muted);
}
.topbar-r { display: flex; align-items: center; gap: 8px; }

/* ---------- 视图容器 ---------- */
.view {
  flex: 1 1 auto;
  overflow-y: auto;
  overflow-x: hidden;
  -webkit-overflow-scrolling: touch;
  padding: 0 14px calc(var(--tab-h) + var(--safe-b) + 18px);
}
.view.no-scroll {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding-bottom: calc(var(--tab-h) + var(--safe-b) + var(--keypad-h) + 8px);
}

/* ---------- 底部 Tab ---------- */
.tabbar {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: calc(var(--tab-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  display: flex;
  align-items: stretch;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
  z-index: 30;
}
.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  transition: color .16s;
  padding: 0;
}
.tab svg { width: 21px; height: 21px; stroke-width: 1.9; }
.tab.on { color: var(--primary); }

/* ---------- 通用卡片 ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  box-shadow: var(--shadow);
}
.card + .card { margin-top: 12px; }
.card-head {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: 12px;
}
.card-head h3 { margin: 0; font-size: 14.5px; font-weight: 640; color: var(--text); }
.card-head .sub { font-size: 11.5px; color: var(--muted); }

/* ---------- KPI ---------- */
.kpi-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kpi {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 11px 12px;
  box-shadow: var(--shadow);
}
.kpi .label { font-size: 11px; color: var(--muted); }
.kpi .value {
  font-size: 17px; font-weight: 680; margin-top: 5px;
  font-variant-numeric: tabular-nums; letter-spacing: .1px;
}
.kpi .foot { font-size: 10.5px; color: var(--muted); margin-top: 3px; }
.kpi.expense .value { color: var(--expense); }
.kpi.income .value { color: var(--income); }
.kpi.accent {
  border-color: rgba(79, 70, 229, .22);
  background: linear-gradient(160deg, rgba(79, 70, 229, .07), #fff 62%);
}

/* ---------- 首页收支总览 ---------- */
.home-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  overflow: hidden;
  margin: 8px 0 0;
  box-shadow: var(--shadow);
}
.home-stats > div {
  background: var(--card);
  padding: 8px 10px 9px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.home-stats .lb { font-size: 10.5px; color: var(--muted); }
.home-stats b {
  font-size: 15px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--text);
  letter-spacing: .1px;
}
.home-stats b.exp { color: var(--expense); }
.home-stats b.inc { color: var(--income); }

/* ---------- 分段控件 ---------- */
.segmented {
  display: flex;
  background: var(--card-2);
  border-radius: 12px;
  padding: 4px;
  gap: 4px;
}
.segmented button {
  flex: 1;
  border: none;
  background: none;
  color: var(--muted);
  font-size: 13.5px;
  font-weight: 600;
  padding: 9px 0;
  border-radius: 9px;
  cursor: pointer;
  transition: all .16s;
  font-family: inherit;
}
.segmented button.on { background: #fff; color: var(--text); box-shadow: var(--shadow); }
.segmented button.on.expense { background: var(--expense); color: #fff; }
.segmented button.on.income { background: var(--income); color: #fff; }

/* ---------- 金额显示 ---------- */
.amount-display {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 2px 9px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 9px;
}
.ad-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
  padding-bottom: 3px;
}
.ad-cat { display: flex; align-items: center; gap: 6px; min-width: 0; }
.ad-ico { font-size: 17px; line-height: 1; }
.ad-name {
  font-size: 13px; font-weight: 640; color: var(--text-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.ad-today { font-size: 10.5px; color: var(--muted); }
.ad-right { display: flex; align-items: baseline; justify-content: flex-end; white-space: nowrap; }
.amount-display .cur { font-size: 18px; color: var(--muted); margin-right: 6px; font-weight: 500; }
.amount-display .num {
  font-size: 34px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: .2px;
  line-height: 1;
  color: var(--text);
}
.amount-display.zero .num { color: #c3c8d2; }

/* ---------- 分类九宫格 ---------- */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
}
.cat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  padding: 4px 2px;
  border: 1px solid transparent;
  border-radius: 11px;
  background: none;
  color: var(--muted);
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
}
.cat-item .ico {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  font-size: 16px;
  background: var(--card-2);
  border-radius: 10px;
  transition: all .15s;
}
.cat-item .nm { font-size: 10.5px; line-height: 1; white-space: nowrap; }
.cat-item.on { color: var(--primary); }
.cat-item.on .ico {
  background: var(--primary-soft);
  box-shadow: inset 0 0 0 1.5px var(--primary-2);
}

/* ---------- 账户 chips ---------- */
.chips { display: flex; gap: 7px; flex-wrap: wrap; }
.chip {
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text-2);
  font-size: 12.5px;
  padding: 7px 13px;
  border-radius: 999px;
  cursor: pointer;
  transition: all .15s;
  font-family: inherit;
  white-space: nowrap;
  flex: 0 0 auto;
}
.chip.on {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-soft);
  font-weight: 600;
}

/* 单行元信息条 */
.meta-row { display: flex; align-items: center; gap: 7px; }
.meta-row .chips {
  flex: 1 1 auto; min-width: 0;
  flex-wrap: nowrap; overflow-x: auto;
}
.icon-btn {
  flex: 0 0 auto;
  width: 38px; height: 38px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text-2);
  border-radius: 10px;
  font-size: 15px;
  cursor: pointer;
  font-family: inherit;
}
.icon-btn.on { border-color: var(--primary); color: var(--primary); background: var(--primary-soft); }
.mini-x {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  border: none;
  background: rgba(225, 29, 72, .09);
  color: var(--expense);
  border-radius: 50%;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  padding: 0;
}
.mini-x:active { background: rgba(225, 29, 72, .2); }
.date-btn {
  flex: 0 0 auto;
  border: 1px solid var(--line);
  background: var(--card-2);
  color: var(--text);
  font-family: inherit;
  font-size: 12.5px;
  font-weight: 550;
  padding: 0 10px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  white-space: nowrap;
}

/* ---------- 数字键盘 ---------- */
.keypad {
  position: absolute;
  left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b));
  background: var(--bg);
  border-top: 1px solid var(--line);
  padding: 9px 10px 12px;
  z-index: 25;
  max-width: 620px;
  margin: 0 auto;
}
.keypad .grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 7px;
}
.keypad button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-size: 20px;
  font-weight: 560;
  font-family: inherit;
  height: 46px;
  border-radius: 12px;
  cursor: pointer;
  transition: background .12s, transform .08s;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 1px rgba(16, 24, 40, .03);
}
.keypad button:active { background: var(--card-2); transform: scale(.97); }
.keypad button.fn { color: var(--text-2); font-size: 17px; }
.keypad button.save {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-size: 15px;
  font-weight: 650;
  box-shadow: 0 4px 14px rgba(79, 70, 229, .28);
}
.keypad button.save:disabled { opacity: .45; box-shadow: none; }

/* ---------- 流水列表 ---------- */
.day-group { margin-bottom: 14px; }
.day-head {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 0 4px 7px;
  font-size: 12px;
  color: var(--muted);
}
.day-head b { color: var(--text); font-size: 13px; font-weight: 650; }
.day-head .sum { font-variant-numeric: tabular-nums; }

.txn-row {
  display: flex; align-items: center; gap: 11px;
  padding: 11px 12px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  cursor: pointer;
  transition: background .13s;
  box-shadow: var(--shadow);
}
.txn-row:active { background: var(--card-2); }
.txn-row .ico {
  width: 36px; height: 36px; flex: 0 0 36px;
  display: grid; place-items: center;
  background: var(--card-2);
  border-radius: 10px;
  font-size: 17px;
}
.txn-row .mid { flex: 1; min-width: 0; }
.txn-row .nm {
  font-size: 14px; font-weight: 570; color: var(--text);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.txn-row .meta {
  font-size: 11px; color: var(--muted); margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.txn-row .amt {
  font-size: 15px; font-weight: 680;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.amt.expense { color: var(--expense); }
.amt.income { color: var(--income); }
.amt.transfer { color: var(--muted); }

/* ---------- 进度条 ---------- */
.bar {
  height: 7px;
  background: var(--card-2);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 8px;
}
.bar > i {
  display: block; height: 100%;
  background: linear-gradient(90deg, #6366f1, #818cf8);
  border-radius: 999px;
  transition: width .35s ease;
}
.bar > i.warn { background: linear-gradient(90deg, #d97706, #f59e0b); }
.bar > i.over { background: linear-gradient(90deg, #e11d48, #fb7185); }

.budget-row {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 12px 13px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
}
.budget-link { cursor: pointer; }
.budget-link:active { background: var(--card-2); }
.budget-row .top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13.5px; font-weight: 560;
}
.budget-row .top .v { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 12.5px; font-weight: 400; }

/* ---------- 图表 ---------- */
.chart-box { position: relative; width: 100%; }
.chart-box canvas { display: block; width: 100%; }

.legend { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; }
.legend .item { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.legend .dot { width: 9px; height: 9px; border-radius: 50%; flex: 0 0 9px; }

.rank-row {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line-2);
}
.rank-row:last-child { border-bottom: none; }
.rank-row .rn { font-size: 12px; color: var(--muted); width: 16px; }
.rank-row .rn-ico { font-size: 15px; }
.rank-row .rn-nm { flex: 1; font-size: 13.5px; color: var(--text); display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.rank-row .rn-nm > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-row .rn-nm small { font-size: 10.5px; line-height: 1.2; }
.rank-row .rn-bar { width: 84px; height: 5px; background: var(--card-2); border-radius: 99px; overflow: hidden; }
.rank-row .rn-bar i { display: block; height: 100%; background: var(--primary-2); border-radius: 99px; }
.rank-row .rn-amt { font-size: 13px; font-variant-numeric: tabular-nums; width: 74px; text-align: right; font-weight: 560; }
.rank-link { cursor: pointer; border-radius: 8px; }
.rank-link:active { background: var(--card-2); }
.rn-go { color: #c3c8d2; font-size: 16px; line-height: 1; margin-left: 2px; }

/* ---------- 期间选择（年/月/日） ---------- */
.period-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 10px;
}
.period-nav {
  width: 36px; height: 34px;
  flex: 0 0 36px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text-2);
  border-radius: 10px;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  font-family: inherit;
  box-shadow: var(--shadow);
}
.period-nav:active { background: var(--card-2); }
.period-label {
  flex: 1 1 auto;
  min-width: 0;
  height: 34px;
  border: none;
  background: none;
  color: var(--text);
  font-family: inherit;
  font-size: 15px;
  font-weight: 660;
  cursor: pointer;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.seg-sm { padding: 3px; gap: 3px; margin-bottom: 4px; }
.seg-sm button { padding: 6px 0; font-size: 12.5px; border-radius: 8px; }

/* 年度 12 个月柱状 */
.month-bars {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 8px 6px;
  margin-top: 4px;
}
.month-bar { text-align: center; }
.month-bar .mb-track {
  height: 64px;
  background: var(--card-2);
  border-radius: 7px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.month-bar .mb-fill {
  width: 100%;
  background: linear-gradient(180deg, #818cf8, #6366f1);
  border-radius: 7px 7px 0 0;
  transition: height .3s;
}
.month-bar.over .mb-fill { background: linear-gradient(180deg, #fb7185, #e11d48); }
.month-bar .mb-lb { font-size: 10.5px; color: var(--muted); margin-top: 4px; }
.month-bar .mb-v { font-size: 9.5px; color: #a8b0bc; margin-top: 1px; }

/* ---------- 筛选条 ---------- */
.filter-bar { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 10px; align-items: center; }
.fchip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 6px 5px 11px;
  background: var(--primary-soft);
  border: 1px solid rgba(79, 70, 229, .22);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  color: var(--primary);
}
.fchip button {
  width: 18px; height: 18px;
  display: grid; place-items: center;
  border: none;
  background: rgba(79, 70, 229, .16);
  color: var(--primary);
  border-radius: 50%;
  font-size: 12px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
}
.fclear {
  border: none; background: none; color: var(--muted);
  font-size: 12px; font-family: inherit; cursor: pointer; padding: 4px 2px;
  text-decoration: underline;
}

/* ---------- 左滑删除 ---------- */
.swipe-wrap {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-sm);
  margin-bottom: 6px;
  background: transparent;
}
.swipe-del {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 76px;
  display: none;
  place-items: center;
  background: var(--expense);
  color: #fff;
  font-size: 13px;
  font-weight: 650;
  cursor: pointer;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
/* 只有滑动或已滑开时才显示，避免圆角处露红 */
.swipe-wrap.swiping .swipe-del,
.swipe-wrap.open .swipe-del { display: grid; }
.swipe-inner {
  position: relative;
  transform: translateX(0);
  will-change: transform;
}
.swipe-inner .txn-row { margin-bottom: 0; }

/* ---------- 空状态 ---------- */
.empty {
  text-align: center;
  padding: 48px 20px;
  color: var(--muted);
}
.empty .ico { font-size: 40px; opacity: .55; margin-bottom: 12px; }
.empty .t { font-size: 14px; color: var(--text); margin-bottom: 5px; font-weight: 560; }
.empty .d { font-size: 12.5px; line-height: 1.6; }

/* ---------- 按钮 ---------- */
.btn {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 13.5px;
  font-weight: 550;
  padding: 9px 15px;
  border-radius: 10px;
  cursor: pointer;
  transition: all .14s;
  box-shadow: 0 1px 1px rgba(16, 24, 40, .03);
}
.btn:active { transform: scale(.975); background: var(--card-2); }
.btn.primary {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 4px 12px rgba(79, 70, 229, .22);
}
.btn.ghost { background: none; box-shadow: none; color: var(--text-2); }
.btn.danger { color: var(--expense); border-color: rgba(225, 29, 72, .26); background: rgba(225, 29, 72, .06); }
.btn.block { width: 100%; display: block; }
.btn.sm { font-size: 12.5px; padding: 7px 12px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }

/* ---------- 输入 ---------- */
.input, select.input {
  width: 100%;
  background: var(--card-2);
  border: 1px solid var(--line);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  padding: 10px 12px;
  border-radius: 10px;
  outline: none;
}
.input:focus { border-color: var(--primary-2); background: #fff; }

.search-box {
  display: flex; align-items: center; gap: 8px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 9px 12px;
  margin-bottom: 12px;
  box-shadow: var(--shadow);
}
.search-box input {
  flex: 1; border: none; background: none; color: var(--text);
  font-family: inherit; font-size: 14px; outline: none;
}
.search-box input::placeholder { color: #a8b0bc; }
.search-box svg { width: 16px; height: 16px; color: var(--muted); flex: 0 0 16px; }

/* ---------- 列表项（我的页） ---------- */
.menu-item {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 15px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  cursor: pointer;
  font-size: 14px;
  box-shadow: var(--shadow);
}
.menu-item .mi-ico { font-size: 17px; width: 22px; text-align: center; }
.menu-item .mi-t { flex: 1; }
.menu-item .mi-x { color: var(--muted); font-size: 12.5px; }

/* ---------- Toast ---------- */
.toast-wrap {
  position: fixed; left: 0; right: 0; bottom: calc(var(--tab-h) + var(--safe-b) + 16px);
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  pointer-events: none; z-index: 90;
}
.toast {
  background: rgba(23, 26, 32, .94);
  border: 1px solid rgba(255,255,255,.08);
  color: #fff;
  font-size: 13.5px;
  padding: 10px 18px;
  border-radius: 999px;
  box-shadow: var(--shadow-lg);
  animation: toastIn .22s ease;
  max-width: 86vw;
  text-align: center;
}
.toast.err { background: rgba(190, 18, 60, .96); }
.toast.ok { background: rgba(5, 122, 85, .96); }
@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px) scale(.96); }
  to { opacity: 1; transform: none; }
}

/* ---------- 底部弹出面板 ---------- */
.sheet-mask {
  position: fixed; inset: 0;
  background: rgba(16, 24, 40, .38);
  z-index: 70;
  display: flex; align-items: flex-end; justify-content: center;
  animation: fadeIn .18s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.sheet {
  width: 100%;
  max-width: 620px;
  background: var(--bg-2);
  border-top: 1px solid var(--line);
  border-radius: 20px 20px 0 0;
  padding: 8px 16px calc(18px + var(--safe-b));
  max-height: 86dvh;
  overflow-y: auto;
  animation: sheetUp .24s cubic-bezier(.2,.9,.3,1);
  box-shadow: 0 -8px 30px rgba(16, 24, 40, .12);
}
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
.sheet .handle {
  width: 36px; height: 4px; border-radius: 99px;
  background: #d5d9e0; margin: 6px auto 14px;
}
.sheet h3 { margin: 0 0 14px; font-size: 16px; font-weight: 660; }
.field { margin-bottom: 12px; }
.field label {
  display: block; font-size: 12px; color: var(--muted); margin-bottom: 6px;
}
.field-row { display: flex; gap: 10px; }
.field-row > * { flex: 1; }

/* ---------- 同步点 ---------- */
.sync-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--income);
}
.sync-dot.off { background: var(--expense); }
.sync-dot.pending { background: var(--warn); }

/* ---------- 滚动条 ---------- */
.view::-webkit-scrollbar, .sheet::-webkit-scrollbar,
#hmBody::-webkit-scrollbar, .chips::-webkit-scrollbar { width: 0; height: 0; }

/* ---------- 小屏微调 ---------- */
@media (max-width: 360px) {
  .amount-display .num { font-size: 32px; }
  .keypad button { height: 46px; font-size: 19px; }
  .home-stats b { font-size: 14px; }
}
