/* ============================================================
   财务收支工作台 · 视觉基线
   基调：冷调浅灰纸感 + 墨色文字 + 宝蓝点缀（#1E90FF / RGB 30,144,255）
   发丝级分隔线，克制阴影；收支语义色（收入绿 / 支出红）保留
   ============================================================ */
:root {
  /* 中性底色：冷调浅灰蓝，衬托主色不显脏 */
  --paper: #f3f6fa;
  --surface: #ffffff;
  --surface-2: #f7fafd;
  --ink: #1f2429;
  --ink-2: #59626d;
  --ink-3: #88919c;
  --ink-4: #b2b9c2;
  --line: #e3e8ef;
  --line-strong: #d2dae4;

  /* 主色：RGB(30,144,255) */
  --accent: #1e90ff;
  --accent-strong: #1577d6;      /* 悬停/按下 */
  --accent-ink: #0b5cae;         /* 浅底上的文字色 */
  --accent-soft: #e8f2fe;        /* 主色浅底 */
  --accent-line: #c8e0fb;        /* 主色浅描边 */
  --accent-rgb: 30, 144, 255;

  /* 收支语义色：保持绿涨红降式的财务可读性 */
  --in: #2b7355;
  --in-soft: #e8f1ec;
  --out: #ac4a35;
  --out-soft: #f8ece8;
  --warn: #9b7420;
  --warn-soft: #faf2df;
  --info: #34597f;

  --radius: 10px;
  --radius-sm: 7px;
  --shadow-1: 0 1px 2px rgba(23, 35, 51, 0.05);
  --shadow-2: 0 8px 28px rgba(23, 35, 51, 0.10);
  --sidebar-w: 216px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Source Han Sans SC", sans-serif;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { margin: 0; font-weight: 600; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; font-size: inherit; cursor: pointer; }
input, select, textarea { font-family: inherit; font-size: inherit; color: inherit; }
::selection { background: #d5e8fd; }

.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum"; }

/* ---------- 布局骨架 ---------- */
.app-root { min-height: 100%; }

.shell { display: flex; min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  flex: 0 0 var(--sidebar-w);
  border-right: 1px solid var(--line);
  padding: 22px 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  position: sticky;
  top: 0;
  height: 100vh;
  background: linear-gradient(180deg, #f7fafd 0%, #eef3f9 100%);
}

.brand { display: flex; align-items: center; gap: 9px; padding: 0 8px; }
.brand-mark {
  width: 26px; height: 26px; border-radius: 7px;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-size: 14px; font-weight: 700; letter-spacing: -0.02em;
}
.brand-name { font-size: 14.5px; font-weight: 600; letter-spacing: 0.01em; }
.brand-sub { font-size: 11px; color: var(--ink-3); letter-spacing: 0.06em; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-group-label {
  font-size: 10.5px; color: var(--ink-4); letter-spacing: 0.14em;
  padding: 0 12px 8px; text-transform: uppercase;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-2);
  font-size: 13.5px;
  position: relative;
  transition: background 0.15s ease, color 0.15s ease;
}
.nav-item:hover { background: rgba(var(--accent-rgb), 0.07); color: var(--ink); }
.nav-item.active { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--shadow-1); }
.nav-item.active::before {
  content: ""; position: absolute; left: -14px; top: 50%; transform: translateY(-50%);
  width: 3px; height: 17px; background: var(--accent); border-radius: 0 3px 3px 0;
}
.nav-item svg { width: 16px; height: 16px; flex: 0 0 16px; opacity: 0.75; }
.nav-item.active svg { opacity: 1; color: var(--accent); }
.nav-badge {
  margin-left: auto; font-size: 11px; color: var(--ink-3);
  font-variant-numeric: tabular-nums;
}

.sidebar-foot { margin-top: auto; display: flex; flex-direction: column; gap: 10px; }
.user-chip {
  display: flex; align-items: center; gap: 9px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.75);
}
.avatar {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--accent-soft); color: var(--accent-ink);
  display: grid; place-items: center; font-size: 12px; font-weight: 600;
}
.user-meta { min-width: 0; }
.user-name { font-size: 12.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-role { font-size: 10.5px; color: var(--ink-3); }
.icon-btn {
  border: 1px solid transparent; background: transparent; color: var(--ink-3);
  width: 26px; height: 26px; border-radius: 6px; display: grid; place-items: center;
}
.icon-btn:hover { background: rgba(0, 0, 0, 0.05); color: var(--ink); }

/* ---------- 主区 ---------- */
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  padding: 26px 34px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.72), rgba(243, 246, 250, 0));
}
.page-title { font-size: 21px; letter-spacing: -0.02em; }
.page-desc { font-size: 12.5px; color: var(--ink-3); margin-top: 3px; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }

