/* ============================================================
   轻账 · 记账 Web 应用 —— 基于 UI 设计方案「方案 01 · 轻账 现代清爽」
   主色 #2F6B4F · 辅色 #F2A33C · 支出 #E4572E · 背景 #F5F6F8
   ============================================================ */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  background: #E7E9ED;
  font-family: "Noto Sans SC", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", system-ui, sans-serif;
  color: #1C2530;
  -webkit-font-smoothing: antialiased;
}

/* ===== 应用容器 ===== */
.app {
  position: relative;
  width: 100%;
  max-width: 480px;
  min-height: 100vh;
  margin: 0 auto;
  background: #F5F6F8;
  padding: calc(env(safe-area-inset-top, 0px) + 22px) 20px calc(env(safe-area-inset-bottom, 0px) + 96px);
  box-shadow: 0 0 0 1px rgba(0,0,0,.03), 0 0 40px rgba(28,37,48,.06);
  display: flex;
  flex-direction: column;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

/* ===== 图标 ===== */
.ic { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.ic.mini { width: 14px; height: 14px; }
.ic.md { width: 18px; height: 18px; }
.ic.sm { width: 17px; height: 17px; }
.ic.arrow { width: 14px; height: 14px; color: #C6CCD4; margin-left: auto; }

/* ===== 首页 ===== */
.v1-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 14px; }
.v1-greet { font-size: 22px; font-weight: 700; letter-spacing: -0.5px; }
.v1-sub { font-size: 12px; color: #8A93A0; margin-top: 4px; }
.v1-top-icons { display: flex; align-items: center; gap: 10px; }
.v1-iconbtn {
  width: 36px; height: 36px; border-radius: 50%; background: #fff; border: 1px solid #ECEEF2;
  display: flex; align-items: center; justify-content: center; color: #4A5560;
}
.v1-avatar {
  width: 36px; height: 36px; border-radius: 50%; background: #2F6B4F; color: #fff; font-size: 14px;
  font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.v1-card { background: #fff; border-radius: 20px; padding: 16px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(28,37,48,.04), 0 6px 18px rgba(28,37,48,.05); }
.v1-bal { display: flex; flex-direction: column; gap: 8px; }
.v1-bal-label { font-size: 12px; color: #8A93A0; }
.v1-bal-num { font-size: 34px; font-weight: 700; letter-spacing: -1px; font-variant-numeric: tabular-nums; line-height: 1.1; }
.v1-bal-io { display: flex; gap: 20px; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.v1-in { color: #2F6B4F; display: flex; align-items: center; gap: 4px; }
.v1-out { color: #E4572E; display: flex; align-items: center; gap: 4px; }
.v1-budget { margin-top: 6px; }
.v1-budget-bar { height: 6px; border-radius: 3px; background: #EEF1F4; overflow: hidden; }
.v1-budget-bar i { display: block; height: 100%; border-radius: 3px; background: #2F6B4F; }
.v1-budget-txt { font-size: 11px; color: #8A93A0; margin-top: 7px; font-variant-numeric: tabular-nums; }
.v1-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.v1-card-head b { font-size: 15px; font-weight: 700; }
.v1-link { font-size: 12px; color: #8A93A0; }
button.v1-link { cursor: pointer; }
.v1-pie-row { display: flex; align-items: center; gap: 16px; }
.pie-wrap { position: relative; width: 118px; height: 118px; flex: none; }
.pie-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.pie-center b { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pie-center span { font-size: 10px; color: #8A93A0; margin-top: 2px; }
.v1-legend { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.v1-lg-row { display: flex; align-items: center; gap: 8px; font-size: 12px; }
.v1-lg-dot { width: 8px; height: 8px; border-radius: 3px; flex: none; }
.v1-lg-name { color: #4A5560; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.v1-lg-amt { font-variant-numeric: tabular-nums; color: #2B3540; }
.v1-lg-pct { width: 36px; text-align: right; color: #8A93A0; font-variant-numeric: tabular-nums; }
.v1-actions { display: flex; gap: 10px; margin-bottom: 12px; }
.v1-btn {
  flex: 1; height: 46px; border-radius: 16px; border: 1px solid #E6E9EE; background: #fff;
  font-size: 14px; font-weight: 600; color: #2B3540; display: flex; align-items: center;
  justify-content: center; gap: 6px; font-family: inherit;
}
.v1-btn-primary { background: #2F6B4F; border-color: #2F6B4F; color: #fff; box-shadow: 0 8px 18px rgba(47,107,79,.28); }
.v1-list { padding-bottom: 6px; }
.v1-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; }
.v1-row + .v1-row { border-top: 1px solid #F1F3F6; }
.v1-icbg {
  width: 38px; height: 38px; border-radius: 12px; display: flex; align-items: center;
  justify-content: center; flex: none;
}
.v1-row-name { font-size: 14px; font-weight: 500; }
.v1-row-time { font-size: 11px; color: #9AA3AE; margin-top: 2px; }
.v1-row-amt { margin-left: auto; font-size: 14px; font-weight: 600; font-variant-numeric: tabular-nums; }
.v1-amt-out { color: #E4572E; }
.v1-amt-in { color: #2F6B4F; }

/* ===== 底部导航 ===== */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
  display: flex; background: #fff; border-top: 1px solid #ECEEF2; padding: 8px 8px calc(env(safe-area-inset-bottom, 0px) + 4px);
  margin: 0 auto; max-width: 480px;
}
.tab { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 10px; color: #9AA3AE; }
.tab.on { color: #2F6B4F; }
.tab.on .ic { stroke-width: 2.2; }

/* ===== 悬浮记账按钮 ===== */
.fab {
  position: fixed; right: max(16px, calc((100vw - 480px) / 2 + 16px)); bottom: calc(env(safe-area-inset-bottom, 0px) + 92px);
  width: 54px; height: 54px; border-radius: 50%; background: #2F6B4F; color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 10px 24px rgba(47,107,79,.38); z-index: 60;
}
.fab .ic { width: 24px; height: 24px; stroke-width: 2.2; }

/* ===== 记一笔 ===== */
.sub-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 2px 10px; }
.sub-title { font-size: 16px; font-weight: 600; }
.sub-title.left { flex: 1; font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.sub-right { display: flex; align-items: center; gap: 8px; }
.ic-btn {
  width: 36px; height: 36px; border-radius: 50%; border: 1px solid #E6E9EE; background: #fff;
  display: flex; align-items: center; justify-content: center; color: #4A5560;
}
.ic-btn.ghost { border-color: transparent; background: transparent; }
.textbtn { font-size: 15px; color: #4A5560; padding: 4px 8px; }
.textbtn.save { color: #2F6B4F; font-weight: 600; }
.v1-switch { display: flex; background: #EAEDF1; border-radius: 12px; padding: 3px; width: 100%; max-width: 280px; align-self: center; margin: 4px auto 2px; }
.v1-switch span { flex: 1; text-align: center; height: 34px; line-height: 34px; border-radius: 9px; font-size: 13px; color: #7A8492; cursor: pointer; }
.v1-switch span.on { background: #fff; color: #1C2530; font-weight: 600; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.v1-amount { text-align: center; padding: 14px 0 8px; display: flex; align-items: center; justify-content: center; gap: 4px; }
.amount-symbol { font-size: 26px; font-weight: 700; color: #1C2530; }
.amount-input {
  width: 70%; text-align: center; font-size: 44px; font-weight: 700; letter-spacing: -1px;
  font-variant-numeric: tabular-nums; border: none; outline: none; background: transparent;
  color: #1C2530; font-family: inherit;
}
.amount-input::placeholder { color: #C9CFD6; }
.v1-addlabel { font-size: 13px; font-weight: 600; margin: 14px 2px 10px; }
.v1-cats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px 8px; }
.v1-cat { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 6px 0; border-radius: 14px; cursor: pointer; }
.v1-cat .v1-icbg { width: 44px; height: 44px; border-radius: 50%; background: #F0F2F5; color: #5A6572; }
.v1-cat.on .v1-icbg { background: #E4F0E9; color: #2F6B4F; box-shadow: inset 0 0 0 1.5px #2F6B4F; }
.v1-cat span { font-size: 11px; color: #5A6572; }
.v1-cat.on span { color: #2F6B4F; font-weight: 600; }
.v1-addrows { padding: 4px 16px; }
.v1-addrow { display: flex; align-items: center; gap: 10px; padding: 13px 0; font-size: 13px; color: #5A6572; }
.v1-addrow + .v1-addrow { border-top: 1px solid #F1F3F6; }
.v1-addrow .ic { color: #9AA3AE; }
.addrow-label { flex: none; }
.addrow-input { flex: 1; border: none; outline: none; font-size: 13px; color: #1C2530; background: transparent; font-family: inherit; text-align: right; }
.addrow-input::placeholder { color: #9AA3AE; }
.addrow-input.date { flex: 0 0 auto; text-align: right; }
.addrow-input.time { flex: 0 0 auto; width: 74px; text-align: right; }
.addrow-select { border: none; outline: none; font-size: 13px; color: #1C2530; background: transparent; font-family: inherit; flex: 1; text-align: right; appearance: none; -webkit-appearance: none; }
.v1-quick { display: flex; gap: 8px; margin: 12px 0 14px; }
.v1-chip { flex: 1; text-align: center; height: 38px; line-height: 38px; border-radius: 12px; border: 1px solid #E6E9EE; background: #fff; font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; color: #2B3540; cursor: pointer; }
.v1-chip:active { background: #E4F0E9; border-color: #2F6B4F; color: #2F6B4F; }
.v1-addbtn { width: 100%; height: 50px; border-radius: 16px; margin-top: 4px; font-size: 15px; }

/* ===== 明细页 ===== */
.v1-det-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 12px; }
.v1-det-title { font-size: 20px; font-weight: 700; letter-spacing: -0.5px; }
.v1-monthchip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 10px; border-radius: 99px;
  border: 1px solid #E6E9EE; background: #fff; font-size: 12px; color: #4A5560; font-weight: 500;
  font-variant-numeric: tabular-nums;
}
.month-arrow { font-size: 14px; color: #8A93A0; padding: 0 2px; line-height: 1; }
.month-arrow.dim { color: #D5DAE0; }
.v1-filters { display: flex; gap: 8px; }
.v1-fbtn {
  height: 32px; padding: 0 16px; border-radius: 99px; border: 1px solid #E6E9EE; background: #fff;
  font-size: 12px; color: #5A6572; display: flex; align-items: center;
}
.v1-fbtn.on { background: #2F6B4F; border-color: #2F6B4F; color: #fff; font-weight: 600; }
.v1-det-sum {
  display: flex; justify-content: space-between; background: #fff; border-radius: 14px; padding: 10px 14px;
  font-size: 12px; color: #5A6572; margin: 12px 0 2px; font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 2px rgba(28,37,48,.04), 0 4px 12px rgba(28,37,48,.04);
}
.v1-det-sum b { color: #1C2530; font-weight: 600; }
.v1-ghead { display: flex; align-items: baseline; justify-content: space-between; padding: 16px 2px 6px; }
.v1-ghead b { font-size: 13px; font-weight: 600; color: #2B3540; }
.v1-ghead span { font-size: 11px; color: #9AA3AE; font-variant-numeric: tabular-nums; }
.v1-det-list { padding: 4px 16px 6px; }
.row-del { margin-left: 4px; color: #C6CCD4; display: flex; }
.row-del .ic { width: 16px; height: 16px; }

/* ===== 报表页 ===== */
.v1-kpis { display: flex; gap: 10px; margin-bottom: 12px; }
.v1-kpi { flex: 1; background: #fff; border-radius: 18px; padding: 10px 12px; box-shadow: 0 1px 2px rgba(28,37,48,.04), 0 4px 12px rgba(28,37,48,.04); }
.v1-kpi span { font-size: 11px; color: #8A93A0; }
.v1-kpi b { display: block; font-size: 16px; font-weight: 700; margin-top: 5px; font-variant-numeric: tabular-nums; }
.v1-kpi i { font-style: normal; font-size: 10px; margin-top: 2px; display: block; font-variant-numeric: tabular-nums; }
.v1-kpi .up { color: #2F6B4F; }
.v1-kpi .down { color: #E4572E; }
.v1-charthead { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.v1-charthead b { font-size: 15px; font-weight: 700; }
.v1-legend { display: flex; gap: 14px; font-size: 11px; color: #8A93A0; }
.v1-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 5px; }
.v1-rank { display: flex; align-items: center; gap: 10px; padding: 6px 0; }
.v1-rank + .v1-rank { border-top: 1px solid #F1F3F6; }
.v1-rankname { width: 52px; font-size: 13px; color: #2B3540; flex: none; }
.v1-rankbar { flex: 1; height: 8px; border-radius: 4px; background: #F0F2F5; overflow: hidden; }
.v1-rankbar i { display: block; height: 100%; border-radius: 4px; }
.v1-rankamt { width: 74px; text-align: right; font-size: 12px; font-variant-numeric: tabular-nums; flex: none; color: #2B3540; }
.v1-rankpct { width: 34px; text-align: right; font-size: 12px; color: #8A93A0; font-variant-numeric: tabular-nums; flex: none; }
.v1-budrow { display: flex; align-items: center; gap: 10px; padding: 7px 0; }
.v1-budrow + .v1-budrow { border-top: 1px solid #F1F3F6; }
.v1-budname { width: 52px; font-size: 13px; flex: none; color: #2B3540; }
.v1-budbar { flex: 1; height: 8px; border-radius: 4px; background: #F0F2F5; overflow: hidden; }
.v1-budbar i { display: block; height: 100%; border-radius: 4px; }
.v1-budtxt { width: 132px; text-align: right; font-size: 11px; font-variant-numeric: tabular-nums; flex: none; }
.v1-budtxt.over { color: #E4572E; font-weight: 600; }
.v1-budtxt.ok { color: #2F6B4F; font-weight: 600; }

/* ===== 我的页 ===== */
.v1-me-top { display: flex; align-items: center; gap: 14px; padding: 2px 2px 14px; }
.v1-me-avatar { width: 52px; height: 52px; border-radius: 50%; background: #2F6B4F; color: #fff; font-size: 19px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.v1-me-name { font-size: 19px; font-weight: 700; }
.v1-me-id { font-size: 12px; color: #8A93A0; margin-top: 3px; }
.v1-me-stats { display: flex; background: #fff; border-radius: 20px; padding: 12px 6px; margin-bottom: 12px; box-shadow: 0 1px 2px rgba(28,37,48,.04), 0 6px 18px rgba(28,37,48,.05); }
.v1-me-stat { flex: 1; text-align: center; }
.v1-me-stat + .v1-me-stat { border-left: 1px solid #F1F3F6; }
.v1-me-stat b { display: block; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; }
.v1-me-stat span { font-size: 11px; color: #8A93A0; }
.v1-setrow { display: flex; align-items: center; gap: 12px; padding: 11px 0; font-size: 14px; color: #2B3540; width: 100%; text-align: left; }
.v1-setrow + .v1-setrow { border-top: 1px solid #F1F3F6; }
.v1-setrow .ic { color: #5A6572; }
.v1-setrow small { color: #9AA3AE; font-size: 12px; margin-left: auto; }
.set-input {
  margin-left: auto; width: 52px; height: 30px; border: 1px solid #E6E9EE; border-radius: 9px;
  text-align: center; font-size: 13px; font-family: inherit; font-variant-numeric: tabular-nums;
}
.switch { margin-left: auto; width: 44px; height: 26px; border-radius: 99px; background: #D5DAE0; position: relative; transition: background .2s; flex: none; }
.switch i { position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.2); transition: left .2s; }
.switch.on { background: #2F6B4F; }
.switch.on i { left: 21px; }
.logout-btn {
  width: 100%; height: 48px; border-radius: 16px; background: #fff; border: 1px solid #F0D9D0;
  color: #E4572E; font-size: 14px; font-weight: 600; margin-top: 6px;
}

/* ===== 弹窗 ===== */
.modal-mask { position: fixed; inset: 0; z-index: 100; background: rgba(28,37,48,.45); display: flex; align-items: flex-end; justify-content: center; }
.modal {
  width: 100%; max-width: 480px; background: #fff; border-radius: 24px 24px 0 0;
  padding: 18px 20px calc(env(safe-area-inset-bottom, 0px) + 16px); animation: slideUp .22s ease;
}
@keyframes slideUp { from { transform: translateY(30px); opacity: .6; } to { transform: translateY(0); opacity: 1; } }
.modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.modal-head b { font-size: 16px; font-weight: 700; }
.modal-x { width: 30px; height: 30px; border-radius: 50%; background: #F0F2F5; color: #5A6572; font-size: 15px; }
.modal-body { max-height: 60vh; overflow-y: auto; }
.modal-foot { display: flex; gap: 10px; margin-top: 16px; }
.modal-foot .v1-btn { height: 44px; border-radius: 14px; }
.bud-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; }
.bud-row + .bud-row { border-top: 1px solid #F1F3F6; }
.bud-name { width: 60px; font-size: 13px; font-weight: 500; }
.bud-used { flex: 1; font-size: 11px; color: #9AA3AE; font-variant-numeric: tabular-nums; }
.bud-input { width: 108px; height: 36px; border: 1px solid #E6E9EE; border-radius: 10px; text-align: right; padding: 0 10px; font-size: 13px; font-family: inherit; font-variant-numeric: tabular-nums; }
.cat-group-name { font-size: 12px; font-weight: 600; color: #8A93A0; margin: 10px 0 8px; }
.cat-manage-list { display: flex; flex-wrap: wrap; gap: 8px; }
.cat-chip {
  display: inline-flex; align-items: center; gap: 5px; background: #F0F2F5; border-radius: 99px;
  padding: 7px 12px; font-size: 12px; color: #2B3540;
}
.cat-chip .ic { width: 15px; height: 15px; color: #5A6572; }
.cat-del { font-style: normal; color: #C6CCD4; font-size: 13px; padding-left: 2px; cursor: pointer; }
.cat-del:hover { color: #E4572E; }
.cat-add-row { display: flex; gap: 8px; margin-top: 14px; }
.cat-add-type { height: 40px; border: 1px solid #E6E9EE; border-radius: 12px; padding: 0 10px; font-size: 13px; background: #fff; font-family: inherit; }
.cat-add-name { flex: 1; height: 40px; border: 1px solid #E6E9EE; border-radius: 12px; padding: 0 12px; font-size: 13px; font-family: inherit; outline: none; }
.cat-add-btn { height: 40px; padding: 0 18px; border-radius: 12px; background: #2F6B4F; color: #fff; font-size: 13px; font-weight: 600; }
.info-body { font-size: 13px; color: #5A6572; line-height: 1.9; padding: 4px 2px; }

/* ===== 空状态 / 提示 ===== */
.empty { text-align: center; font-size: 12px; color: #9AA3AE; padding: 18px 0; }

/* ===== 登录 / 注册 / 安装 ===== */
.auth-body { background: #E7E9ED; min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.auth-wrap { width: 100%; max-width: 400px; }
.auth-logo { text-align: center; margin-bottom: 22px; }
.auth-mark {
  width: 62px; height: 62px; margin: 0 auto 12px; border-radius: 20px; background: #2F6B4F; color: #fff;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 12px 26px rgba(47,107,79,.32);
}
.auth-mark .ic { width: 30px; height: 30px; stroke-width: 2; }
.auth-logo h1 { font-size: 26px; font-weight: 700; letter-spacing: 2px; color: #1C2530; }
.auth-logo p { font-size: 12px; color: #8A93A0; margin-top: 6px; letter-spacing: 1px; }
.auth-card { background: #fff; border-radius: 24px; padding: 24px; box-shadow: 0 1px 2px rgba(28,37,48,.04), 0 16px 40px rgba(28,37,48,.08); }
.auth-tabs { display: flex; gap: 8px; margin-bottom: 18px; }
.auth-tab { flex: 1; text-align: center; padding: 10px 0; border-radius: 12px; font-size: 14px; color: #7A8492; font-weight: 500; }
.auth-tab.on { background: #EAEDF1; color: #1C2530; font-weight: 600; }
.auth-label { display: block; font-size: 12px; color: #8A93A0; margin: 14px 2px 6px; }
.auth-input {
  width: 100%; height: 46px; border: 1px solid #E6E9EE; border-radius: 13px; padding: 0 14px;
  font-size: 14px; font-family: inherit; outline: none; background: #F9FAFB;
}
.auth-input.half { width: 48%; }
.auth-input:focus { border-color: #2F6B4F; background: #fff; }
.auth-row { display: flex; gap: 8px; }
.auth-btn {
  width: 100%; height: 48px; margin-top: 20px; border-radius: 14px; background: #2F6B4F; color: #fff;
  font-size: 15px; font-weight: 600; letter-spacing: 2px; box-shadow: 0 10px 22px rgba(47,107,79,.28);
}
.auth-tip { font-size: 11px; color: #9AA3AE; text-align: center; margin-top: 14px; line-height: 1.7; }
.auth-msg { font-size: 13px; border-radius: 12px; padding: 10px 14px; margin-bottom: 12px; }
.auth-msg.err { background: #FDEEEA; color: #C0432A; }
.auth-msg.ok { background: #E4F0E9; color: #2F6B4F; }
.engine-tabs { display: flex; gap: 8px; }
.engine-tab {
  flex: 1; border: 1px solid #E6E9EE; border-radius: 13px; padding: 12px; text-align: center; cursor: pointer; font-size: 13px; font-weight: 600;
}
.engine-tab input { display: none; }
.engine-tab span { display: block; font-size: 11px; color: #9AA3AE; font-weight: 400; margin-top: 3px; }
.engine-tab.on { border-color: #2F6B4F; background: #E4F0E9; color: #2F6B4F; }
.demo-check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: #5A6572; margin-top: 16px; cursor: pointer; }
.demo-check input { accent-color: #2F6B4F; width: 16px; height: 16px; }

/* ===== Toast 提示 ===== */
.toast {
  position: fixed; left: 50%; bottom: 120px; transform: translateX(-50%) translateY(10px);
  background: rgba(28,37,48,.92); color: #fff; font-size: 13px; padding: 10px 18px; border-radius: 99px;
  z-index: 200; opacity: 0; transition: all .25s; pointer-events: none; max-width: 80%; text-align: center;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
.toast.ok { background: rgba(47,107,79,.95); }
.toast.err { background: rgba(228,87,46,.95); }

/* ===== 管理员后台 ===== */
.admin-body { background: #E7E9ED; min-height: 100vh; padding: 24px 16px; }
.admin-app { max-width: 960px; margin: 0 auto; }

/* 管理员独立登录页 */
.admin-login-wrap { min-height: calc(100vh - 48px); display: flex; align-items: center; justify-content: center; }
.admin-login-card { width: 100%; max-width: 360px; background: #fff; border-radius: 24px; padding: 32px 28px; box-shadow: 0 1px 2px rgba(28,37,48,.04), 0 12px 32px rgba(28,37,48,.10); text-align: center; }
.admin-login-logo { width: 56px; height: 56px; margin: 0 auto 14px; border-radius: 18px; background: linear-gradient(135deg, #2F6B4F, #4C9A75); color: #fff; font-size: 24px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.admin-login-title { font-size: 20px; font-weight: 700; color: #1C2530; }
.admin-login-sub { font-size: 12px; color: #8A93A0; margin: 6px 0 22px; }
.admin-login-field { text-align: left; margin-bottom: 14px; }
.admin-login-field label { display: block; font-size: 12px; color: #5A6572; margin-bottom: 6px; }
.admin-login-field input { width: 100%; box-sizing: border-box; height: 44px; border: 1px solid #E3E7EC; border-radius: 12px; padding: 0 14px; font-size: 14px; outline: none; background: #F9FAFB; transition: border-color .15s, background .15s; }
.admin-login-field input:focus { border-color: #2F6B4F; background: #fff; }
.admin-login-err { background: #FDF0EC; color: #E4572E; font-size: 12px; border-radius: 10px; padding: 8px 12px; margin-bottom: 12px; text-align: left; }
.admin-login-btn { width: 100%; height: 46px; border: 0; border-radius: 14px; background: #2F6B4F; color: #fff; font-size: 15px; font-weight: 600; cursor: pointer; margin-top: 4px; }
.admin-login-btn:hover { background: #285C43; }
.admin-login-back { display: inline-block; margin-top: 18px; font-size: 12px; color: #8A93A0; text-decoration: none; }
.admin-login-back:hover { color: #2F6B4F; }

.admin-top { display: flex; align-items: center; justify-content: space-between; padding: 4px 2px 18px; }
.admin-title { font-size: 24px; font-weight: 700; letter-spacing: -0.5px; color: #1C2530; }
.admin-sub { font-size: 12px; color: #8A93A0; margin-top: 4px; }
.admin-kpis { display: flex; gap: 12px; margin-bottom: 14px; }
.admin-kpi { flex: 1; background: #fff; border-radius: 18px; padding: 14px 16px; box-shadow: 0 1px 2px rgba(28,37,48,.04), 0 6px 18px rgba(28,37,48,.05); }
.admin-kpi span { font-size: 12px; color: #8A93A0; }
.admin-kpi b { display: block; font-size: 22px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.admin-kpi i { font-style: normal; font-size: 11px; color: #9AA3AE; }
.admin-kpi i.in { color: #2F6B4F; }
.admin-kpi i.out { color: #E4572E; }
.admin-card { background: #fff; border-radius: 20px; padding: 18px; margin-bottom: 14px; box-shadow: 0 1px 2px rgba(28,37,48,.04), 0 6px 18px rgba(28,37,48,.05); }
.admin-card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.admin-card-head b { font-size: 16px; font-weight: 700; }
.admin-hint { font-size: 12px; color: #9AA3AE; }
.admin-addbox { display: flex; align-items: center; gap: 8px; background: #F6F8FA; border-radius: 12px; padding: 10px 12px; margin-bottom: 12px; }
.admin-addbox input { flex: 1; height: 36px; border: 1px solid #E3E7EC; border-radius: 10px; padding: 0 12px; font-size: 13px; outline: none; background: #fff; }
.admin-addbox input:focus { border-color: #2F6B4F; }
.admin-table-wrap { overflow-x: auto; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th { text-align: left; font-size: 12px; color: #8A93A0; font-weight: 500; padding: 8px 10px; border-bottom: 1px solid #F1F3F6; white-space: nowrap; }
.admin-table td { padding: 10px; border-bottom: 1px solid #F4F6F8; color: #2B3540; font-variant-numeric: tabular-nums; }
.admin-table tr:hover td { background: #F9FAFB; }
.admin-table td.num.in { color: #2F6B4F; font-weight: 600; }
.admin-table td.num.out { color: #E4572E; font-weight: 600; }
.badge { display: inline-block; font-size: 11px; padding: 2px 8px; border-radius: 99px; background: #F0F2F5; color: #5A6572; }
.badge.admin { background: #E4F0E9; color: #2F6B4F; font-weight: 600; }
.ops { white-space: nowrap; }
.op { font-size: 12px; color: #2F6B4F; margin-right: 8px; cursor: pointer; padding: 0; }
.op.add { background: #E4F0E9; color: #2F6B4F; border: 0; border-radius: 8px; padding: 6px 10px; font-weight: 600; }
.op.danger { color: #E4572E; }
.op.dim { color: #C6CCD4; }
.danger-ghost { background: #FDF0EC !important; color: #E4572E !important; }
.admin-empty { text-align: center; color: #9AA3AE; padding: 20px 0 !important; }
.admin-search { height: 34px; border: 1px solid #E3E7EC; border-radius: 9px; padding: 0 12px; font-size: 13px; outline: none; background: #fff; width: 180px; }
.admin-search:focus { border-color: #2F6B4F; }
.admin-setrow { display: flex; align-items: center; justify-content: space-between; }
.admin-backup-row { display: flex; gap: 24px; flex-wrap: wrap; }
.admin-backup-item { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex: 1; min-width: 260px; background: #F6F8FA; border-radius: 12px; padding: 12px 14px; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 46px; height: 26px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch .slider { position: absolute; cursor: pointer; inset: 0; background: #D5DBE2; border-radius: 99px; transition: background .2s; }
.switch .slider:before { content: ''; position: absolute; height: 20px; width: 20px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: transform .2s; box-shadow: 0 1px 3px rgba(28,37,48,.25); }
.switch input:checked + .slider { background: #2F6B4F; }
.switch input:checked + .slider:before { transform: translateX(20px); }

/* ===== 滚动条（桌面端） ===== */
@media (min-width: 520px) {
  .app { min-height: 100vh; }
}