.content { padding: 22px 34px 60px; flex: 1; }

/* ---------- 按钮 ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 34px; padding: 0 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-strong);
  background: var(--surface);
  color: var(--ink);
  font-size: 13px; font-weight: 500;
  transition: all 0.14s ease;
  white-space: nowrap;
}
.btn:hover { border-color: var(--ink-4); background: #fff; }
.btn:active { transform: translateY(0.5px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn-ghost:hover { background: rgba(0, 0, 0, 0.045); border-color: transparent; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-danger { color: var(--out); border-color: #e8cfc7; background: var(--out-soft); }
.btn-danger:hover { background: #f6e2dc; border-color: #ddb6ab; }
.btn-block { width: 100%; }

/* ---------- 表单 ---------- */
.field { display: flex; flex-direction: column; gap: 5px; }
.field > label { font-size: 12px; color: var(--ink-2); font-weight: 500; }
.field .hint { font-size: 11px; color: var(--ink-3); }
.input, .select, .textarea {
  height: 35px; padding: 0 10px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  outline: none;
  transition: border-color 0.14s ease, box-shadow 0.14s ease;
  width: 100%;
}
.textarea { height: auto; padding: 8px 10px; resize: vertical; min-height: 62px; line-height: 1.5; }
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--accent-rgb), 0.18);
}
.input::placeholder { color: var(--ink-4); }
.select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath d='M3 4.5L6 7.5L9 4.5' stroke='%238a9199' stroke-width='1.4' fill='none' stroke-linecap='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 9px center;
  padding-right: 26px;
}
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.form-grid .span-2 { grid-column: span 2; }
@media (max-width: 640px) { .form-grid { grid-template-columns: 1fr; } .form-grid .span-2 { grid-column: span 1; } }

/* ---------- 面板与分区 ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-1);
}
.panel-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
}
.panel-title { font-size: 13.5px; font-weight: 600; }
.panel-body { padding: 16px 18px; }
.panel-body.flush { padding: 0; }
.section-label {
  font-size: 10.5px; letter-spacing: 0.14em; color: var(--ink-4);
  text-transform: uppercase; font-weight: 600;
}

/* ---------- 指标条 ---------- */
.metrics {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: var(--shadow-1);
  overflow: hidden;
}
.metric { padding: 16px 18px 15px; border-right: 1px solid var(--line); position: relative; }
.metric:last-child { border-right: 0; }
.metric-label { font-size: 11.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.metric-value {
  font-size: 25px; font-weight: 600; letter-spacing: -0.025em; margin-top: 7px;
  font-variant-numeric: tabular-nums;
}
.metric-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.metric-value.in { color: var(--in); }
.metric-value.out { color: var(--out); }
.metric-value.accent { color: var(--accent-ink); }

.dash-grid { display: grid; grid-template-columns: 1.55fr 1fr; gap: 16px; margin-top: 16px; }
.dash-grid.tight { grid-template-columns: 1fr 1fr; }
@media (max-width: 1100px) { .dash-grid, .dash-grid.tight { grid-template-columns: 1fr; } }

/* ---------- 表格 ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th {
  text-align: left; font-weight: 500; font-size: 11.5px; color: var(--ink-3);
  padding: 9px 12px; border-bottom: 1px solid var(--line);
  background: var(--surface-2); white-space: nowrap; letter-spacing: 0.02em;
}
table.data td {
  padding: 11px 12px; border-bottom: 1px solid var(--line);
  vertical-align: middle;
}
table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:hover { background: #f7fafc; }
table.data td.right, table.data th.right { text-align: right; }
table.data .muted { color: var(--ink-3); }
.row-actions { display: flex; gap: 2px; justify-content: flex-end; opacity: 0.5; transition: opacity 0.15s; }
tr:hover .row-actions { opacity: 1; }

.amount { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: -0.01em; white-space: nowrap; }
.amount.in { color: var(--in); }
.amount.out { color: var(--out); }
.amount.neutral { color: var(--ink-2); }

.tag {
  display: inline-flex; align-items: center; gap: 4px;
  height: 20px; padding: 0 7px; border-radius: 5px;
  font-size: 11px; font-weight: 500; white-space: nowrap;
  background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line);
}
.tag.in { background: var(--in-soft); color: var(--in); border-color: #cfe3d8; }
.tag.out { background: var(--out-soft); color: var(--out); border-color: #eed6cd; }
.tag.move { background: #eef2f7; color: #4a5b6e; border-color: #dbe3ec; }
.tag.adjust { background: var(--warn-soft); color: var(--warn); border-color: #eddfbd; }
.tag.accent { background: var(--accent-soft); color: var(--accent-ink); border-color: var(--accent-line); }
.tag.plain { background: transparent; }
.dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }

/* ---------- 筛选条 ---------- */
.filter-bar {
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px;
  padding: 13px 16px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  border-radius: var(--radius) var(--radius) 0 0;
}
.filter-bar .field { min-width: 106px; }
.filter-bar .field.wide { min-width: 138px; }
.filter-bar .field.search { min-width: 190px; flex: 1 1 190px; }
.filter-bar .input, .filter-bar .select { height: 32px; font-size: 12.5px; background: #fff; }
.filter-actions { display: flex; gap: 6px; margin-left: auto; }

.seg {
  display: inline-flex; padding: 2px; background: #eef1f6;
  border-radius: 8px; border: 1px solid var(--line);
}
.seg button {
  border: 0; background: transparent; padding: 5px 12px; border-radius: 6px;
  font-size: 12.5px; color: var(--ink-2); font-weight: 500;
}
.seg button.active { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); font-weight: 600; }

/* ---------- 分页 ---------- */
.pager {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 16px; border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-3);
}
.pager-btns { display: flex; align-items: center; gap: 6px; }

/* ---------- 空状态 ---------- */
.empty { padding: 44px 20px; text-align: center; color: var(--ink-3); }
.empty-title { font-size: 13.5px; color: var(--ink-2); font-weight: 500; }
.empty-desc { font-size: 12px; margin-top: 5px; }

/* ---------- 弹窗 ---------- */
.overlay {
  position: fixed; inset: 0; background: rgba(34, 38, 42, 0.34);
  display: grid; place-items: center; padding: 20px; z-index: 60;
  backdrop-filter: blur(2px);
  animation: fade 0.16s ease;
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.modal {
  width: min(620px, 100%); max-height: min(88vh, 820px);
  background: var(--surface); border-radius: 14px;
  border: 1px solid var(--line-strong);
  box-shadow: var(--shadow-2);
  display: flex; flex-direction: column;
  animation: rise 0.18s cubic-bezier(0.2, 0.8, 0.3, 1);
}
@keyframes rise { from { transform: translateY(8px) scale(0.99); opacity: 0.6; } to { transform: none; opacity: 1; } }
.modal.wide { width: min(760px, 100%); }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 20px 13px; border-bottom: 1px solid var(--line);
}
.modal-title { font-size: 15px; font-weight: 600; }
.modal-body { padding: 18px 20px; overflow-y: auto; }
.modal-foot {
  display: flex; align-items: center; justify-content: flex-end; gap: 8px;
  padding: 13px 20px; border-top: 1px solid var(--line); background: var(--surface-2);
  border-radius: 0 0 14px 14px;
}
.modal-foot .left { margin-right: auto; }

/* ---------- 提示 ---------- */
#overlay-root .toast-stack {
  position: fixed; top: 18px; left: 50%; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: 8px; z-index: 90; align-items: center;
}
.toast {
  padding: 9px 15px; border-radius: 8px; font-size: 13px;
  background: #23272b; color: #f3f6fa; box-shadow: var(--shadow-2);
  animation: rise 0.18s ease;
  max-width: min(560px, 90vw);
}
.toast.err { background: #8e3a28; }
.toast.ok { background: var(--accent-ink); }

.banner {
  display: flex; align-items: flex-start; gap: 9px;
  padding: 10px 13px; border-radius: var(--radius-sm);
  font-size: 12.5px; border: 1px solid;
}
.banner.warn { background: var(--warn-soft); border-color: #ecdfbc; color: #7d5c14; }
.banner.info { background: var(--accent-soft); border-color: #cfe2da; color: var(--accent-ink); }
.banner.err { background: var(--out-soft); border-color: #eed6cd; color: #8e3a28; }

/* ---------- 登录页 ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.05fr 1fr; }
.login-art {
  position: relative; overflow: hidden;
  background:
    radial-gradient(110% 85% at 6% 96%, rgba(30, 144, 255, 0.55) 0%, rgba(30, 144, 255, 0) 58%),
    radial-gradient(95% 75% at 92% 4%, rgba(30, 144, 255, 0.30) 0%, rgba(30, 144, 255, 0) 62%),
    linear-gradient(155deg, #14508f 0%, #0d3872 55%, #07223f 100%);
  color: #f2f7fd;
  padding: 46px 48px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.login-art::after {
  content: ""; position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(115deg, rgba(255,255,255,0.032) 0 1px, transparent 1px 13px);
  pointer-events: none;
}
.login-art h1 { font-size: 30px; line-height: 1.32; letter-spacing: -0.02em; font-weight: 600; }
.login-art .lede { margin-top: 14px; font-size: 13.5px; color: rgba(242, 247, 253, 0.76); max-width: 380px; line-height: 1.75; }
.login-art .art-foot { font-size: 11.5px; color: rgba(242, 247, 253, 0.52); letter-spacing: 0.04em; }
.art-badges { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 26px; }
.art-badge {
  font-size: 11.5px; padding: 4px 9px; border-radius: 5px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07); color: rgba(242, 247, 253, 0.88);
}
.login-form-side { display: grid; place-items: center; padding: 34px; background: var(--paper); }
.login-card { width: min(360px, 100%); }
.login-card h2 { font-size: 19px; }
.login-card .sub { font-size: 12.5px; color: var(--ink-3); margin-top: 5px; margin-bottom: 22px; }
.login-form { display: flex; flex-direction: column; gap: 14px; }
.login-form .input { height: 40px; }
.login-error {
  font-size: 12.5px; color: #8e3a28; background: var(--out-soft);
  border: 1px solid #eed6cd; border-radius: var(--radius-sm); padding: 8px 11px;
}
@media (max-width: 860px) {
  .login-wrap { grid-template-columns: 1fr; }
  .login-art { padding: 30px 24px; min-height: 190px; }
  .login-art h1 { font-size: 22px; }
  .login-art .lede, .art-badges { display: none; }
  .login-form-side { padding: 24px; place-items: start center; }
}

/* ---------- 图表 ---------- */
.chart-legend { display: flex; gap: 14px; font-size: 11.5px; color: var(--ink-3); }
.chart-legend i { width: 7px; height: 7px; border-radius: 2px; display: inline-block; margin-right: 5px; }
.bars { display: flex; flex-direction: column; gap: 11px; }
.bar-row { display: grid; grid-template-columns: 96px 1fr 122px; gap: 10px; align-items: center; font-size: 12.5px; }
.bar-track { display: block; height: 7px; border-radius: 4px; background: #eef1f6; overflow: hidden; }
.bar-fill { display: block; height: 7px; border-radius: 4px; background: var(--accent); }
.bar-fill.out { background: #c4755f; }
.bar-fill.in { background: #4f9276; }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-2); }

/* ---------- 账户卡 ---------- */
.account-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(238px, 1fr)); gap: 12px; }
.account-card {
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface); padding: 15px 16px 13px;
  display: flex; flex-direction: column; gap: 9px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.account-card:hover { border-color: var(--line-strong); box-shadow: var(--shadow-1); }
.account-card.inactive { opacity: 0.62; }
.account-top { display: flex; align-items: center; justify-content: space-between; }
.account-name { font-weight: 600; font-size: 13.5px; display: flex; align-items: center; gap: 7px; }
.account-balance { font-size: 21px; font-weight: 600; letter-spacing: -0.025em; font-variant-numeric: tabular-nums; }
.account-balance.neg { color: var(--out); }
.account-foot { display: flex; align-items: center; justify-content: space-between; font-size: 11.5px; color: var(--ink-3); }

/* ---------- 明细行（移动端卡片式） ---------- */
.tx-list { display: flex; flex-direction: column; }
.tx-item {
  display: grid; grid-template-columns: 78px 1fr auto;
  gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line);
  align-items: center;
}
.tx-item:last-child { border-bottom: 0; }
.tx-date { font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tx-main { min-width: 0; }
.tx-title { font-size: 13px; font-weight: 500; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; }
.tx-sub { font-size: 11.5px; color: var(--ink-3); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tx-amount { text-align: right; font-size: 14.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.tx-amount small { display: block; font-size: 10.5px; font-weight: 400; color: var(--ink-3); }

/* ---------- 其它 ---------- */
.kv-list { display: flex; flex-direction: column; }
.kv {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 9px 0; border-bottom: 1px dashed var(--line); font-size: 12.5px;
}
.kv:last-child { border-bottom: 0; }
.kv .k { color: var(--ink-3); }
.kv .v { font-weight: 600; font-variant-numeric: tabular-nums; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.row { display: flex; align-items: center; gap: 8px; }
.row.between { justify-content: space-between; }
.muted { color: var(--ink-3); }
.small { font-size: 12px; }
.nowrap { white-space: nowrap; }
.spacer { flex: 1; }
.hidden { display: none !important; }

.alloc-box { border: 1px solid var(--line); border-radius: var(--radius-sm); overflow: hidden; }
.alloc-row {
  display: grid; grid-template-columns: 1fr 110px; gap: 8px; align-items: center;
  padding: 9px 11px; border-bottom: 1px solid var(--line); font-size: 12.5px;
}
.alloc-row:last-child { border-bottom: 0; }
.alloc-row .input { height: 30px; text-align: right; }
.alloc-caption { font-size: 11.5px; color: var(--ink-3); }

.mobile-tabbar { display: none; }

/* ---------- 响应式 ---------- */
@media (max-width: 900px) {
  .sidebar { display: none; }
  .topbar { padding: 18px 16px 14px; flex-wrap: wrap; }
  .page-title { font-size: 18px; }
  .content { padding: 14px 16px 92px; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .metric { border-bottom: 1px solid var(--line); }
  .metric:nth-child(2n) { border-right: 0; }
  .metric:nth-last-child(-n + 2) { border-bottom: 0; }
  .metric-value { font-size: 20px; }

  .mobile-tabbar {
    display: flex; position: fixed; bottom: 0; left: 0; right: 0; z-index: 40;
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid var(--line);
    padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
    backdrop-filter: blur(8px);
  }
  .mobile-tabbar a {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 4px 0; font-size: 10.5px; color: var(--ink-3);
  }
  .mobile-tabbar a.active { color: var(--accent-ink); font-weight: 600; }
  .mobile-tabbar svg { width: 19px; height: 19px; }

  table.data th, table.data td { padding: 9px 10px; }
  .filter-bar { padding: 11px 12px; }
  .filter-bar .field { min-width: calc(50% - 5px); flex: 1 1 calc(50% - 5px); }
  .filter-bar .field.search { flex: 1 1 100%; }
  .filter-actions { margin-left: 0; width: 100%; }
  .filter-actions .btn { flex: 1; }
  .modal { max-height: 92vh; }
  .modal-body { padding: 15px 15px; }
  .tx-item { grid-template-columns: 1fr auto; }
  .tx-date { grid-column: span 2; font-size: 11px; }
}

/* ---------- 趋势图 / 往来条 ---------- */
.trend { display: flex; align-items: flex-end; gap: 12px; height: 178px; padding: 10px 2px 0; }
.trend-col { flex: 1; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 7px; height: 100%; min-width: 0; }
.trend-bars { display: flex; align-items: flex-end; gap: 4px; height: 100%; width: 100%; justify-content: center; }
.trend-bars i { display: block; width: 12px; border-radius: 3px 3px 1px 1px; background: #4f9276; transition: filter .15s ease; }
.trend-bars i.out { background: #c4755f; }
.trend-bars i:hover { filter: brightness(0.92); }
.trend-label { font-size: 10.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; white-space: nowrap; }

.accounts-strip { display: grid; grid-template-columns: repeat(4, 1fr); }
.strip-item { padding: 13px 18px; border-right: 1px solid var(--line); display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.strip-item:last-child { border-right: 0; }
.strip-item:hover { background: #f7fafc; }
.strip-label { font-size: 12px; color: var(--ink-3); }
.strip-value { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.strip-value.in { color: var(--in); }
.strip-value.out { color: var(--out); }
.strip-meta { font-size: 11px; color: var(--ink-4); margin-left: auto; }
@media (max-width: 900px) {
  .accounts-strip { grid-template-columns: 1fr 1fr; }
  .strip-item { flex-direction: column; align-items: flex-start; gap: 1px; padding: 11px 14px; }
  .strip-meta { margin-left: 0; }
  .strip-item:nth-child(2n) { border-right: 0; }
  .strip-item:nth-child(-n + 2) { border-bottom: 1px solid var(--line); }
  .trend { height: 150px; }
}

/* ---------- 汇总条 ---------- */
.summary-strip {
  display: flex; flex-wrap: wrap; gap: 0;
  border-bottom: 1px solid var(--line);
  background: var(--surface);
}
.sum-item {
  display: flex; align-items: baseline; gap: 6px;
  padding: 10px 16px; border-right: 1px solid var(--line);
}
.sum-item:last-child { border-right: 0; }
.sum-label { font-size: 11.5px; color: var(--ink-3); }
.sum-value { font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sum-value.in { color: var(--in); }
.sum-value.out { color: var(--out); }
@media (max-width: 900px) {
  .sum-item { flex: 1 1 33%; border-bottom: 1px solid var(--line); padding: 8px 12px; }
  .sum-item:nth-child(3n) { border-right: 0; }
}

/* ---------- 进度条（核销比例） ---------- */
.mini-track { display: inline-block; width: 42px; height: 5px; border-radius: 3px; background: #e8edf3; overflow: hidden; }
.mini-track > span { display: block; height: 100%; background: var(--accent); border-radius: 3px; }
