*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; -webkit-tap-highlight-color: transparent; }

:root {
  /* 色板 - 精调柔和 */
  --green: #10b981; --green-bg: #ecfdf5; --green-bd: #a7f3d0;
  --red: #ef4444;   --red-bg: #fef2f2;   --red-bd: #fecaca;
  --blue: #6366f1;  --blue-bg: #eef2ff;  --blue-bd: #c7d2fe;
  --amber: #f59e0b; --amber-bg: #fffbeb; --amber-bd: #fde68a;
  --purple: #a855f7; --purple-bg: #faf5ff; --purple-bd: #e9d5ff;
  --text: #0f172a; --text-2: #334155; --sub: #64748b; --sub-2: #94a3b8;
  --line: #e2e8f0; --line-2: #f1f5f9;
  --bg: #f8fafc; --card: #ffffff;
  --sidebar-w: 220px;
  --sidebar-bg: #0f172a; --sidebar-2: #1e293b; --sidebar-text: #94a3b8;
  --sidebar-active: #6366f1; --sidebar-hover: rgba(255,255,255,.06);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.04);
  --shadow: 0 1px 3px rgba(0,0,0,.06), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 6px -1px rgba(0,0,0,.07), 0 2px 4px -2px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 15px -3px rgba(0,0,0,.08), 0 4px 6px -4px rgba(0,0,0,.05);
  --radius: 12px; --radius-sm: 8px; --radius-lg: 16px;
}
html { height: 100%; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
/* V264: 关闭页面级滚动锚定 — 筛选切换使表格变短/变长时, 浏览器不再"跟着旧行"自动挪滚动条,
   避免整页看起来上下跳动; 滚动位置只由代码显式控制(applyFilters/重渲染后的锚定) */
html, body { overflow-anchor: none; }
/* 整页禁止双指放大缩小 (页面跟着缩放很难用); 凭证大图的图片缩放由 lightbox 自行处理 */
html, body { touch-action: pan-x pan-y; }
body {
  font-family: 'HarmonyOS Sans SC', 'Noto Sans SC', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

/* ===== 侧边栏 ===== */
.sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--sidebar-w);
  background: var(--sidebar-bg); color: var(--sidebar-text);
  display: flex; flex-direction: column; z-index: 40;
  transition: transform .3s cubic-bezier(.4,0,.2,1);
}
.sidebar .logo {
  padding: 22px 18px 20px; display: flex; align-items: center; gap: 10px;
  border-bottom: 1px solid rgba(255,255,255,.06);
}
.logo-icon { width: 38px; height: 38px; border-radius: 10px;
  background: linear-gradient(135deg, var(--blue) 0%, #818cf8 100%);
  display: flex; align-items: center; justify-content: center; font-size: 19px;
  box-shadow: 0 2px 8px rgba(99,102,241,.3); }
.logo-text { display: flex; flex-direction: column; gap: 1px; }
.logo-title { font-size: 15px; font-weight: 700; color: #fff; letter-spacing: -.02em; }
.logo-sub { font-size: 10px; color: var(--sub-2); letter-spacing: .06em; text-transform: uppercase; }

.nav-list { flex: 1; padding: 12px 10px; overflow-y: auto; }
.nav-list::-webkit-scrollbar { width: 0; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  padding: 9px 12px; border: none; background: none; color: var(--sidebar-text);
  font-size: 14px; cursor: pointer; border-radius: var(--radius-sm); text-align: left;
  margin-bottom: 2px; transition: all .15s; font-weight: 500; }
.nav-item:hover { background: var(--sidebar-hover); color: #cbd5e1; }
.nav-item.active { background: var(--sidebar-active); color: #fff; font-weight: 600;
  box-shadow: 0 4px 12px -2px rgba(99,102,241,.4); }
.nav-item .ico { font-size: 17px; flex-shrink: 0; width: 20px; text-align: center; }

.sidebar-footer { padding: 14px 14px 16px; border-top: 1px solid rgba(255,255,255,.06);
  display: flex; flex-direction: column; gap: 12px; margin-top: auto; }
.btn-add {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; padding: 11px; border: none; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; cursor: pointer; font-family: inherit;
  background: linear-gradient(135deg, var(--blue) 0%, #818cf8 100%); color: #fff;
  box-shadow: 0 4px 12px -2px rgba(99,102,241,.35);
  transition: all .15s; }
.btn-add:hover { transform: translateY(-1px); box-shadow: 0 6px 16px -2px rgba(99,102,241,.45); }
.btn-add:active { transform: translateY(0); }
.btn-import-side {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 8px; padding: 9px; border: 1px solid #e4e7ec;
  border-radius: var(--radius-sm); background: #fff; color: #4b5563;
  font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer;
  transition: background .15s, border-color .15s; }
.btn-import-side:hover { background: #f8fafc; border-color: #d3d8df; }
.btn-settings-side {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  width: 100%; margin-top: 8px; padding: 9px; border: 1px solid #e4e7ec;
  border-radius: var(--radius-sm); background: #fff; color: #4b5563;
  font-size: 13px; font-weight: 500; font-family: inherit; cursor: pointer;
  transition: background .15s, border-color .15s; }
.btn-settings-side:hover { background: #f8fafc; border-color: #d3d8df; }

/* ===== 主区域 ===== */
.main-wrap { margin-left: var(--sidebar-w); min-height: 100vh; display: flex; flex-direction: column; }

/* 顶栏 */
.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.72);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  padding: 0 24px; height: 60px; display: flex; align-items: center; gap: 12px;
  border-bottom: none; }
.topbar .title { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.title-bar { display: flex; align-items: center; gap: 14px; flex: 1; }
/* sidebar 底部用户块 */
.user-block { display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,.04); border-radius: 12px; padding: 10px 12px; }
.user-avatar { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0;
  background: linear-gradient(135deg, #6366f1, #a855f7); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 15px; font-weight: 700; letter-spacing: -.01em; margin-left: auto; }
.user-info { flex: 0 1 auto; min-width: 0; text-align: right; }
.user-name { font-size: 13px; font-weight: 600; color: #e2e8f0;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.role-badge { font-size: 10px; font-weight: 600; padding: 1px 7px; border-radius: 20px;
  display: inline-block; margin-top: 2px; }
.role-badge.role-boss { background: #92400e; color: #fbbf24; }
.role-badge.role-accountant { background: #3730a3; color: #a5b4fc; }
.role-badge.role-cashier { background: #065f46; color: #6ee7b7; }
.logout-btn { border: none; background: rgba(255,255,255,.08); color: #94a3b8;
  width: 32px; height: 32px; border-radius: 8px; cursor: pointer; display: flex;
  align-items: center; justify-content: center; transition: all .15s; flex-shrink: 0; }
.logout-btn:hover { background: rgba(239,68,68,.18); color: #f87171; }
.role-boss { background: var(--amber-bg); color: #b45309; }
.role-accountant { background: var(--blue-bg); color: #4338ca; }
.role-cashier { background: var(--green-bg); color: #047857; }
.month-wrap { position: relative; display: flex; align-items: center; gap: 8px; cursor: pointer;
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 5px 10px; min-height: 36px; }
.month-wrap:hover { border-color: var(--blue); }
.month-ico { color: var(--sub); pointer-events: none; flex-shrink: 0; }
.month-label { font-size: 14px; font-weight: 600; color: var(--text); user-select: none; pointer-events: none; }
.chevron-ico { color: var(--sub); pointer-events: none; flex-shrink: 0; transition: transform .15s; }
.month-wrap.open .chevron-ico { transform: rotate(180deg); }
.month-panel { position: absolute; top: 44px; left: 0; z-index: 40; width: 280px;
  background: #fff; border-radius: 14px; padding: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.15), 0 2px 6px rgba(0,0,0,.05);
  animation: popIn .15s ease-out; border: 1px solid rgba(0,0,0,.06); }
@keyframes popIn { from { opacity: 0; transform: translateY(-4px) scale(.98); } }
.mp-year { display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 12px; }
.mp-year button { border: none; background: none; cursor: pointer; width: 28px; height: 28px;
  border-radius: 6px; color: var(--sub); display: flex; align-items: center; justify-content: center; }
.mp-year button:hover { background: var(--bg); color: var(--text); }
.mp-year .y-label { font-size: 15px; font-weight: 700; letter-spacing: -.01em; }
.mp-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.mp-grid button { border: none; background: none; padding: 10px 0; border-radius: 8px; cursor: pointer;
  font-size: 13px; color: var(--text-2); transition: all .12s; }
.mp-grid button:hover:not(.disabled) { background: var(--bg); color: var(--text); }
.mp-grid button.active { background: var(--blue); color: #fff; font-weight: 600; }
.mp-grid button.today { outline: 1.5px solid var(--blue); outline-offset: -2px; }
.mp-grid button.disabled { color: var(--line-2); cursor: not-allowed; }
.mp-footer { display: flex; justify-content: space-between; margin-top: 10px; padding-top: 10px;
  border-top: 1px solid var(--line-2); }
.mp-footer button { border: none; background: none; cursor: pointer; font-size: 13px;
  color: var(--blue); font-weight: 500; padding: 4px 8px; border-radius: 6px; }
.mp-footer button:hover { background: var(--blue-bg); }
.card-wrap { display: flex; align-items: center; gap: 8px; font-weight: 600;
  background: #f2f2f7; border-radius: 10px; padding: 6px 12px; }
.store-wrap { display: flex; align-items: center; gap: 8px; font-weight: 600;
  background: rgba(99,102,241,.1); border-radius: 10px; padding: 6px 12px; }
.store-wrap .picker-label, .card-wrap .picker-label { font-weight: 600; }
.store-ico { color: var(--blue); pointer-events: none; flex-shrink: 0; }
.card-ico { color: var(--sub); pointer-events: none; flex-shrink: 0; }
.card-picker { border: none; background: none; font-size: 14px; color: var(--text);
  font-family: inherit; font-weight: 600; cursor: pointer; outline: none; }
/* === 自绘下拉面板 === */
.picker-wrap { position: relative; cursor: pointer; user-select: none; }
/* 表单/设置页里的 picker 灰底圆角，像 iOS input */
.form-body .picker-wrap, .field .picker-wrap {
  background: #f2f2f7; border-radius: 12px; padding: 8px 14px;
  font-size: 14px; transition: background .15s;
  display: flex; align-items: center; min-height: 36px; }
.form-body .picker-wrap:hover, .field .picker-wrap:hover { background: #e5e5ea; }
.form-body .picker-wrap.open, .field .picker-wrap.open { background: #fff; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.form-body .picker-wrap .picker-label, .field .picker-wrap .picker-label { flex: 1; font-size: 15px; color: var(--text); pointer-events: none; }
.picker-wrap .chevron-ico { color: #9ca3af; font-size: 12px; transition: transform .15s; margin-left: 4px; }
.picker-wrap.open .chevron-ico { transform: rotate(180deg); }
.picker-wrap input[type=hidden] { display: none; }
.picker-panel { display: none; position: absolute; top: calc(100% + 8px); left: 0; z-index: 60;
  min-width: 200px; background: #fff;
  border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.15), 0 2px 6px rgba(0,0,0,.05);
  padding: 6px; animation: popIn .15s ease-out; max-height: 280px; overflow-y: auto;
  border: 1px solid rgba(0,0,0,.06); }
.picker-wrap.open .picker-panel { display: block; }
.picker-panel button { display: flex; align-items: center; gap: 10px;
  width: 100%; border: none; background: none; cursor: pointer; outline: none;
  padding: 10px 14px; border-radius: 10px; font-size: 15px; color: var(--text);
  text-align: left; font-family: inherit; transition: background .1s; }
.picker-panel button:hover { background: #f2f2f7; }
.picker-panel button.active { background: rgba(99,102,241,.1); color: var(--blue); font-weight: 600; }
.picker-panel button .tick { width: 16px; flex-shrink: 0; }
.picker-panel button .tick svg { opacity: 0; }
.picker-panel button.active .tick svg { opacity: 1; }
/* V5_92: 上级店铺(有子店)在门店选择器里置灰不可点, 只作分组展示 */
.picker-panel button.dis { color: #b8b8bd; cursor: not-allowed; }
.picker-panel button.dis:hover { background: none; }
.picker-panel button.dis .tick { visibility: hidden; }
.picker-panel button.dis.active { background: rgba(99,102,241,.06); color: #8e8e93; }
.picker-panel .phint { margin-left: auto; flex: 0 0 auto; font-size: 11px; color: #c7c7cc; }
/* V5_80: 面板按内容撑宽、选项不换行(长卡号一行显示完整); 极端窄屏时省略号兜底 */
.picker-panel { width: max-content; max-width: calc(100vw - 24px); }
/* V260: 记账类目下拉全量展开, 不出现滚动条(同筛选面板口径) */
#catPicker .picker-panel { max-height: none; overflow-y: visible; }
.picker-panel button { white-space: nowrap; }
.picker-panel button > span:not(.tick) { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.menu-toggle { display: none; background: none; border: none; cursor: pointer;
  color: var(--text); padding: 4px; }

/* V5_61 max-width 1400→1800: 共享卡对账表需 1458px, 原上限导致表格横向溢出、sticky 操作列盖住记账备注 */
main { flex: 1; padding: 24px; max-width: 1800px; width: 100%; min-width: 0; overflow-x: hidden; }

/* ===== 卡片 ===== */
.card { background: #fff; border-radius: 16px; padding: 20px;
  margin-bottom: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
  min-width: 0; overflow: hidden; }
.row { display: flex; align-items: center; }
.between { justify-content: space-between; }
.muted { color: var(--sub); }
.small { font-size: 12px; }
.amount-out { color: var(--red); font-weight: 600; }
.amount-in { color: var(--green); font-weight: 600; }

/* ===== 按钮 ===== */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: none; border-radius: 12px; padding: 10px 18px; font-size: 14px;
  cursor: pointer; background: var(--blue); color: #fff; font-weight: 600;
  font-family: inherit; transition: opacity .15s, transform .08s; white-space: nowrap; flex-shrink: 0; }
.btn:hover { opacity: .9; }
.btn:active { transform: scale(.97); }
.btn.block { width: 100%; }
.btn.ghost { background: rgba(99,102,241,.12); color: var(--blue); }
.btn.ghost:hover { background: rgba(99,102,241,.2); }
.btn.gray { background: #f2f2f7; color: #6b7280; font-weight: 500; }
.btn.gray:hover { background: #e5e5ea; }
.btn.danger { background: rgba(239,68,68,.1); color: var(--red); font-weight: 600; }
.btn.danger:hover { background: rgba(239,68,68,.15); }
.btn.sm { padding: 5px 12px; font-size: 12px; border-radius: 8px; }
.btn.mini { padding: 8px 14px; font-size: 14px; border-radius: 10px; }
.btn:disabled { opacity: .4; pointer-events: none; }

/* 操作列: td 内按钮并排 */
.data-table td:last-child { white-space: nowrap; }
.data-table td:last-child .btn { margin-right: 6px; }
.data-table td:last-child .btn:last-child { margin-right: 0; }
/* 日期↔户名 紧凑间距 */
.bank-list-table .dense-x { padding-left: 10px; padding-right: 8px; }
/* 凭证 / 流水凭证 两列分开: 虚线分隔 + 各自留白 */
.bank-list-table .vc-cell { padding-left: 8px; padding-right: 10px; }
.bank-list-table .vc-bank { padding-left: 16px; border-left: 1px dashed var(--line); }
.bank-list-table th.vc-bank { border-left: 1px dashed var(--line); }
/* 金额列: 大额不省略(如 ¥150,505.00) */
.bank-list-table td.amt-dense { padding-left: 8px; padding-right: 10px; white-space: nowrap; overflow: visible; text-overflow: clip; }
/* 标记列: 备用金徽章不截断 */
.bank-list-table td.mark-cell { overflow: visible; }
.bank-list-table td.mark-cell .badge { white-space: nowrap; max-width: none; }
/* 列拖窄后文字直接裁切, 不显示省略号「…」(鼠标悬停 title 看全文) */
.data-table.bank-list-table td,
.data-table.bank-list-table td.nowrap-cell { text-overflow: clip; }
.data-table.bank-list-table td.nowrap-cell { overflow: hidden; }

/* 分段控件 */
.seg { display: flex; background: #f2f2f7; border-radius: 10px; padding: 3px;
  width: fit-content; }
.seg button { border: none; background: transparent; padding: 6px 14px; border-radius: 8px;
  font-size: 13px; color: #6b7280; cursor: pointer; font-family: inherit;
  font-weight: 500; transition: all .2s; }
.seg button.on { background: #fff; color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.08); }

/* 徽标 */
.badge { display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  padding: 3px 9px; border-radius: 20px; font-weight: 600;
  white-space: nowrap; flex-shrink: 0; letter-spacing: .01em; }
.badge.ok { background: rgba(16,185,129,.12); color: #059669; }
.badge.warn { background: rgba(245,158,11,.12); color: #d97706; }
.badge.miss { background: rgba(239,68,68,.12); color: #dc2626; }
.badge.info { background: rgba(99,102,241,.12); color: #4f46e5; }
.badge.gray { background: #f2f2f7; color: #6b7280; }
.badge.sug { background: rgba(16,185,129,.15); color: #059669; border: none; }
/* ========== 银行卡明细 tab ========== */
.bd-toolbar {
  display: flex; gap: 16px; align-items: center; flex-wrap: wrap;
  padding: 12px 14px; background: #fff; border-radius: 12px;
  margin-bottom: 12px; border: 1px solid #eef0f3;
}

/* ===== 收支 segmented 分段控件 ===== */
.bd-seg {
  display: inline-flex; align-items: center;
  background: #f2f3f5; border-radius: 10px; padding: 3px; gap: 2px;
  user-select: none; flex-shrink: 0;
}
.bd-seg-btn {
  padding: 6px 16px; border: none; border-radius: 8px;
  background: transparent; font-size: 13px; color: var(--sub); font-weight: 500;
  cursor: pointer; transition: all .18s ease;
  font-family: inherit;
}
.bd-seg-btn:hover { color: #1f2937; }
.bd-seg-btn.on {
  background: #fff; color: var(--text); font-weight: 600;
  box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

/* popover 风格下拉 picker */
.bd-pick {
  position: relative; display: inline-flex; align-items: center;
  height: 36px; padding: 0 12px; gap: 8px;
  background: #fff; border: 1px solid #e4e6eb; border-radius: 8px;
  font-size: 13px; color: #1f2937; cursor: pointer; user-select: none;
  transition: all .15s;
}
.bd-pick:hover { border-color: #c7ccd3; }
.bd-pick.open { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.bd-pick-ico { color: var(--sub); flex-shrink: 0; }
.bd-pick-label { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bd-pick-chv { color: var(--sub); flex-shrink: 0; transition: transform .2s; }
.bd-pick.open .bd-pick-chv { transform: rotate(180deg); }

.bd-pick-panel {
  position: absolute; top: calc(100% + 6px); left: 0; right: 0;
  background: #fff; border-radius: 10px; border: 1px solid #e4e6eb;
  box-shadow: 0 10px 32px rgba(0,0,0,.12); z-index: 1000;
  padding: 4px; max-height: 260px; overflow-y: auto;
  animation: bdPickIn .15s ease-out;
}
@keyframes bdPickIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}
/* 选项 —— 和顶部 picker-panel button 同款 */
.bd-pick-panel button {
  display: flex; align-items: center; gap: 10px;
  width: 100%; border: none; background: none; cursor: pointer; outline: none;
  padding: 10px 14px; border-radius: 10px; font-size: 14px; color: var(--text);
  text-align: left; font-family: inherit; transition: background .1s;
}
.bd-pick-panel button:hover { background: #f2f2f7; }
.bd-pick-panel button.active { background: rgba(99,102,241,.1); color: var(--blue); font-weight: 600; }
/* 勾号 —— 默认透明, active 才显示（和顶部 .picker-panel button .tick 完全一样） */
.bd-pick-panel button .tick { width: 16px; flex-shrink: 0; }
.bd-pick-panel button .tick svg { opacity: 0; }
.bd-pick-panel button.active .tick svg { opacity: 1; }
/* 分类小圆点 —— 代替图标 */
.bd-cat-dot {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid; flex-shrink: 0; box-sizing: border-box;
}

.bd-kw-wrap { position: relative; display: inline-flex; align-items: center; }
.bd-kw-icon { position: absolute; left: 10px; font-size: 11px; opacity: .55; pointer-events: none; }
.bd-kw {
  width: 200px; height: 30px; padding: 0 12px 0 28px;
  border: 1px solid #e4e6eb; border-radius: 15px;
  font-size: 12px; outline: none; transition: border-color .15s, background .15s; background: #fff;
}
.bd-kw:hover { border-color: #c7ccd3; background: #fafbfc; }
.bd-kw:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37,99,235,.12); background: #fff; }
/* V5_73e: 账户/店铺筛选下拉 = 系统自绘 picker(与顶部银行卡下拉同款, 紧凑一档) */
.uw-unit-picker { display: flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  background: #f2f2f7; border-radius: 15px; flex: 0 0 auto; transition: background .15s; }
.uw-unit-picker:hover { background: #e5e5ea; }
.uw-unit-picker.open { background: #fff; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.uw-unit-picker .picker-label { font-size: 12px; font-weight: 600; color: var(--text); pointer-events: none; }
.uw-unit-picker .picker-panel { min-width: 170px; }
.uw-unit-picker .picker-panel button { padding: 8px 12px; font-size: 13px; }
.uw-unit-picker .picker-panel button .tick { width: 14px; }
/* V251: 分店/店铺合并筛选(漏斗按钮 + 分层勾选面板) */
.uw-filter-wrap { position: relative; display: inline-flex; flex: 0 0 auto; }
.uw-filter-btn { display: inline-flex; align-items: center; gap: 6px; height: 30px; padding: 0 12px;
  background: #f2f2f7; border: none; border-radius: 15px; cursor: pointer;
  font-size: 12px; font-weight: 600; color: var(--text); transition: background .15s, color .15s; }
.uw-filter-btn:hover { background: #e5e5ea; }
.uw-filter-btn .chevron-ico { opacity: .55; }
.uw-filter-btn.on { background: #ede9fe; color: #6d28d9; }
/* V257: 双列面板(左=分店/店铺, 右=记账类目), 全量展开不滚动 */
.uw-filter-panel { position: absolute; top: calc(100% + 8px); right: 0; z-index: 60;
  display: flex; align-items: flex-start;
  background: #fff; border: 1px solid #e4e6eb; border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0,0,0,.16); padding: 6px; }
.uf-col { min-width: 148px; max-width: 210px; padding: 2px 0; }
.uf-col + .uf-col { border-left: 1px solid #eef0f3; margin-left: 6px; padding-left: 6px; }
.uf-col-h { font-size: 11px; font-weight: 700; color: #94a3b8; padding: 4px 10px 6px; letter-spacing: .5px; }
/* V267: 类目列 + 多列布局; V273: 支出 3 列后宽度自适应, 固定字号不缩放 */
.uf-cat-col { width: auto; min-width: 280px; max-width: none;
  /* V270: 圆润字体优先(鸿蒙/小米/苹方/幼圆), 并补 Noto Sans SC(本机实际可用, 与全局一致) */
  font-family: 'HarmonyOS Sans SC', 'MiSans', 'PingFang SC', 'YouYuan', 'Noto Sans SC', 'Microsoft YaHei', sans-serif; }
.uf-cat-cols { display: flex; gap: 4px; }
.uf-cat-sub { flex: 1 1 0; min-width: 132px; }
/* V266: 记账类目列内 支出/收入 分组小标题 */
.uf-cat-h { font-size: 11px; font-weight: 700; color: #94a3b8; padding: 8px 10px 3px; letter-spacing: .5px; }
.uf-n { margin-left: auto; font-size: 11px; font-weight: 400; color: #94a3b8; }
.uf-item.active .uf-n { color: #6d28d9; }
.uw-filter-panel[hidden] { display: none; }
/* V262: 下方空间不足时向上翻转 */
.uw-filter-panel.up { top: auto; bottom: calc(100% + 8px); }
/* V273: 向上翻转后仍超出视口顶部 → 钉到视口顶部并挂到 body(不出现滚动条, 标题完整可见, 不被顶栏遮挡) */
.uw-filter-panel.pin { position: fixed; right: auto; z-index: 100; }
/* V268: button 不继承 font-family(UA 默认 Arial), 显式 inherit 使圆润字体栈生效 */
.uf-item { display: flex; align-items: center; gap: 8px; width: 100%; padding: 8px 10px;
  border: none; border-radius: 8px; background: none; cursor: pointer; text-align: left;
  font-family: inherit;
  font-size: 13px; font-weight: 500; color: var(--text); white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; }
.uf-item:hover { background: #f2f2f7; }
.uf-item .tick { width: 14px; flex-shrink: 0; }
.uf-item .tick svg { opacity: 0; }
.uf-item.active { background: #ede9fe; color: #6d28d9; font-weight: 600; }
.uf-item.active .tick svg { opacity: 1; }
.uf-item.uf-g { font-weight: 600; }
.uf-item.uf-u { padding-left: 26px; color: #6b7280; font-size: 12.5px; }
.uf-item.uf-u.active { color: #6d28d9; }
.uf-group + .uf-group { border-top: 1px solid #eef0f3; margin-top: 4px; padding-top: 4px; }
.bd-stat { white-space: nowrap; }

/* 分类卡片横滚区 */
.bd-cat-wrap { margin-bottom: 6px; }
.bd-cat-scroll {
  display: grid; gap: 6px;
  grid-template-columns: repeat(auto-fill, minmax(95px, 1fr));
}

/* 分类卡片 */
.bd-cat-card {
  --cc-bg: #f5f5f4; --cc-fg: #44403c;
  background: var(--cc-bg); color: var(--cc-fg);
  padding: 6px 10px; border-radius: 10px;
  cursor: pointer; user-select: none;
  white-space: nowrap;
  overflow: hidden;
  border: 1.5px solid transparent;
  transition: transform .15s ease, box-shadow .15s, border-color .15s;
  line-height: 1.2;
  position: relative;
}
.bd-cat-card::after {
  content: ''; position: absolute; right: -12px; bottom: -12px;
  width: 50px; height: 50px; border-radius: 50%;
  background: var(--cc-fg); opacity: .08; pointer-events: none;
}
.bd-cat-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(0,0,0,.1);
}
.bd-cat-card.active {
  border-color: var(--cc-fg);
  box-shadow: 0 4px 14px rgba(0,0,0,.14);
}
.bd-cat-card-top,
.bd-cat-head {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 0;
}

.bd-cat-name {
  font-weight: 600; font-size: 11px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bd-cat-card-check {
  flex-shrink: 0; padding: 2px; color: var(--cc-fg);
}
.bd-cat-card-cnt,
.bd-cat-cnt {
  font-size: 10px; opacity: .7; margin-bottom: 0; font-weight: 500;
}
.bd-cat-card-amt,
.bd-cat-amt {
  font-size: 10px; font-weight: 600; opacity: .85;
}

/* 收支分组：大卡片 + 旗下分类小卡片（两列中间留距 + 竖分割线） */
.bd-sum-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 26px;
  margin-bottom: 12px; position: relative;
}
.bd-sum-grid::after { content: ''; position: absolute; left: 50%; top: 2px; bottom: 2px;
  width: 1px; background: #cbd5e1; }
.bd-sum-col { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.bd-sum-head { border-left: 3px solid var(--line); padding: 12px 14px; }
.bd-sum-head .lab { font-size: 12px; }
.bd-sum-head .val { font-size: 22px; }
.bd-sum-head:has(.amount-out) { border-left-color: var(--red); }
.bd-sum-head:has(.amount-in) { border-left-color: var(--green); }
.bd-cat-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 6px;
}
.bd-cat-empty { font-size: 11px; color: var(--sub-2); padding: 6px 2px; }
@media (max-width: 760px) {
  .bd-sum-grid { grid-template-columns: 1fr; gap: 12px; }
  .bd-sum-grid::after { display: none; }
}

/* 表格里的分类徽章 */
.bd-cat-badge {
  display: inline-block; padding: 4px 10px; border-radius: 12px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  cursor: default;
}
/* 行内分类 trigger — 彩色徽章 + 下拉箭头 */
.bd-cat-trigger {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 9px; border-radius: 12px;
  font-size: 11px; font-weight: 600; white-space: nowrap;
  cursor: pointer; line-height: 1.2;
  transition: filter .15s, transform .1s;
}
.bd-cat-trigger:hover { filter: brightness(.92); }
.bd-cat-trigger:active { transform: scale(.97); }
.bd-cat-trigger.open { filter: brightness(.88); }

/* 共享 popover panel — 和顶部银行卡 picker 同款 */
.bd-row-cat-panel {
  position: fixed; z-index: 2000;
  background: #fff; border-radius: 10px; padding: 3px;
  box-shadow: 0 8px 24px rgba(0,0,0,.16), 0 2px 6px rgba(0,0,0,.06);
  border: 1px solid #e4e6eb;
  min-width: 140px;
  animation: bdPickIn .15s ease-out;
}
.bd-row-cat-panel button {
  display: flex; align-items: center; gap: 8px;
  width: 100%; border: none; background: none; cursor: pointer;
  padding: 7px 10px; border-radius: 7px;
  font-size: 12px; color: var(--text); text-align: left;
  font-family: inherit; transition: background .1s;
}
.bd-row-cat-panel button:hover { background: #f2f2f7; }
.bd-row-cat-panel button.active {
  background: rgba(99,102,241,.1); color: var(--blue); font-weight: 600;
}
.bd-row-cat-panel button .tick { width: 16px; flex-shrink: 0; }
.bd-row-cat-panel button .tick svg { opacity: 0; }
.bd-row-cat-panel button.active .tick svg { opacity: 1; }
.bd-row-cat-panel button .bd-cat-dot {
  display: inline-block; width: 12px; height: 12px; border-radius: 50%;
  border: 2px solid; flex-shrink: 0; box-sizing: border-box;
}

/* 表格 — fixed 布局, 严格 fit 容器, 不产生横向滚动 */
.bd-table {
  width: 100%; border-collapse: collapse; background: #fff;
  table-layout: fixed; transform: translateZ(0);
}
.bd-table col.date     { width: 12%; }
.bd-table col.card     { width: 8%; }
.bd-table col.dir      { width: 5%;  }
.bd-table col.counter  { width: 18%; }
.bd-table col.summary  { width: 10%; }
.bd-table col.cat      { width: 9%;  }
.bd-table col.note     { width: 14%; }
.bd-table col.receipt  { width: 6%;  }
.bd-table col.amount   { width: 18%; }

/* 表头和单元格: 全部单行省略, 绝不换行 */
.bd-table th,
.bd-table td {
  padding: 8px 8px; font-size: 13px; line-height: 1.4;
  border-bottom: 1px solid var(--line-2);
  vertical-align: middle;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bd-table th {
  background: #f8fafc; font-weight: 600; font-size: 12px;
  color: var(--sub); text-align: left;
  white-space: nowrap; letter-spacing: .02em;
}
/* 金额列: 不截断 + 右对齐 */
.bd-table td.amt,
.bd-table th.amt-th {
  white-space: nowrap; text-align: right; overflow: visible;
  font-variant-numeric: tabular-nums;
}
/* 收支列: 左对齐, badge 不被截断 */
.data-table td.dir, .bd-table td.dir { padding: 7px 4px; text-align: center; vertical-align: middle; overflow: visible; white-space: nowrap; }
.data-table td.dir .badge, .bd-table td.dir .badge { overflow: visible; text-overflow: clip; max-width: none; white-space: nowrap; }
.data-table th.dir-th, .bd-table th.dir-th { overflow: visible; text-overflow: clip; text-align: center; }
/* 分类列: badge 长名不被裁剪 */
.data-table td.cat-cell { overflow: visible; white-space: nowrap; }
.data-table td.cat-cell .bd-cat-trigger { max-width: none; }
/* 日期里的余额允许换行 */
.bd-date .bd-bal { display: block; font-size: 10.5px; color: var(--sub-2); margin-top: 2px; white-space: normal; }
/* 备注 input */
.bd-table td .bd-note-input, .data-table td .bd-note-input { width: 100%; min-width: 0; padding: 5px 8px; font-size: 12.5px; }
.bd-table td .bd-cat-select { width: 100%; min-width: 70px; }

/* bd 表格 wrap 禁止横向滚动条 */
.bd-table-wrap { overflow-x: hidden; }

/* 凭证缩略图 — 更大 */
.bd-thumbs {
  display: flex; gap: 3px; align-items: center;
  position: relative;
}
.bd-thumbs img {
  width: 40px; height: 40px; object-fit: cover;
  border-radius: 6px; cursor: pointer;
  border: 1px solid #e4e6eb; background: #f8fafc;
}
.bd-thumbs img:hover { border-color: var(--blue); }
.bd-thumbs .bd-thumbs-more {
  font-size: 10px; color: #6b7280; font-weight: 600;
  padding: 3px 6px; border-radius: 5px;
  background: #f2f3f5; white-space: nowrap;
}

/* 备注 input */
.bd-note-input {
  width: 100%; box-sizing: border-box;
  padding: 5px 8px; border: 1px solid transparent; border-radius: 6px;
  font-size: 13px; background: transparent; color: #374151;
  outline: none; transition: all .15s;
}
.bd-note-input:hover { border-color: #e4e6eb; }
.bd-note-input:focus { border-color: var(--blue); background: #f8faff; }
.bd-note-input::placeholder { color: #c0c4cc; }

/* Toggle switch */
.switch { position: relative; display: inline-block; width: 38px; height: 20px; cursor: pointer; }
.switch input { display: none; }
.switch .slider {
  position: absolute; inset: 0; background: #d1d5db; border-radius: 20px;
  transition: background .2s;
}
.switch .slider::before {
  content: ''; position: absolute; left: 2px; top: 2px;
  width: 16px; height: 16px; background: #fff; border-radius: 50%;
  transition: transform .2s; box-shadow: 0 1px 3px rgba(0,0,0,.2);
}
.switch input:checked + .slider { background: var(--blue, #2563eb); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.switch.sm { width: 34px; height: 18px; }
.switch.sm .slider::before { width: 14px; height: 14px; transform: none; }
.switch.sm input:checked + .slider::before { transform: translateX(16px); }

.section-title { font-size: 16px; font-weight: 700; margin: 24px 0 12px;
  display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.section-title .count { background: #f1f5f9; border-radius: 20px; color: var(--sub);
  font-size: 12px; padding: 1px 10px; font-weight: 600; }
.empty { text-align: center; color: var(--sub-2); padding: 48px 0; font-size: 14px; }

/* ===== 仪表盘 ===== */
.dash-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px,1fr));
  gap: 16px; margin-bottom: 24px; }
.dash-card { background: #fff;
  border-radius: 12px; padding: 12px 14px; position: relative; overflow: hidden;
  transition: all .15s; box-shadow: 0 1px 3px rgba(0,0,0,.06); border: 2px solid transparent;
  cursor: pointer; }
.dash-card:hover { opacity: .85; }
.dash-card.on { border-color: var(--blue); background: rgba(99,102,241,.04); }
.dash-card .lab { font-size: 11px; color: var(--sub); margin-bottom: 4px; font-weight: 600; }
.dash-card .val { font-size: 18px; font-weight: 800; letter-spacing: -.03em; }
/* 余额卡片文字配色 */
.dash-card .val.bal-open { color: #64748b; }
.dash-card .val.bal-close { color: #2563eb; }
.dash-card .val.bal-latest { background: linear-gradient(90deg, #4f46e5, #0ea5e9); -webkit-background-clip: text; background-clip: text; color: transparent; }
.dash-card .lab.lab-open { color: #94a3b8; }
.dash-card .lab.lab-close { color: #60a5fa; }
.dash-card .lab.lab-latest { color: #818cf8; }
.dash-card .sub { font-size: 11px; color: var(--sub-2); margin-top: 4px; }
.dash-card .ico { font-size: 32px; position: absolute; right: 16px; top: 16px;
  opacity: .12; line-height: 1; }
.dash-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; margin-bottom: 20px; }
.dash-col h3 { font-size: 15px; font-weight: 700; margin-bottom: 12px; letter-spacing: -.01em; }

/* ===== 数据表格 ===== */
.table-wrap { overflow-x: auto; margin-bottom: 16px;
  border-radius: var(--radius); border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); background: #fff; }
.data-table { width: 100%; border-collapse: collapse; background: #fff; table-layout: fixed;
  transform: translateZ(0); }
/* records 表格单独 auto, 避免被全局 fixed 挤压 */
.data-table.rec-table { table-layout: auto; }
/* ===== 列宽拖拽调整 ===== */
.col-resize-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px;
  border: 1px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer;
  font-size: 13px; color: var(--text-2); font-family: inherit; transition: all .15s;
  white-space: nowrap; flex: 0 0 auto; }
.col-resize-toggle:hover { border-color: var(--blue); color: var(--blue); }
.col-resize-toggle.on { background: var(--blue); color: #fff; border-color: var(--blue); }

.data-table th { position: relative; }
.uw-table th { position: relative; }
.col-resizer { position: absolute; right: -3px; top: 0; bottom: 0; width: 6px;
  cursor: col-resize; z-index: 5; user-select: none; display: none; }
.col-resizer::before { content: ''; position: absolute; right: 2px; top: 15%; bottom: 15%;
  width: 2px; background: #7c3aed; opacity: 0.55; transition: opacity .15s, background .15s; border-radius: 2px; }
.col-resizer:hover::before, .col-resizer.active::before { opacity: 1; background: #5b21b6; }
body.col-resize-mode .data-table th .col-resizer,
body.col-resize-mode .uw-table th .col-resizer { display: block; }
body.col-resize-mode .data-table th,
body.col-resize-mode .uw-table th { cursor: default; }
body.col-resize-mode .data-table td, body.col-resize-mode .data-table th,
body.col-resize-mode .uw-table td, body.col-resize-mode .uw-table th {
  white-space: nowrap !important; overflow: hidden !important; text-overflow: clip !important; }
.col-resize-tip { position: fixed; z-index: 3000; background: var(--text); color: #fff;
  padding: 4px 10px; border-radius: 6px; font-size: 12px; pointer-events: none; display: none; }
.col-resize-tip.show { display: block; }
.data-table th { background: #f8fafc; padding: 11px 16px; text-align: left; font-size: 12px;
  font-weight: 600; color: var(--sub); border-bottom: 1px solid var(--line);
  white-space: nowrap; text-transform: uppercase; letter-spacing: .03em; }
.data-table td { padding: 12px 16px; font-size: 13px; border-bottom: 1px solid var(--line-2);
  vertical-align: middle; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.data-table tbody tr:last-child td { border-bottom: none; }
/* 银行卡列: 多张卡名用「、」连接, 允许换行完整显示, 不截断 */
.data-table td.card-col { white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
.data-table tbody tr { }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table .amt { font-weight: 700; white-space: nowrap; font-size: 14px; letter-spacing: -.01em; text-align: right; }
/* 主表金额列表头右对齐 */
.data-table th.amt-th { text-align: right; }
/* 凭证缩略图基础样式 (勿加 translateZ(0): 每个 .thumbs 都会升为 GPU 合成层, 一屏 200+ 层导致整页光栅化卡顿) */
.thumbs { display: flex; flex-wrap: nowrap; gap: 6px; align-items: center;
  overflow-x: auto; overflow-y: visible; scrollbar-width: thin; scrollbar-color: #bbb transparent; }
.thumbs::-webkit-scrollbar { height: 4px; }
.thumbs::-webkit-scrollbar-track { background: transparent; }
.thumbs::-webkit-scrollbar-thumb { background: #bbb; border-radius: 2px; }
.thumbs img { width: 56px; height: 56px; object-fit: cover;
  border-radius: 8px; border: 1px solid var(--line); cursor: pointer;
  flex-shrink: 0; -webkit-user-drag: none; user-select: none; }
/* 表格里的缩略图小一点 */
.data-table .thumbs img { width: 34px; height: 34px; border-radius: 6px; -webkit-user-drag: none; user-select: none; }
/* 流水凭证是 PDF 横向长条截图, 用宽矩形缩略图避免只裁出一条; 尺寸锁定不随列宽变化 */
.data-table .thumbs.thumbs-bank img { width: 34px; height: 34px; }
/* 统一对账页：银行流水凭证与记账凭证一致，统一用 34x34 方形缩略图（见 .uw-thumbs img），
   横向长条截图按 object-fit:cover 居中裁剪；点击/悬停看全图 */
/* 凭证列允许缩略图溢出显示, 列拖窄时图片不被裁切(图片尺寸固定) */
.data-table td:has(.thumbs), .data-table th:has(.thumbs),
.data-table td.vc-cell, .data-table th.vc-cell, .data-table td.v-top { overflow: visible; }
/* 银行流水缩略图条不产生自己的滚动条 */
.thumbs.bd-thumbs { overflow: visible; }
/* 凭证 hover 放大镜预览 */
.img-zoom-preview { position: fixed; z-index: 2000; pointer-events: none;
  max-width: 480px; max-height: 76vh; border-radius: 10px; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.35); display: none; line-height: 0; background: #fff; }
.img-zoom-preview.show { display: block; }
.img-zoom-preview img { max-width: 480px; max-height: 76vh; object-fit: contain; display: block; background: #fff; -webkit-user-drag: none; }
.img-zoom-preview.zoom-bank { max-width: none; max-height: none; }
.img-zoom-preview.zoom-bank img { width: 760px; max-width: 95vw; height: auto; max-height: 90vh; object-fit: contain; }
.img-zoom-preview.zoom-rec img { max-width: 400px; max-height: 62vh; }
/* 统一页：银行流水凭证放大预览（横向长条截图，够大才能看清字） */
.img-zoom-preview.zoom-uw-bank { max-width: none; max-height: none; }
.img-zoom-preview.zoom-uw-bank img { width: 900px; max-width: 94vw; height: auto; max-height: 88vh; object-fit: contain; }
.img-zoom-preview.zoom-uw-rec img { max-width: 560px; max-height: 82vh; }

/* ===== 匹配弹窗(可多选) ===== */
.pick-list { max-height: none; overflow-x: auto; overflow-y: auto; }
.pick-list .data-table { width: 100%; min-width: 460px; border-collapse: collapse; table-layout: fixed; }
.pick-list .data-table td,
.pick-list .data-table th { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 金额列不截断 */
.pick-list .data-table td.amt,
.pick-list .data-table td.amt-th,
.pick-list .data-table th.amt-th { overflow: visible; text-overflow: clip; }
/* pick-list 滚动由 .modal > * 规则统一处理 */
.modal .pick-sum, .modal .thumbs, .modal .section-title { flex-shrink: 0; }

.data-table.recon-main td .thumbs img { flex-shrink: 0; }
/* .thumbs 里的勾/叉 — flex 容器最后一个子项，紧贴最后一张图 */
.thumbs > .check-badge { flex-shrink: 0; margin-left: 6px; }
.v-top { vertical-align: top; }
.check-badge { width: 16px; height: 16px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; line-height: 0; font-size: 10px; font-weight: 700;
  color: #fff; }
.check-badge.ok { background: #22c55e; }
.check-badge.ok::before { content: '✓'; }
.check-badge.bad { background: #f59e0b; }
.check-badge.bad::before { content: '!'; font-weight: 800; }
.check-badge.pending { background: #cbd5e1; }
.check-badge.pending::before { content: '?'; font-size: 11px; font-weight: 700; }

/* 旧 receipt-amt 样式（保留兼容, 不再在新表中使用） */
.receipt-amt { font-size: 11px; margin-top: 4px; line-height: 1.3; }
.receipt-amt.amt-match { color: #059669; }
.receipt-amt.amt-mismatch { color: #dc2626; font-weight: 600; cursor: pointer; text-decoration: underline dotted; }

/* ===== 日期时间 picker ===== */
.dt-wrap .dt-panel { display: none; position: absolute; top: calc(100% + 8px); left: 0; right: auto; z-index: 60;
  background: #fff; border-radius: 14px; padding: 10px;
  box-shadow: 0 8px 24px rgba(0,0,0,.1), 0 1px 3px rgba(0,0,0,.04);
  border: 1px solid rgba(0,0,0,.06); box-sizing: border-box;
  min-width: 440px; overflow-y: hidden !important; scrollbar-width: none; -ms-overflow-style: none; }
.dt-wrap .dt-panel::-webkit-scrollbar { display: none !important; width: 0 !important; height: 0 !important; }
.dt-wrap.open .dt-panel { display: block; }
.dt-cal { margin-bottom: 8px; }
.dt-wrap .picker-label { font-size: 15px; color: var(--text); }
/* 日历部分 */
.dt-cal .dt-head { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.dt-cal .dt-nav { width: 26px; height: 26px; border: none; background: none; cursor: pointer;
  font-size: 14px; color: #6b7280; border-radius: 6px; transition: background .1s; font-family: inherit; }
.dt-cal .dt-nav:hover { background: #f2f2f7; color: var(--text); }
.dt-cal .dt-title { flex: 1; text-align: center; font-size: 13px; font-weight: 600; color: var(--text); }
.dt-cal .dt-week { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin-bottom: 2px; }
.dt-cal .dt-week span { font-size: 11px; color: #9ca3af; padding: 2px 0; font-weight: 500; }
.dt-cal .dt-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 1px; }
.dt-cal .dt-day { width: 32px; height: 28px; border: none; background: none; cursor: pointer;
  border-radius: 6px; font-size: 12px; color: var(--text); font-family: inherit;
  transition: background .12s, color .12s; }
.dt-cal .dt-day:hover { background: #f2f2f7; }
.dt-cal .dt-day.other { color: #d1d5db; }
.dt-cal .dt-day.today { color: var(--blue); font-weight: 600; position: relative; }
.dt-cal .dt-day.today::after { content: ''; position: absolute; bottom: 2px; left: 50%;
  transform: translateX(-50%); width: 3px; height: 3px; border-radius: 50%; background: var(--blue); }
.dt-cal .dt-day.sel { background: var(--blue); color: #fff !important; font-weight: 600; }
.dt-cal .dt-day.sel:hover { background: #4f46e5; }
.dt-cal .dt-day.today.sel::after { background: #fff; }
/* 时间滚轮 — iOS 闹钟风格 */
.dt-time { border-top: 1px solid rgba(0,0,0,.06); padding-top: 6px; }
.dt-cols { display: flex; gap: 12px; }
.dt-col { 
  flex: 1; 
  height: 180px; /* 5 个 item 可见 */
  overflow: hidden; /* 不让内容自己滚 */
  position: relative;
  background: #f9fafb; 
  border-radius: 8px;
  /* 上下渐隐遮罩 */
  -webkit-mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
  mask-image: linear-gradient(to bottom, transparent, black 20%, black 80%, transparent);
}
/* 中间蓝色选中指示框 */
.dt-col::after {
  content: '';
  position: absolute;
  top: 72px; left: 4px; right: 4px;
  height: 36px;
  background: rgba(99,102,241,.15);
  border-radius: 8px;
  pointer-events: none;
  z-index: 2;
  box-shadow: inset 0 0 0 1px rgba(99,102,241,.2);
}
.dt-col-track {
  display: flex;
  flex-direction: column;
  transition: transform .18s ease-out;
  /* track 自身也有 mask 的话会影响，让它透明由父级 dt-col 来 mask */
}
.dt-opt { 
  height: 36px; 
  line-height: 36px; 
  text-align: center; 
  font-size: 14px; 
  border-radius: 8px;
  color: #6b7280;
  cursor: pointer; 
  transition: color .12s;
}
.dt-opt:hover { color: #1e293b; }
.dt-opt.on { 
  color: var(--blue); 
  font-weight: 600; 
  font-size: 15px;
}
/* 底部按钮 */
.dt-foot { display: flex; justify-content: flex-end; gap: 6px; margin-top: 4px; }
.dt-btn { border: none; background: none; padding: 4px 14px; border-radius: 6px; cursor: pointer;
  font-size: 12px; color: var(--blue); font-family: inherit; font-weight: 500; transition: background .1s; }
.dt-btn:hover { background: rgba(99,102,241,.08); }
.receipt-amt.amt-mismatch:hover { opacity: .7; }
/* 手机记账(第1列) 和 银行流水(第4列) 自动截断长文本 */
.data-table.recon-main tbody tr td:nth-child(1),
.data-table.recon-main tbody tr td:nth-child(4) { max-width: 220px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 候选表: 小字体, 固定布局 */
.pick-list .data-table td { padding: 5px 8px; font-size: 12px; line-height: 1.3; vertical-align: middle; overflow: hidden; }
.pick-list .data-table th { padding: 5px 8px; font-size: 11px; white-space: nowrap; overflow: hidden; }
/* 通用不换行省略 */
.data-table td.nowrap-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 设置页银行卡表：列宽随内容自适应，单行完整显示 */
.data-table.auto-fit { table-layout: auto; }
.data-table.auto-fit td { overflow: visible; text-overflow: clip; }
/* 设置页银行卡表紧凑模式: 缩小字号与间距, 860px 容器内不出横向滚动条 */
.data-table.cards-fit th { padding: 10px 8px; font-size: 11px; }
.data-table.cards-fit td { padding: 9px 8px; font-size: 12px; }
.data-table.cards-fit td:last-child .btn { margin-right: 4px; }
.data-table td .nowrap-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 多笔金额容器: 整体右对齐 */
.data-table td.amt-cell { text-align: right; }
/* 弹窗里保持之前的 */
.pick-list .data-table td.nowrap-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pick-list .data-table td.amt, .pick-list .data-table td:last-child { text-align: right; white-space: nowrap; }
.pick-list .data-table td.nowrap-cell { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 除了 .cell-text 的文本列, 其他全部不换行 */
.pick-list .data-table td { white-space: nowrap; text-overflow: ellipsis; }
.pick-list .data-table td .cell-text { white-space: normal; }
/* 通用文本单元格: 2 行截断, 不拆汉字 */
.data-table .cell-text {
  white-space: normal; word-break: keep-all; overflow-wrap: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden; max-width: 100%;
}
/* matched 表结构化文本 */
.data-table .list-main {
  font-weight: 600; font-size: 14px; color: #1e293b;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
.data-table .list-sub {
  font-size: 12px; color: #94a3b8; margin-top: 2px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  line-height: 1.3;
}
/* 弹窗内的 cell-text 同样规则 */
.pick-list .data-table .cell-text {
  white-space: normal; word-break: keep-all; overflow-wrap: break-word;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical;
  overflow: hidden;
}
.pick-list tr { cursor: pointer; }
.pick-list tr.on { background: var(--blue-bg); }
.pick-list tr.sug.on { background: var(--blue-bg); }
.pick-list tr.pick-off { opacity: .45; cursor: default; }
/* 推测高亮: 金额合计最可能是当前记账对应的一组流水 */
.pick-list tr.sug { background: var(--green-bg); }
.pick-list tr.sug:hover { background: var(--green-bg); }
.badge.sug { background: var(--green, #10b981); color: #fff; border: none; }
.pick-list input[type="checkbox"] { pointer-events: none; }
.pick-sum { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap;
  gap: 6px; padding: 10px 2px 2px; font-size: 13px; color: var(--text-2); }
.pick-sum b { color: var(--text); }

/* ===== 弹窗/表单 ===== */
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.4);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  z-index: 50; display: flex; align-items: center; justify-content: center; }
.modal-mask[hidden] { display: none; }
/* 第二层浮层(如盖在向导上的确认框): 只再加一层轻遮罩, 不重复模糊/过度压暗 */
.modal-stack-mask { z-index: 60; background: rgba(0,0,0,.22);
  backdrop-filter: none; -webkit-backdrop-filter: none; }
.modal { background: #fff; width: 580px; max-width: 92vw; border-radius: 20px;
  max-height: 98vh; padding: 14px 18px 14px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.06);
  animation: modalIn .22s cubic-bezier(.4,0,.2,1);
  overflow-y: auto; overflow-x: hidden; }
/* pick-list（匹配弹窗）：需要 flex 让表格滚动 */
.modal-pick-list { display: flex; flex-direction: column; overflow: hidden; }
.modal.modal-wide { width: 900px; }
/* 确认框：窄而居中，紧凑小卡片 */
.modal.modal-confirm { width: 300px; max-width: 86vw; border-radius: 14px; padding: 16px 18px; }
.confirm-box { padding: 0; text-align: center; }
.modal .confirm-ico { width: 44px; height: 44px; border-radius: 50%; margin: 0 auto 10px;
  display: flex; align-items: center; justify-content: center; font-size: 21px; }
.confirm-ico.danger { background: var(--red-bg); box-shadow: inset 0 0 0 1px var(--red-bd); }
.confirm-ico.info { background: var(--blue-bg); box-shadow: inset 0 0 0 1px var(--blue-bd); }
.modal .confirm-title { font-size: 15.5px; font-weight: 700; margin-bottom: 6px; letter-spacing: -.01em; }
.modal .confirm-msg { font-size: 12.5px; color: var(--sub); line-height: 1.55; padding: 0 2px; }
.confirm-actions { display: flex; gap: 8px; margin-top: 16px; }
.confirm-actions .btn { flex: 1; padding: 8px; border-radius: 9px; font-size: 13px; }
.btn.cf-danger { background: var(--red); color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(239,68,68,.28); }
.btn.cf-danger:hover { background: #dc2626; }
.btn.cf-danger:active { transform: translateY(1px); }
.btn.cf-primary { background: var(--blue); color: #fff; font-weight: 600;
  box-shadow: 0 2px 8px rgba(99,102,241,.28); }
.btn.cf-primary:hover { background: #4f46e5; }
.btn.cf-primary:active { transform: translateY(1px); }
/* 所有直接子元素默认不收缩, 只有显式 flex:1 的才滚动 */
.modal > * { flex-shrink: 0; min-height: 0; }
.modal > .form-body,
.modal > form,
.modal > .pick-list { flex: 1; min-height: 0; overflow: auto; padding-right: 4px; margin-right: -4px; }
.modal > #impStep2,
.modal > .skipped-preview { flex: 1; min-height: 0; overflow-y: auto; overflow-x: hidden; padding-right: 4px; margin-right: -4px; }
.modal > .modal-actions, .modal .modal-actions { flex-shrink: 0; padding-top: 10px; margin-top: 0; gap: 10px; }
.modal > .modal-actions .btn { flex: 1; }
/* 表格里的按钮不 flex */
.data-table td:last-child .btn { flex: none; }
/* 只动 transform 不动 opacity：防止动画在后台标签页/渲染节流等情况下被冻结时弹窗停在透明状态 */
@keyframes modalIn { from { transform: scale(.96) translateY(8px); } }
.modal h3 { font-size: 18px; margin-bottom: 8px; font-weight: 700; letter-spacing: -.02em; }
.field { margin-bottom: 6px; }
.field label { display: block; font-size: 12px; color: #9ca3af; margin-bottom: 2px;
  font-weight: 500; letter-spacing: .02em; }
.field input[type=text], .field input[type=number], .field input[type=password],
.field input[type=datetime-local], .field select, .field textarea {
  width: 100%; border: none; border-radius: 12px;
  padding: 8px 14px; font-size: 14px; font-family: inherit; background: #f2f2f7;
  color: var(--text); transition: background .15s, box-shadow .15s; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; background: #fff;
  box-shadow: 0 0 0 3px rgba(99, 102, 241, .15); }
.field textarea { resize: vertical; min-height: 40px; }
/* iOS 风格 datetime-local: 隐藏原生日历图标 */
.field input[type=datetime-local]::-webkit-calendar-picker-indicator {
  opacity: .4; cursor: pointer; padding: 4px; border-radius: 6px;
  transition: opacity .15s; }
.field input[type=datetime-local]::-webkit-calendar-picker-indicator:hover { opacity: 1; }
.amount-input { font-size: 30px !important; font-weight: 700; text-align: center;
  letter-spacing: -.02em; padding: 8px 14px !important; color: var(--text);
  background: #f2f2f7 !important; border: none !important; caret-color: transparent;
  display: block; width: 100%; margin: 0; box-sizing: border-box; border-radius: 12px !important; }
/* 聚焦用内描边, 不超出输入框(避免被弹窗 overflow 裁切导致左侧框显示不全) */
.amount-input:focus { background: #fff !important;
  box-shadow: inset 0 0 0 2px rgba(99,102,241,.45) !important; }
.amount-input::placeholder { color: #d1d5db; }
/* 隐形焦点捕获器: 接管弹窗打开时浏览器自动落在金额框上的焦点 */
.focus-catcher { position: absolute; width: 1px; height: 1px; opacity: 0;
  border: none; padding: 0; margin: -1px 0 0 -1px; background: transparent; pointer-events: none; outline: none; }
/* 隐藏 number 输入框的上下步进箭头 */
.amount-input::-webkit-outer-spin-button,
.amount-input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.amount-input { -moz-appearance: textfield; appearance: textfield; }
/* 打开弹窗时不显示光标: 输入框失焦仍保持灰底 */
.amount-input:not(:focus) { background: #f2f2f7 !important; }
.type-toggle { display: flex; gap: 0; margin-bottom: 6px;
  background: #f2f2f7; border-radius: 12px; padding: 3px; }
.type-toggle button { flex: 1; padding: 8px 12px; border-radius: 10px;
  border: none; background: transparent; font-size: 14px; cursor: pointer;
  color: #6b7280; font-weight: 500; font-family: inherit; transition: all .2s; }
.type-toggle button.on { background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.08);
  color: var(--text); font-weight: 600; }
.type-toggle button.on.expense { color: var(--red); }
.type-toggle button.on.income { color: var(--green); }
.uploader { display: flex; gap: 6px; flex-wrap: wrap; }
.uploader .slot { width: 44px; height: 44px; border-radius: 10px; position: relative; }
.uploader .slot img { width: 100%; height: 100%; object-fit: cover; border-radius: 10px; }
.uploader .slot .del { position: absolute; top: -7px; right: -7px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--red); color: #fff; border: 2px solid #fff;
  font-size: 12px; display: flex; align-items: center; justify-content: center;
  cursor: pointer; box-shadow: var(--shadow-sm); }
.uploader .add { width: 44px; height: 44px; border: none;
  border-radius: 10px; background: #f2f2f7; color: #9ca3af;
  font-size: 22px; cursor: pointer; display: flex; align-items: center;
  justify-content: center; transition: background .15s; }
.uploader .add:hover { background: #e5e5ea; color: var(--blue); }

/* ===== 导入向导 ===== */
/* 来源标签页 */
.import-tabs { display: flex; gap: 6px; background: #f3f4f6; border-radius: 12px; padding: 4px; margin-bottom: 14px; }
/* 弹窗内门店选择行 */
.imp-store-row { display: flex; align-items: center; gap: 10px; background: var(--blue-bg);
  border: 1px solid var(--blue-bd); border-radius: 10px; padding: 8px 12px; margin-bottom: 2px; }
.imp-store-ico { font-size: 18px; flex-shrink: 0; }
.imp-store-label { font-size: 13px; font-weight: 600; color: var(--text-2); white-space: nowrap; }
.imp-store-pick { position: relative; flex: 1; display: flex; }
.imp-store-picker { display: flex; align-items: center; width: 100%; box-sizing: border-box;
  background: #fff; border: 1px solid var(--line); border-radius: 8px;
  padding: 7px 12px; transition: border-color .15s, box-shadow .15s, background .15s; }
.imp-store-picker:hover { border-color: var(--blue-bd); background: #fcfcff; }
.imp-store-picker.open { border-color: var(--blue); background: #fff;
  box-shadow: 0 0 0 3px var(--blue-bg); }
.imp-store-picker .picker-label { flex: 1; font-size: 14px; font-weight: 600;
  color: var(--text); pointer-events: none; white-space: nowrap; }
.imp-store-picker .picker-panel { min-width: 0; }
.imp-store-picker .picker-panel button { padding: 8px 12px; font-size: 13px;
  border-radius: 8px; gap: 8px; font-weight: 500; }
.imp-store-picker .picker-panel button.active { font-weight: 600; }
.imp-store-picker .picker-panel button .tick { width: 13px; }

/* 待导入文件列表 + 银行卡选择 */
.batch-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; margin-bottom: 8px; }
.batch-fname { flex: 1; min-width: 150px; font-size: 13.5px; font-weight: 600; }
.batch-card-pick { display: flex; align-items: center; gap: 7px; flex-shrink: 0; }
/* 自绘紧凑银行卡下拉(替代原生 select) */
.batch-card-picker { display: flex; align-items: center; width: 150px; min-width: 150px;
  flex: 0 0 auto; box-sizing: border-box;
  border: 1px solid var(--line); background: #fff; border-radius: 9px;
  padding: 6px 10px 6px 12px;
  transition: border-color .15s, box-shadow .15s, background .15s; }
.batch-card-picker:hover { border-color: var(--blue-bd); background: #fcfcff; }
.batch-card-picker.open { border-color: var(--blue); background: #fff;
  box-shadow: 0 0 0 3px var(--blue-bg); }
.batch-card-picker .picker-label { flex: 1; font-size: 13px; font-weight: 600;
  color: var(--text); pointer-events: none; white-space: nowrap; }
.batch-card-picker .chevron-ico { margin-left: 6px; }
.batch-card-picker .picker-panel { min-width: 0; padding: 5px; border-radius: 12px; }
.batch-card-picker .picker-panel button { padding: 7px 10px; font-size: 13px;
  border-radius: 8px; gap: 8px; font-weight: 500; }
.batch-card-picker .picker-panel button.active { font-weight: 600; }
.batch-card-picker .picker-panel button .tick { width: 13px; }
/* 未选卡的错误高亮 */
.batch-card-picker.pick-err { border-color: var(--red); box-shadow: 0 0 0 3px var(--red-bg); }
.batch-card-picker.pick-err .picker-label { color: var(--red); }
@media (max-width: 640px) {
  .batch-card-pick { width: 100%; }
  .batch-card-picker { flex: 1; }
}

/* 随手记: 识别结果摘要卡 (标题左, 收支徽章右, 省垂直空间) */
.ssj-summary-card { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; margin: 8px 0; padding: 11px 14px;
  background: var(--blue-bg); border: none; }
.ssj-summary-left { display: flex; align-items: center; gap: 10px; min-width: 0; }
.ssj-summary-badges { display: flex; gap: 8px; flex-shrink: 0; }
@media (max-width: 560px) {
  .ssj-summary-card { flex-direction: column; align-items: flex-start; }
  .ssj-summary-badges { width: 100%; }
}

/* 随手记: 账单块 + 账户行 */
.ssj-file-block { background: #fff; border: 1px solid var(--line); border-radius: 10px;
  padding: 9px 12px; margin-bottom: 10px; }
.ssj-file-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding-bottom: 8px; margin-bottom: 8px; border-bottom: 1px dashed var(--line); }
.ssj-file-name { font-size: 13.5px; }
.acct-item { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 6px 2px; transition: opacity .2s; }
.acct-item + .acct-item { border-top: 1px solid #f5f5f7; }
.acct-name { font-size: 13.5px; font-weight: 600; min-width: 120px; flex: 1; }
.import-tab { flex: 1; border: none; background: transparent; padding: 9px 12px; border-radius: 9px;
  font-size: 14px; font-weight: 600; color: #6b7280; cursor: pointer; transition: all .15s; }
.import-tab:hover { color: var(--text); }
.import-tab.active { background: #fff; color: var(--blue); box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.import-pane { display: none; }
.import-pane.active { display: block; }
.import-upload {
  border: 2px dashed #d1d5db; border-radius: 16px;
  padding: 40px 20px; text-align: center; cursor: pointer;
  background: linear-gradient(180deg, #fafafa 0%, #f3f4f6 100%); transition: all .18s;
  display: block; }
.import-upload:hover { border-color: var(--blue); background: rgba(99,102,241,.04);
  transform: translateY(-1px); }
.import-upload .ico { font-size: 44px; margin-bottom: 12px; display: block; }
.import-upload .hint { font-size: 14px; color: #6b7280; }
.import-upload .hint strong { color: var(--blue); font-weight: 600; }
/* 导入进度行 */
.import-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-bottom: 1px solid rgba(0,0,0,.05); }
.import-row:last-child { border-bottom: none; }
.import-row .name { flex: 1; font-size: 14px; color: var(--text); font-weight: 500; }
.import-row .st { font-size: 12px; padding: 4px 10px; border-radius: 8px; }
.import-row .st.ok { background: rgba(16,185,129,.12); color: #059669; }
.import-row .st.err { background: rgba(239,68,68,.12); color: #dc2626; }
.import-row .st.ing { background: #f2f2f7; color: #6b7280; }
.map-row { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.map-row label { width: 100px; flex-shrink: 0; font-size: 14px; color: #374151; font-weight: 500; }
.map-row select { flex: 1; background: #f2f2f7; border: none; border-radius: 10px;
  padding: 9px 12px; font-size: 14px; font-family: inherit; color: var(--text);
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 20 20'%3E%3Cpath fill='%239ca3af' d='M5.5 7.5l4.5 4.5 4.5-4.5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; padding-right: 32px; }
.map-row select:focus { outline: none; background: #fff; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.preview-table-wrap { border-radius: 12px; overflow: hidden; margin-top: 10px; }
.preview-table-wrap .data-table td { font-size: 12px; padding: 6px 10px; }
.modal-actions { display: flex; gap: 10px; margin-top: 12px; }
.modal-actions .btn { flex: 1; }
.confirm-body { font-size: 14px; color: var(--text); line-height: 1.6; padding: 4px 0 8px; }

/* ===== 对账卡片 ===== */
.recon-card { border-left: 4px solid var(--green); }
.recon-card.miss-r { border-left-color: var(--red); }
.recon-card.miss-b { border-left-color: var(--amber); }
.recon-card.clickable { cursor: pointer; transition: all .2s; }
.recon-card.clickable:hover { opacity: .85; }
.recon-card.clickable.active-summary { border-left-width: 6px; box-shadow: 0 0 0 2px var(--blue); }
:root { --red-soft: #fff5f5; --amber-soft: #fffbea; --green-soft: #f0f9f0; }
.section-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.diff-ok { color: var(--green); font-weight: 700; }
.diff-bad { color: var(--red); font-weight: 700; }

/* ===== Toast ===== */
.toast { position: fixed; bottom: 32px; left: 50%; transform: translateX(-50%);
  background: var(--text); color: #fff; padding: 10px 22px; border-radius: 24px;
  font-size: 14px; font-weight: 500; z-index: 90; box-shadow: var(--shadow-lg);
  animation: toastIn .25s; max-width: 90vw; }
@keyframes toastIn { from { opacity: 0; transform: translate(-50%, 12px); } }
.toast[hidden] { display: none; }

/* ===== 登录 ===== */
.login-mask { position: fixed; inset: 0; background: var(--bg); z-index: 100;
  display: flex; align-items: center; justify-content: center; }
.login-mask[hidden] { display: none; }
.login-box { width: 360px; max-width: 92vw; background: #fff;
  border-radius: 20px; padding: 36px 32px;
  box-shadow: 0 20px 60px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.06); }
.login-logo { width: 52px; height: 52px; border-radius: 14px; margin: 0 auto 14px;
  background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%);
  display: flex; align-items: center; justify-content: center; font-size: 26px;
  box-shadow: 0 4px 14px rgba(99,102,241,.35); }
.login-box h2 { text-align: center; margin-bottom: 4px; }
.login-err { color: var(--red); font-size: 13px; margin-bottom: 10px; text-align: center; }
.login-box code { background: var(--bg); border: 1px solid var(--line); border-radius: 4px;
  padding: 0 5px; font-size: 12px; }

/* ===== 类目标签编辑器 ===== */
.chip-editor { display: flex; flex-wrap: wrap; gap: 8px; border: none;
  border-radius: 12px; padding: 10px; min-height: 48px; background: #f2f2f7; }
.chip-editor:focus-within { background: #fff; box-shadow: 0 0 0 3px rgba(99,102,241,.15); }
.chip { display: inline-flex; align-items: center; gap: 6px;
  background: rgba(99,102,241,.1); color: #4f46e5; border-radius: 20px;
  padding: 3px 6px 3px 12px; font-size: 13px; font-weight: 500; }
.chip-editor { position: relative; }
.chip-editor .chip { cursor: grab; touch-action: none; user-select: none; }
.chip-editor .chip:active { cursor: grabbing; }
.chip-editor .chip-dragging { position: relative; z-index: 10; cursor: grabbing;
  opacity: .96; box-shadow: 0 10px 24px rgba(79,70,229,.28); will-change: transform; }
.chip button { border: none; background: none; color: var(--blue); cursor: pointer;
  font-size: 15px; width: 18px; height: 18px; line-height: 1; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; }
.chip button:hover { background: var(--blue-bd); }
.chip-input { border: none; outline: none; flex: 1; min-width: 120px;
  font-size: 14px; font-family: inherit; padding: 3px 2px; }

/* ===== 封账横幅 ===== */
.seal-banner { display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap; }
.seal-banner.locked { border-color: var(--green-bd); background: var(--green-bg); }
/* 封账条右侧操作组: 导出备份 / 导入备份 / 修改日志 / 封账 */
.seal-acts { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ---- 对账修改日志 ---- */
.audit-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.audit-wrap { max-height: 56vh; overflow: auto; border: 1px solid var(--line-2); border-radius: 12px; }
.audit-wrap .data-table { table-layout: fixed; }
.audit-wrap .data-table th { position: sticky; top: 0; z-index: 1; }
.audit-wrap .data-table td { padding: 8px 12px; font-size: 12.5px; vertical-align: top; }
.audit-wrap .audit-time { color: var(--sub); font-variant-numeric: tabular-nums; }
.audit-tag { display: inline-block; padding: 1px 8px; border-radius: 999px;
  background: var(--blue-bg); color: var(--blue); font-size: 11.5px; font-weight: 600;
  white-space: nowrap; }
.audit-month { display: inline-block; margin-left: 4px; padding: 0 6px; border-radius: 999px;
  background: #f1f5f9; color: var(--sub); font-size: 11px; }
.audit-detail { white-space: normal; overflow-wrap: anywhere; color: #374151; }

/* ===== 大图 ===== */
.lightbox { position: fixed; inset: 0; background: rgba(0,0,0,.92); z-index: 80;
  display: flex; align-items: center; justify-content: center; cursor: pointer; }
.lightbox img { max-width: 92%; max-height: 92%; border-radius: 8px; background: #fff; }
.lightbox.loading img { visibility: hidden; }
.lightbox.loading::after { content: ''; width: 36px; height: 36px; border-radius: 50%;
  border: 3px solid rgba(255,255,255,.25); border-top-color: #fff; animation: lb-spin .8s linear infinite; }
@keyframes lb-spin { to { transform: rotate(360deg); } }

/* 侧边栏遮罩 */
.sidebar-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); z-index: 35;
  animation: fadeIn .2s; }
@keyframes fadeIn { from { opacity: 0; } }
.sidebar-overlay[hidden] { display: none; }

/* ===== 滚动条 ===== */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===== 手机适配 ===== */
@media (max-width: 768px) {
  .sidebar { transform: translateX(-100%); }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-wrap { margin-left: 0; padding-bottom: 24px; }
  .menu-toggle { display: flex; }
  main { padding: 12px 12px 24px; max-width: 100%; }
  .dash-row { grid-template-columns: 1fr; gap: 14px; }
  .modal { border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    width: 100%; max-width: 100vw; max-height: 90vh; overflow-y: auto;
    padding: 18px 18px 24px; }
  .modal-mask { align-items: flex-end; }
  .modal h3 { font-size: 18px; margin-bottom: 12px; }
  .form-body .field { margin-bottom: 14px; }
  .form-body .field > label { font-size: 13px; margin-bottom: 4px; }
  .form-body input, .form-body textarea { font-size: 16px; }
  .form-body .picker-wrap { min-height: 44px; padding: 10px 12px; border-radius: 12px; }
  .modal-actions { gap: 10px; padding-top: 16px; }
  .modal-actions .btn { padding: 12px 16px; font-size: 15px; border-radius: 12px; }
  .topbar { padding: 0 12px; height: auto; min-height: 50px; flex-wrap: wrap; gap: 6px; padding-bottom: 8px; padding-top: 8px; }
  .topbar .title { font-size: 16px; order: -2; width: 100%; }
  .title-bar { flex-wrap: wrap; gap: 6px; }
  .menu-toggle { order: -1; }
  .store-wrap, .card-wrap, .month-wrap { padding: 5px 10px; font-size: 13px; min-height: 36px; }
  .dash-grid { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; margin-bottom: 12px; }
  /* V5_73d: 手机端资金汇总条单列全宽, 余额金额不被截断 */
  #uwStoreFunds.dash-grid { grid-template-columns: 1fr !important; }
  .dash-card { padding: 14px 14px; border-radius: 14px; }
  .dash-card .lab { font-size: 12px; }
  .dash-card .val { font-size: 16px; }
  .section-title { font-size: 15px; margin: 18px 0 10px; }
  .card { padding: 14px; border-radius: 14px; }

  /* ===== 表格变卡片 ===== */
  .table-wrap { overflow-x: visible; }
  .data-table th { display: none; }
  .data-table thead { display: none; }
  .data-table, .data-table tbody, .data-table tr, .data-table td {
    display: block; width: 100%; table-layout: auto;
  }
  .data-table { background: transparent; border: none; }
  .data-table.rec-table,
  .data-table.recon-main { table-layout: auto; }
  .data-table tbody tr {
    background: #fff; border-radius: 14px; padding: 12px 14px;
    margin-bottom: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.05);
    border: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 4px 10px;
    align-items: center; cursor: pointer;
  }
  .data-table tbody tr:hover { background: #fff; }
  .data-table td { border: none; padding: 4px 0; font-size: 13px; }
  .data-table td::before {
    content: attr(data-label); font-weight: 500; color: var(--sub-2);
    margin-right: 6px; font-size: 11px; text-transform: none;
  }
  .data-table td.amt { font-size: 15px; font-weight: 700; }
  .data-table td:last-child { margin-left: auto; }
  .data-table td.nowrap-cell { white-space: normal; overflow: visible; text-overflow: clip; }
  .data-table td .cell-text { white-space: normal; max-height: none; }
  .data-table .thumbs img { width: 36px; height: 36px; border-radius: 8px; }
  .thumbs img { width: 44px; height: 44px; }

  /* 底部TabBar已移除，不再需要 */
  .sidebar-footer { position: static; padding: 12px; }
  .btn-add { width: 100%; font-size: 15px; padding: 14px; }

  /* 封账横幅 */
  .seal-banner { padding: 12px 14px; font-size: 13px; }

  /* seg 分段控件 */
  .seg { max-width: 100%; }
  .seg button { padding: 10px 14px; font-size: 14px; }
}

/* ===== 浮动记账按钮 ===== */
.fab {
  position: fixed; right: 20px; bottom: 84px; z-index: 44;
  width: 54px; height: 54px; border-radius: 50%; border: none;
  background: linear-gradient(135deg, var(--blue) 0%, #818cf8 100%);
  color: #fff; display: flex; align-items: center; justify-content: center;
  box-shadow: 0 6px 20px -2px rgba(99,102,241,.55);
  cursor: pointer; transition: all .15s;
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.fab:hover { transform: scale(1.05); }
.fab:active { transform: scale(.92); }
.fab[hidden] { display: none; }

/* ================= 统一对账工作台（五页合一） ================= */

/* ---- 概览卡区（dash-grid/dash-card 为基础） ---- */
.uw-ov-grid { grid-template-columns: repeat(auto-fill, minmax(148px, 1fr)); gap: 10px; margin-bottom: 12px; }
/* 通长分割线: 宽屏下从概览第二行到收支分类区一笔画下(概览 8 列时 4/5 卡边界恰在 50%) */
.uw-split-zone { position: relative; }
.uw-split-zone::before { content: ''; position: absolute; left: 50%; top: 2px; bottom: 2px; width: 1px;
  background: #cbd5e1; display: none; }
/* 概览第二行: 「备用金」与「手机多记」之间留距 + 竖分割线(第5张卡) */
.uw-ov-grid-2 > .uw-ov-card:nth-child(5) { position: relative; margin-left: 16px; }
.uw-ov-grid-2 > .uw-ov-card:nth-child(5)::before { content: ''; position: absolute; left: -13px; top: 4px; bottom: 4px;
  width: 1px; background: #cbd5e1; }
@media (min-width: 1280px) {
  .uw-split-zone::before { display: block; }
  /* 通长线两侧对称留距: gap 10px 半侧 5px + margin 8px = 线左右各 13px, 与分类区 26px 间隙观感一致 */
  .uw-ov-grid-2 > .uw-ov-card:nth-child(4) { margin-right: 8px; }
  .uw-ov-grid-2 > .uw-ov-card:nth-child(5) { margin-left: 8px; }
  .uw-ov-grid-2 > .uw-ov-card:nth-child(5)::before { display: none; }
  .bd-sum-grid::after { display: none; }
}
.uw-ov-card { --oc: var(--blue); padding: 12px 14px; border: 1px solid transparent; transition: border-color .15s, background .15s, box-shadow .15s; }
.uw-ov-card.clickable { cursor: pointer; }
.uw-ov-card.clickable:hover { background: color-mix(in srgb, var(--oc) 5%, #fff); }
/* 选中态：描边/底色/阴影跟随该卡主题色（与底部芯片一致，--oc 由 JS 注入） */
.uw-ov-card.on { border-color: var(--oc); background: color-mix(in srgb, var(--oc) 7%, #fff); box-shadow: 0 2px 8px color-mix(in srgb, var(--oc) 20%, transparent); }
.uw-ov-card.on .val { font-weight: 700; }
.uw-ov-card .val { font-size: 19px; line-height: 1.35; }
.uw-ov-card .sub { margin-top: 2px; }

/* ---- 状态 Tab ---- */
.uw-tabs { display: flex; align-items: center; gap: 8px; padding: 2px 2px 10px; }
.uw-chips { display: flex; gap: 8px; overflow-x: auto; flex: 0 1 auto; min-width: 0;
  padding: 6px 2px; }
.uw-chips::-webkit-scrollbar { display: none; }
/* 芯片行: 「备用金」与「手机多记」之间加分隔(状态组 | 问题组) */
.uw-chip-sep { flex: 0 0 auto; width: 1px; align-self: stretch; margin: 2px 5px; background: #cbd5e1; }
.uw-kw-cell { flex: 0 0 auto; }
.uw-kw-cell .bd-kw { width: 190px; }
.wb-tab { position: relative; flex: 0 0 auto; display: inline-flex; align-items: center; gap: 5px;
  border: 1px solid transparent; overflow: hidden;
  background: var(--tbg); color: var(--tc);
  font-size: 11.5px; font-weight: 600; padding: 6px 12px; border-radius: 12px;
  cursor: pointer; white-space: nowrap;
  transition: transform .15s, box-shadow .15s, background .15s; }
/* 右下角装饰圆（同参考卡片，墨色低透明） */
.wb-tab::after { content: ''; position: absolute; right: -12px; bottom: -12px;
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--tc); opacity: .07; pointer-events: none; }
.wb-tab:hover { transform: translateY(-1px); box-shadow: 0 3px 8px rgba(0,0,0,.08); }
.wb-tab-cnt { position: relative; font-style: normal; font-weight: 700; font-size: 12px; line-height: 1; }
.wb-tab-cnt.zero { color: #c2c9d2; font-weight: 600; }
.wb-tab.on { background: color-mix(in srgb, var(--tc) 12%, #fff); font-weight: 600;
  border-color: var(--tc); box-shadow: 0 3px 10px -2px color-mix(in srgb, var(--tc) 28%, transparent); }
.wb-tab.on::after { opacity: .1; }

/* ---- 统一大表 ---- */
.uw-table-shell { position: relative; }
/* 横滚渐隐提示：只在对应方向“还有内容”时显现 */
.uw-table-shell::before, .uw-table-shell::after { content: ''; position: absolute;
  top: 4px; bottom: 12px; width: 26px; z-index: 6; pointer-events: none;
  opacity: 0; transition: opacity .2s ease; }
.uw-table-shell::before { left: 0; background: linear-gradient(90deg, rgba(255,255,255,.96), rgba(255,255,255,0)); }
.uw-table-shell::after { right: 0; background: linear-gradient(270deg, rgba(255,255,255,.96), rgba(255,255,255,0)); }
.uw-table-shell.can-l::before { opacity: 1; }
.uw-table-shell.can-r::after { opacity: 1; }
/* 底部收尾线: 明确"已到最后一笔", 到此即为滚动终点 */
.uw-end-mark { display: flex; align-items: center; gap: 12px; padding: 12px 6px 2px; }
.uw-end-mark .uw-end-line { flex: 1 1 auto; height: 1px;
  background: linear-gradient(90deg, transparent, #d4d9e0 35%, #d4d9e0 65%, transparent); }
.uw-end-mark .uw-end-text { flex: 0 0 auto; font-size: 12px; color: #9ca3af; letter-spacing: .02em; }
.uw-table-wrap { position: relative; overflow-x: auto; overflow-y: hidden; overflow-anchor: none;
  background: #fff; border-radius: 16px;
  box-shadow: 0 1px 3px rgba(0,0,0,.05); }
/* 细而可见的横向滚动条，提示可以左右滑动 */
.uw-table-wrap::-webkit-scrollbar { height: 5px; }
.uw-table-wrap::-webkit-scrollbar-track { background: transparent; }
.uw-table-wrap::-webkit-scrollbar-thumb { background: #c7ccd6; border-radius: 3px; }
.uw-empty-overlay { position: absolute; left: 0; right: 0; top: 50%; z-index: 4;
  transform: translateY(-50%);
  text-align: center; color: #94a3b8; font-size: 14px; padding: 24px 0;
  background: rgba(255,255,255,.85); pointer-events: none; }
/* V263: 不再写死 min-width, 表格随容器自适应; 窄窗口下列等比收缩, 避免出现底部横向滚动条 (移动端媒体查询仍保留横滑) */
.uw-table { width: 100%; table-layout: fixed; border-collapse: collapse; }
.uw-table th { font-size: 12px; color: #6b7280; font-weight: 600; padding: 10px 8px;
  background: #fafbfc; text-align: left; border-bottom: 1px solid #eef0f3; white-space: nowrap; }
.uw-table td { padding: 6px 8px; font-size: 13px; line-height: 1.4; color: var(--text);
  border-bottom: 1px solid #f2f3f5; vertical-align: middle; }
.uw-table tbody tr:last-child td { border-bottom: none; }
.uw-table .amt { font-weight: 600; white-space: nowrap; font-size: 13px; }
.uw-table .amt.amount-out { color: var(--red); }
.uw-table .amt.amount-in { color: var(--green); }

/* 文本单元格：单行省略，完整内容看 title 或点开编辑 */
.uw-clip { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uw-date { white-space: nowrap; color: #374151; font-size: 12px;
  overflow: hidden; text-overflow: clip; font-variant-numeric: tabular-nums;
  padding-left: 4px; padding-right: 4px; }
.uw-card-cell { color: #6b7280; font-size: 12px; }
.uw-note-cell { cursor: pointer; }
.uw-sum-cell { cursor: pointer; }
.uw-sum-cell:hover { color: var(--blue); }

/* ---- 中轴：核对标记 ---- */
/* 中间分隔带：银行侧 | 核对 | 记账侧 */
.uw-axis-th { text-align: center !important; background: #f8fafc !important; }
.uw-axis { position: relative; padding: 0; width: 58px;
  background: #f8fafc;
  border-left: 1px solid #e9edf2; border-right: 1px solid #e9edf2; }
.uw-axis-in { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  padding: 6px 4px; box-sizing: border-box; }
.uw-match-ok { display: inline-flex; align-items: center; justify-content: center;
  width: 19px; height: 19px; border-radius: 50%;
  background: linear-gradient(135deg, #34d399, #059669);
  color: #fff; font-size: 9.5px; font-weight: 700;
  box-shadow: 0 2px 5px -1px rgba(16,185,129,.5); }
.uw-match-ok.gap { background: linear-gradient(135deg, #fbbf24, #d97706);
  box-shadow: 0 2px 5px -1px rgba(245,158,11,.5); font-size: 8.5px; }
.uw-match-ok.gap small { font-size: 9px; font-weight: 600; margin-left: 1px; }
.uw-axis-badge { display: inline-block; padding: 4px 7px; border-radius: 8px;
  font-size: 10px; line-height: 1.3; font-weight: 600; }
.uw-axis-badge.ronly { background: #fef2f2; color: #dc2626; }
.uw-axis-badge.bonly { background: #fffbeb; color: #d97706; }
.uw-axis-badge.internal { background: #eef2ff; color: #4f46e5; }

/* ---- 记账类目彩签 ---- */
.uw-cat-badge { display: inline-block; vertical-align: middle; padding: 3px 9px; border-radius: 8px;
  font-size: inherit; line-height: inherit; font-weight: 600; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.uw-cat-badge.uw-cat-saved { box-shadow: 0 0 0 3px rgba(34,197,94,.45); }
/* V248: 无类目徽标 — 与「解除」按钮同款浅红底红字 */
.uw-cat-badge.uncat { background: #fdecec; color: #dc2626; }
.uw-cat-badge.uncat:hover { background: #fbdada; }
/* 行内类目下拉(点彩签弹出, 选完即存) */
/* V5_62 类目弹层改与 sg-menu/picker 同款列表风格: 左勾+类目色点, 选中浅紫; 原彩色药丸平铺显乱 */
/* V253: 去内部滚动条, 全量展开; 超出视口时由 JS 向上翻转/钳位定位 */
.uw-cat-pop { position: fixed; z-index: 70; min-width: 148px; max-width: 220px;
  padding: 6px; background: #fff; border: 1px solid rgba(0,0,0,.06); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.15), 0 2px 6px rgba(0,0,0,.05);
  animation: sgMenuIn .18s cubic-bezier(.2,.8,.3,1); transform-origin: top left; }
.uw-cat-pop button { display: flex; align-items: center; gap: 8px; width: 100%;
  border: none; border-radius: 8px; padding: 7px 12px; font-size: 13.5px; font-weight: 500;
  cursor: pointer; text-align: left; background: none; color: var(--text);
  font-family: inherit; transition: background .1s; }
.uw-cat-pop button:hover { background: #f2f2f7; }
.uw-cat-pop button .cp-check { width: 14px; flex-shrink: 0; font-size: 12px; font-weight: 700;
  color: var(--blue); opacity: 0; }
/* V5_68r 类目色点: 与全应用淡彩底+墨色描边统一(同流水分类下拉), 去宝石渐变与投影 */
.uw-cat-pop button .cp-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
  border: 1.5px solid; box-sizing: border-box; }
.uw-cat-pop button.on { background: rgba(99,102,241,.1); color: var(--blue); font-weight: 600; }
.uw-cat-pop button.on:hover { background: rgba(99,102,241,.16); }
.uw-cat-pop button.on .cp-check { opacity: 1; }
/* V259: 底部「取消类目」, 与店铺弹层「取消归属」同款 */
.uw-cat-pop .cp-sep { height: 1px; margin: 5px 8px; background: #ececf0; }
.uw-cat-pop button.clear { color: #9aa1ab; }
.uw-cat-pop button.clear:hover { background: #f2f2f7; color: #6b7280; }
/* V5_47 一卡多店: 记账行门店归属徽标 + 分配浮层菜单; V5_55 徽标独立成「店铺分类」列;
   V5_56 徽标左对齐(与表头/记账类目列同一条左线, 居中会与两侧错位显乱) */
.uw-store-badge { display: inline-block; vertical-align: middle; padding: 2px 8px;
  border-radius: 8px; font-size: 11.5px; font-weight: 600; cursor: pointer; white-space: nowrap;
  border: 1px dashed #c7ccd4; color: #8a94a3; background: #f7f8fa;
  -webkit-user-select: none; user-select: none; } /* V5_68u: toggle 双击徽标不再触发原生文字选中(蓝底"复制"态) */
.uw-store-badge.set { border-style: solid; border-color: #d7dce3; color: #3d4a5c; background: #eef1f5; }
/* V5_53 黑白灰菜单; V5_58 改与顶部银行卡下拉(.picker-panel)同款: 左勾+浅紫选中态; V5_62 整体缩小一档 */
.sg-menu { position: fixed; z-index: 80; min-width: 140px; padding: 5px; background: #fff;
  -webkit-user-select: none; user-select: none;
  border: 1px solid rgba(0,0,0,.06); border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,.15), 0 2px 6px rgba(0,0,0,.05);
  animation: sgMenuIn .18s cubic-bezier(.2,.8,.3,1); transform-origin: top left; }
@keyframes sgMenuIn { from { opacity: 0; transform: translateY(-6px) scale(.96); } }
.sg-menu button { display: flex; align-items: center; gap: 8px;
  width: 100%; border: none; border-radius: 8px; padding: 7px 12px; font-size: 13.5px;
  cursor: pointer; text-align: left; background: none; color: var(--text);
  font-family: inherit; transition: background .1s; }
.sg-menu button:hover { background: #f2f2f7; }
.sg-menu button .sg-check { width: 14px; flex-shrink: 0; font-size: 12px; font-weight: 700;
  color: var(--blue); opacity: 0; }
.sg-menu button.on { background: rgba(99,102,241,.1); color: var(--blue); font-weight: 600; }
.sg-menu button.on:hover { background: rgba(99,102,241,.16); }
.sg-menu button.on .sg-check { opacity: 1; }
.sg-menu .sg-sep { height: 1px; margin: 5px 8px; background: #ececf0; }
.sg-menu button.clear { color: #9aa1ab; }
.sg-menu button.clear:hover { background: #f2f2f7; color: #6b7280; }
/* 银行卡表单: 卡内子卡/子子卡与期初余额 */
.csg-list { display: flex; flex-direction: column; gap: 6px; margin-top: 4px; }
/* V5_66 行固定两排: 第一排=名称+期初, 第二排=转入卡+操作, 不再随机换行错位 */
.csg-row { padding: 8px; border: 1px solid #e5e5ea; border-radius: 10px; background: #fafbfc; }
.csg-l1 { display: flex; align-items: center; gap: 8px; }
.csg-l2 { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.csg-u-name { flex: 1 1 auto; min-width: 0; padding: 6px 9px; border: 1px solid #d9dde3; border-radius: 8px;
  font-size: 13.5px; font-weight: 600; color: #2b3440; background: #fff; }
.csg-u-name:focus { outline: none; border-color: #2b3440; }
.csg-open-wrap { font-size: 12px; color: #8a94a3; display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.csg-open { width: 100px; padding: 5px 8px; border: 1px solid #d9dde3; border-radius: 8px; font-size: 13px; }
/* V5_51 转入卡改自绘 picker(黑白灰), 紧凑尺寸与同行输入框对齐; 覆盖 .field .picker-wrap 的大尺寸样式 */
.csg-row .csg-tc.picker-wrap { flex: 1 1 auto; min-width: 0; padding: 5px 8px; min-height: 0;
  border: 1px solid #d9dde3; border-radius: 8px; background: #fff; font-size: 13px; }
.csg-row .csg-tc.picker-wrap:hover { background: #fff; border-color: #2b3440; }
.csg-row .csg-tc .picker-label { font-size: 13px; color: #2b3440; }
.csg-row .csg-tc .chevron-ico { font-size: 10px; }
.csg-del { flex-shrink: 0; width: 26px; height: 26px; border: 1px solid #e5e5ea; border-radius: 8px;
  background: #fff; color: #8a94a3; font-size: 12px; cursor: pointer; line-height: 1; }
.csg-del:hover { border-color: #2b3440; color: #2b3440; }
/* V5_66 子子卡行缩进 + ＋子子卡按钮 */
.csg-row.csg-child { margin-left: 28px; border-color: #e3e7ec; background: #fbfcfe; }
.csg-child-tag { flex-shrink: 0; font-size: 11px; color: #9aa4b1; font-weight: 600; white-space: nowrap; }
.csg-branch { flex-shrink: 0; height: 26px; padding: 0 9px; border: 1px dashed #c7ccd4; border-radius: 8px;
  background: #fff; color: #6b7686; font-size: 11.5px; font-weight: 600; cursor: pointer; line-height: 1;
  font-family: inherit; transition: all .12s; }
.csg-branch:hover { border-color: #2b3440; border-style: solid; color: #2b3440; }
/* V5_63 分配菜单二级缩进 */
.sg-menu button.sg-child { padding-left: 26px; font-size: 13px; }
/* V5_78 设置页门店与银行卡: 左树右表(主从式) — 门店组织树只做导航, 银行卡表格独立于右栏 */
.st-md { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 14px; align-items: start; }
.st-md-tree { border: 1px solid #d7dce3; border-radius: 10px; background: #f8fafb; padding: 6px; }
.st-trow { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 7px; cursor: pointer; border: 1px solid transparent; min-width: 0; }
.st-trow + .st-trow { margin-top: 2px; }
.st-trow:hover { background: #eef1f5; }
.st-trow.sel { background: #fff; border-color: #7c3aed; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.st-trow.lv1 { margin-left: 16px; }
.st-trow.lv2 { margin-left: 32px; }
.st-trow .st-caret { width: 14px; text-align: center; color: #8a94a3; font-size: 12px; flex-shrink: 0; user-select: none; }
.st-trow .st-caret.ph { visibility: hidden; }
.st-trow .st-caret:hover { color: #333; }
.st-trow .st-conn { color: #aab3bf; flex-shrink: 0; font-size: 12px; }
.st-tname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; font-weight: 600; }
.st-tmeta { color: #8a94a3; font-size: 11px; flex-shrink: 0; white-space: nowrap; }
.st-tag { font-size: 10.5px; line-height: 1.5; padding: 1px 5px; border-radius: 4px; background: #e5e9ef; color: #6b7686; flex-shrink: 0; }
.st-tag.top { background: var(--blue); color: #fff; }
.st-md-detail { border: 1px solid #d7dce3; border-radius: 10px; padding: 14px 16px; min-width: 0; background: #fff; }
.st-d-crumb { font-size: 11.5px; color: #8a94a3; margin-bottom: 3px; }
.st-d-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.st-d-title { display: flex; align-items: center; gap: 8px; min-width: 0; }
.st-d-title strong { font-size: 16px; }
.st-d-ops { display: flex; gap: 6px; flex-shrink: 0; }
.st-d-sub { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 14px 0 8px; font-size: 13px; font-weight: 700; }
/* 左树右表内不出现任何滚动条(树自然撑高; 表格列宽已按内容适配) */
.st-md-tree, .st-md-detail .table-wrap { overflow: visible; }
/* 银行卡表: 文本列保持省略号, 仅开关/操作列放开裁剪(避免按钮开关被 td overflow:hidden 裁切) */
.data-table.st-card-table td.st-csw, .data-table.st-card-table td.st-cops { overflow: visible; }
.data-table.st-card-table td.st-cname { font-weight: 600; overflow: hidden; text-overflow: ellipsis; }
/* 卡号/流水列: 允许换行完整显示, 不截断; 单元格收窄内边距腾出列宽 */
.data-table.st-card-table td.st-cnum { white-space: normal; overflow-wrap: anywhere; text-overflow: clip; line-height: 1.45; }
.data-table.st-card-table td, .data-table.st-card-table th { padding-left: 8px; padding-right: 8px; }
.st-crow-hidden { opacity: .45; }
.st-cempty { padding: 26px 0; font-size: 13px; }
/* 手机端: 单列堆叠 */
@media (max-width: 768px) {
  .st-md { grid-template-columns: 1fr; }
}
/* V5_63 批量指派弹窗: 归属单元竖排, 分支缩进 */
.rg-cell { display: flex; flex-direction: column; gap: 4px; align-items: flex-start; }
.rg-btn.rg-child { margin-left: 14px; }
/* V5_63 资金汇总条: 一级卡组 + 分支展开 */
.sf-group { display: flex; flex-direction: column; gap: 6px; }
/* V5_68p 资金汇总卡: 只显示当月、一行一笔、标签与金额加粗; V243: 卡片整体缩小 */
.sf-card { padding: 9px 11px; }
.sf-card .lab { margin-bottom: 2px; }
/* V5_68x 汇总卡说明行: 开户行 · 银行卡号 */
.sf-card .sf-sub { font-size: 11px; font-weight: 600; color: #6b7686; margin: -4px 0 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sf-line { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; margin-top: 3px;
  font-size: 11.5px; font-weight: 600; color: #475569; white-space: nowrap; }
.sf-line b { font-weight: 700; font-size: 12.5px; color: #1e293b; font-variant-numeric: tabular-nums; white-space: nowrap; }

.sf-line b.sf-in { color: var(--green); }
.sf-line b.sf-out { color: var(--red); }
/* V5_73b: 子账户卡余额三行配色(期初灰/期末墨/最新蓝) */
.sf-line b.sf-open { color: #64748b; }
.sf-line b.sf-close { color: #1e293b; }
.sf-line b.sf-latest { color: var(--blue); }
/* V5_73d: 资金汇总条加宽, 余额金额完整显示(桌面 minmax 215px / 手机端单列) */
#uwStoreFunds { grid-template-columns: repeat(auto-fill, minmax(196px, 1fr)); align-items: start; }
.sf-exp { align-self: flex-start; border: 1px solid #e2e6eb; border-radius: 8px; background: #fff;
  color: #6b7686; font-size: 11px; font-weight: 600; padding: 3px 9px; cursor: pointer; font-family: inherit;
  transition: all .12s; }
.sf-exp:hover { border-color: #2b3440; color: #2b3440; }
.sf-children { display: flex; flex-direction: column; gap: 6px; }
.sf-child { padding: 8px 12px; margin-left: 10px; border-left: 3px solid #d7dce3; }
.sf-child .lab { font-size: 10.5px; }
/* V5_63 徽标显示「一级 › 二级」路径, 允许换行 */
.uw-store-badge { white-space: normal; line-height: 1.35; text-align: left; }
/* 黑白灰虚线胶囊徽标 (卡内多店) */
.badge-dash { background: transparent; color: #555; border: 1px dashed #999; border-radius: 999px;
  padding: 1px 8px; font-size: 11.5px; font-weight: 600; }
/* 记账侧单元格整行可点开卡片 */
.uw-rec-cell { cursor: pointer; }
.uw-rec-cell input { cursor: text; }

/* ---- 凭证 ---- */
.uw-vc { padding: 4px 8px; }
.uw-thumbs { display: flex; align-items: center; gap: 4px; overflow: visible; }
.uw-thumbs img { width: 34px; height: 34px; border-radius: 7px; object-fit: cover;
  cursor: zoom-in; border: 1px solid #eef0f3; -webkit-user-drag: none; user-select: none; }
.uw-more { font-size: 11px; color: #6b7280; font-weight: 600; }
.uw-add-vc { display: inline-block; font-size: 11px; color: #9ca3af;
  border: 1px dashed #d1d5db; border-radius: 7px; padding: 7px 8px; cursor: pointer; }
.uw-add-vc:hover { color: var(--blue); border-color: var(--blue); }

/* ---- 银行备注 ---- */
.uw-note { width: 100%; min-width: 0; font-size: 12.5px; }
.uw-rec-note { width: 100%; min-width: 0; font-size: 12.5px; }

/* ---- 操作按钮 ---- */
/* 操作列固定在表格右缘：任何窗口宽度下“匹配流水/匹配记账”按钮常驻可见可点 */
.uw-table th:last-child { position: sticky; right: 0; z-index: 3;
  background: #fafbfc; box-shadow: inset 1px 0 0 #e9edf2; }
/* V263: 去掉 nowrap — 列随容器收缩后, 按钮换行显示, 不再溢出撑出横向滚动条 */
.uw-table td.uw-ops { position: sticky; right: 0; z-index: 2;
  background: #fff; box-shadow: inset 1px 0 0 #eef0f3; }
/* 记账金额列紧贴操作列左侧 —— 任何滚动位置金额常驻可见;
   V5_56 用 nth-last-child(2) 适配动态列数(共享卡多「店铺分类」列时第13列会错位);
   V5_68w: 右偏移改由 JS 按操作列实际宽度写入 --uw-ops-w(旧写死 160px, 拖末列后两列脱缝/重叠) */
.uw-table th:nth-last-child(2) { position: sticky; right: var(--uw-ops-w, 160px); z-index: 2;
  background: #fafbfc; box-shadow: inset 1px 0 0 #eef0f3; }
.uw-table td.uw-amt-col { position: sticky; right: var(--uw-ops-w, 160px); z-index: 1;
  background: #fff; box-shadow: inset 1px 0 0 #f3f4f6; }
.uw-btn { display: inline-block; padding: 4px 10px; border-radius: 9px; font-size: 12px;
  border: 1px solid #e2e5ea; background: #fff; color: #374151; cursor: pointer; }
.uw-btn:hover { background: #f6f8fb; }
.uw-btn.danger { color: #dc2626; border-color: transparent; background: #fdecec;
  font-weight: 600; border-radius: 12px; padding: 6px 14px; }
.uw-btn.danger:hover { background: #fbdada; }
.uw-btn.purple { color: #6d28d9; border-color: transparent; background: #ede9fe;
  font-weight: 600; border-radius: 12px; padding: 6px 14px; }
.uw-btn.purple:hover { background: #ddd6fe; }
.uw-btn.receipt { color: #0d9488; border-color: transparent; background: #f0fdfa;
  font-weight: 600; border-radius: 12px; padding: 6px 14px; }
.uw-btn.receipt:hover { background: #ccfbf1; }
.uw-btn.gray { color: #6b7280; }
.uw-ico-btn { display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; margin-left: 4px; border-radius: 8px;
  border: 1px solid #e8eaed; background: #fff; cursor: pointer; font-size: 13px; }
.uw-ico-btn:hover { background: #fffbeb; }

/* ---- 单边空侧 / 多笔银行子行 ---- */
.uw-empty-side { text-align: center; color: #b6bcc6; font-size: 11px; padding: 8px; }
.uw-empty-side .uw-btn { font-size: 12px; }
.uw-banksub td { background: #fcfcfd; }

/* ---- 移动端 ---- */
@media (max-width: 760px) {
  .uw-ov-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .uw-ov-grid-2 > .uw-ov-card:nth-child(5) { margin-left: 0; }
  .uw-ov-grid-2 > .uw-ov-card:nth-child(5)::before { display: none; }
  .uw-ov-card { padding: 10px 12px; }
  .uw-ov-card .val { font-size: 17px; }
  .uw-tabs { gap: 6px; }
  .uw-kw-cell .bd-kw { width: 130px; }
  .uw-table-wrap { border-radius: 12px; overflow-x: auto; }
  .uw-table-shell::before, .uw-table-shell::after { bottom: 8px; }
  #uwColResizeBtn { padding: 5px 10px; font-size: 12px; }

  /* 统一表不套用全局"表格变卡片"规则，保持表格形态，左右滑动看全部列 */
  .uw-table { display: table; width: 100%; min-width: 1330px; background: #fff; border: none; table-layout: fixed; }
  .uw-table thead { display: table-header-group; }
  .uw-table tbody { display: table-row-group; }
  .uw-table thead th { display: table-cell; }
  .uw-table tbody tr { display: table-row; padding: 0; margin: 0; background: transparent;
    border: none; box-shadow: none; flex-wrap: nowrap; cursor: default; }
  /* 上面给 tr 显式设了 display, 会盖掉浏览器默认的 [hidden]{display:none},
     导致窄屏下筛选/隐藏行失效, 这里补回来 */
  .uw-table tbody tr[hidden] { display: none; }
  .uw-table tbody td { display: table-cell; width: auto; padding: 6px 8px; border-bottom: 1px solid #f2f3f5;
    font-size: 11.5px; line-height: 1.4; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .uw-table tbody td::before { content: none; }
  /* 日期列锁定字号不被系统放大，保证 2026-06-15 完整显示不截断 */
  .uw-table .uw-date { font-size: 11.5px; letter-spacing: -.01em; }
  .uw-table .uw-empty-side { font-size: 10.5px; }
  /* 操作列：收窄按钮内边距+锁定字号，保证两个按钮完整不截断 */
  .uw-table .uw-ops { padding: 6px 4px; white-space: nowrap; }
  .uw-table .uw-btn { padding: 4px 8px; font-size: 11px; border-radius: 8px;
    -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  .uw-table .uw-ico-btn { width: 24px; height: 24px; margin-left: 3px; font-size: 12px; }
  .uw-table .uw-thumbs-rec img { width: 34px; height: 34px; }
  /* V5_57 手机端禁用钉住列: 部分手机浏览器(X5/夸克/旧 WebView)不支持 th sticky,
     表头不钉而表体贴钉 → 金额列和表头错位(用户截图: −¥ 顶在「记账备注」表头下)。
     统一 static 后整表自然横滚, 表头表体永远同格对齐 */
  .uw-table th:last-child, .uw-table th:nth-last-child(2),
  .uw-table td.uw-ops, .uw-table td.uw-amt-col { position: static; box-shadow: none; }

  /* 匹配弹窗候选表不套用"表格变卡片"，保持紧凑表格（窄屏横向滑动查看全部列） */
  .pick-list .data-table { display: table; width: 100%; min-width: 460px;
    background: transparent; border: none; table-layout: fixed; }
  .pick-list .data-table thead { display: table-header-group; }
  .pick-list .data-table tbody { display: table-row-group; }
  .pick-list .data-table th { display: table-cell; }
  .pick-list .data-table tbody tr { display: table-row; padding: 0; margin: 0; background: transparent;
    border: none; border-radius: 0; box-shadow: none; flex-wrap: nowrap; }
  .pick-list .data-table tbody tr:hover { background: #f8fafc; }
  .pick-list .data-table td { display: table-cell; width: auto; border: none; padding: 5px 8px;
    font-size: 12px; line-height: 1.3; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .pick-list .data-table td::before { content: none; }
  .pick-list .data-table td .cell-text { white-space: nowrap; max-height: none; }
  .pick-list .data-table .thumbs img { width: 30px; height: 30px; border-radius: 6px; }
}

/* ================= 财务报表 (V7) ================= */
.fin-wrap { display: flex; gap: 16px; align-items: flex-start; }
/* V283: 去掉 sticky — 粘性侧栏的屏幕位置随页面滚动/报表内容高度变化而吸附跳动(弹上弹下), 改随文档自然滚动 */
.fin-side { flex: 0 0 232px; display: flex; flex-direction: column; gap: 8px; }
.fin-card { text-align: left; background: var(--card); border: 1px solid #e4e6eb; border-radius: 12px; padding: 10px 12px; cursor: pointer; transition: border-color .15s, box-shadow .15s; }
.fin-card:hover { border-color: #c7c9cf; }
.fin-card.active { border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,.12); }
.fin-card-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.fin-card-name { font-size: 13px; font-weight: 700; color: var(--text); }
.fin-badge { font-size: 10px; font-weight: 600; padding: 2px 7px; border-radius: 8px; flex-shrink: 0; }
.fin-badge.auto { background: #f1f5f9; color: #475569; }
.fin-badge.semi { background: #eef2ff; color: #4338ca; }
.fin-badge.manual { background: var(--purple-bg); color: #6d28d9; }
.fin-card-desc { font-size: 11px; color: var(--sub); margin-top: 4px; line-height: 1.5; }
.fin-card-state { font-size: 11px; color: var(--sub-2); margin-top: 6px; }
.fin-main { flex: 1 1 auto; min-width: 0; background: var(--card); border: 1px solid #e4e6eb; border-radius: 14px; padding: 16px 18px; }
.fin-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.fin-title { font-size: 17px; font-weight: 800; color: var(--text); }
.fin-sub { font-size: 12px; color: var(--sub); margin-top: 2px; }
.fin-export-btn { flex-shrink: 0; }
.fin-blocks { display: flex; flex-direction: column; gap: 16px; }
.fin-block { border: 1px solid #eef0f3; border-radius: 12px; padding: 12px 14px; }
.fin-block-title { font-size: 13px; font-weight: 700; color: var(--text-2); margin-bottom: 8px; }
.fin-block-empty { font-size: 12px; color: var(--sub-2); padding: 8px 2px; }
.fin-grid-scroll { overflow-x: auto; }
.fin-tbl { width: 100%; border-collapse: collapse; font-size: 12.5px; }
.fin-tbl th { text-align: left; font-size: 11px; font-weight: 700; color: var(--sub); padding: 6px 10px; border-bottom: 1.5px solid #e4e6eb; white-space: nowrap; }
.fin-tbl td { padding: 6px 10px; border-bottom: 1px solid #f1f2f4; color: var(--text-2); }
.fin-tbl tbody tr:hover { background: #fafafa; }
.fin-num { text-align: right; font-variant-numeric: tabular-nums; }
.fin-tbl tfoot td { border-top: 1.5px solid #e4e6eb; border-bottom: none; font-weight: 700; color: var(--text); background: #fafafa; }
.fin-sum-lab { color: var(--sub); font-weight: 700; }
.fin-edit-tbl td { padding: 3px 5px; }
.fin-inp { width: 100%; min-width: 72px; border: 1px solid transparent; border-radius: 7px; padding: 6px 8px; font-size: 12.5px; color: var(--text); background: transparent; font-family: inherit; }
.fin-inp:hover { border-color: #e4e6eb; }
.fin-inp:focus { outline: none; border-color: #7c3aed; background: #fff; box-shadow: 0 0 0 2px rgba(124,58,237,.10); }
.fin-num-inp { text-align: right; font-variant-numeric: tabular-nums; }
.fin-num-inp::-webkit-outer-spin-button, .fin-num-inp::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fin-calc { font-weight: 700; color: #6d28d9; padding: 6px 10px; }
.fin-op-col { width: 30px; }
.fin-op { text-align: center; width: 30px; }
.fin-del-row { border: none; background: none; color: #cbd5e1; cursor: pointer; font-size: 12px; padding: 4px 6px; border-radius: 6px; }
.fin-del-row:hover { color: var(--red); background: var(--red-bg); }
.fin-grid-empty { text-align: center; color: var(--sub-2); padding: 14px 0 !important; }
.fin-grid-bar { display: flex; align-items: center; gap: 10px; margin-top: 10px; }
.fin-grid-hint { font-size: 11px; color: var(--sub-2); margin-left: auto; }
/* V274: 财务报表配色对齐统一对账 (紫调表头/斑马纹/类目徽章/金额红绿) */
.fin-tbl th { background: #f7f5fc; }
.fin-tbl tbody tr:nth-child(even) { background: #fafbfd; }
.fin-tbl tbody tr:hover, .fin-tbl tbody tr:nth-child(even):hover { background: #f3f0fa; }
.fin-tbl td.fin-num { font-weight: 600; }
.fin-pos { color: #16a34a; }
.fin-neg { color: #dc2626; }
.fin-tbl tfoot td { background: #f6f2fd; }
.fin-cat-badge { font-size: 11.5px; padding: 2px 9px; cursor: default; }
.fin-sel { border-radius: 8px; font-weight: 600; }
.fin-block-title { display: flex; align-items: center; gap: 8px; }
.fin-block-title::before { content: ''; width: 4px; height: 14px; border-radius: 2px; background: #7c3aed; flex-shrink: 0; }
.fin-card.active { background: #faf8ff; }
.fin-card-state .fin-st-ok { color: #16a34a; font-weight: 600; }
.fin-card-state .fin-st-pend { color: #d97706; font-weight: 600; }
/* ================= V275: 表格交互与视觉优化 ================= */
/* 1) 对齐修正: 数字列表头与内容统一右对齐 (修复 .fin-tbl th 优先级压住 .fin-num 导致的表头左/内容右错位) */
.fin-tbl th.fin-num { text-align: right; }
.uw-table th.amt-th, .uw-table td.amt { text-align: right; }
/* 2) V276: 表格改为单页完整展示 —— 去掉纵向内部滚动封顶(不再需要拉滚动条), 宽表保留横向滑动 */
.fin-grid-scroll { max-height: none; overflow: visible; overflow-x: auto; }
.fin-tbl thead th { position: sticky; top: 0; z-index: 1; }
.table-wrap { max-height: none; overflow: visible; }
.table-wrap thead th { position: sticky; top: 0; z-index: 1; background: #fafbfc; }
.table-wrap::-webkit-scrollbar { width: 8px; height: 8px; }
.table-wrap::-webkit-scrollbar-thumb { background: #d7dbe3; border-radius: 4px; }
.fin-grid-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.fin-grid-scroll::-webkit-scrollbar-thumb { background: #d7dbe3; border-radius: 4px; }
/* 3) 报表块折叠: 点标题收起, 多块同页不再无限下拉 */
.fin-block-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; user-select: none; }
.fin-block-meta { display: flex; align-items: center; gap: 6px; color: var(--sub-2); font-size: 11px; flex-shrink: 0; }
.fin-chev { transition: transform .18s; font-size: 12px; color: var(--sub); }
.fin-block.collapsed .fin-chev { transform: rotate(-90deg); }
.fin-block.collapsed .fin-block-body, .fin-block.collapsed .fin-filters { display: none; }
/* 4) 表内筛选条: 类目下拉 + 金额区间 + 关键字, 组合生效 */
.fin-filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.fin-filters .fin-f { border: 1px solid #e4e6eb; border-radius: 8px; padding: 5px 8px; font-size: 12px; background: #fff; color: var(--text); font-family: inherit; }
.fin-filters select.fin-f { max-width: 150px; cursor: pointer; }
.fin-f-amt { width: 96px; }
.fin-f-kw { width: 150px; }
.fin-filters .fin-f:focus { outline: none; border-color: #7c3aed; box-shadow: 0 0 0 2px rgba(124,58,237,.10); }
.fin-f-reset { border: none; background: none; color: var(--sub); cursor: pointer; font-size: 12px; padding: 4px 6px; border-radius: 6px; }
.fin-f-reset:hover { color: var(--red); background: var(--red-bg); }
.fin-f-count { font-size: 11px; color: var(--sub-2); margin-left: auto; }
/* 记账明细工具栏新增的类目/金额筛选控件 */
.rec-cat-sel { width: auto; min-width: 112px; cursor: pointer; }
.rec-amt-inp { width: 96px; }
/* V274: 手机记账应用内嵌视图 */
.mobile-embed { height: calc(100vh - 112px); min-height: 480px; }
.mobile-embed iframe { width: 100%; height: 100%; border: 1px solid #e4e6eb; border-radius: 14px; display: block; background: #fff; }
@media (max-width: 860px) { .mobile-embed { height: calc(100vh - 86px); } }
.btn-primary { background: #7c3aed; color: #fff; border: none; }
.btn-primary:hover { background: #6d28d9; }
/* ================= V276: 报表独立月份/银行卡选择器 + 图标重设计 + 单页紧凑表格 ================= */
/* 报表头工具条 */
.fin-head { flex-wrap: wrap; }
.fin-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* V278: 月份/银行卡选择器改与顶栏同款 pill + 自绘面板, 样式见文末 V278 段 */
/* 现代线性图标: 随文字颜色, 报表主图标用品牌紫 */
.fin-ico { vertical-align: -3px; flex-shrink: 0; }
.fin-title { display: flex; align-items: center; gap: 8px; }
.fin-title .fin-ico { color: #7c3aed; }
.fin-card-name { display: inline-flex; align-items: center; gap: 6px; }
.fin-card-name .fin-ico { color: #7c3aed; }
.fin-card-state { display: flex; align-items: center; gap: 5px; }
.fin-card-state .fin-ico { vertical-align: 0; }
.fin-card-state .fin-st-ok, .fin-card-state .fin-st-pend { display: inline-flex; align-items: center; gap: 5px; }
.fin-save-btn, .fin-export-btn { display: inline-flex; align-items: center; gap: 6px; }
.fin-save-btn .fin-ico, .fin-export-btn .fin-ico { vertical-align: 0; }
/* 单页完整展示: 行高紧凑化, 一屏容纳更多数据 */
.fin-tbl th { padding: 5px 9px; }
.fin-tbl td { padding: 4px 9px; }
.fin-block { padding: 10px 12px; }
.fin-block-title { margin-bottom: 6px; }
.fin-filters { margin-bottom: 6px; }
.fin-filters .fin-f { padding: 4px 7px; font-size: 11.5px; }
/* 侧栏/登录图标改黑白灰紫 */
.logo-icon { background: linear-gradient(135deg, #7c3aed 0%, #a78bfa 100%); box-shadow: 0 2px 8px rgba(124,58,237,.3); }
.nav-item .ico { display: flex; align-items: center; justify-content: center; }
/* ================= V277: 报表表格整体美化 + 简化(Excel 式紧凑一目了然) ================= */
/* 块容器: 去重边框改轻卡片, 层级更清楚 */
.fin-block { border: 1px solid #f0eef6; border-radius: 12px; padding: 10px 12px; background: #fff; box-shadow: 0 1px 3px rgba(17,12,34,.04); }
.fin-block:hover { border-color: #e5e0f2; }
.fin-block-title { font-size: 13px; color: var(--text); }
/* 表格: 更小的字号与行高, 留白为主、细线为辅 */
.fin-tbl { font-size: 12px; }
.fin-tbl th { padding: 5px 8px; color: #5b21b6; background: #f4f1fb; border-bottom: 1px solid #e6e0f5; letter-spacing: .02em; }
.fin-tbl td { padding: 3px 8px; border-bottom: 1px solid #f5f5f8; line-height: 1.5; color: var(--text-2); }
.fin-tbl tbody tr:nth-child(even) { background: #fcfbfe; }
.fin-tbl tbody tr:hover, .fin-tbl tbody tr:nth-child(even):hover { background: #f5f1fd; }
.fin-tbl td.fin-num { font-weight: 600; font-size: 12px; }
/* 合计行: 紫调卡片式强调, 一眼看到总数 */
.fin-tbl tfoot td { background: #f3edfd; font-weight: 800; color: #4c1d95; border-top: 1px solid #e2d8f8; border-bottom: none; padding: 5px 8px; }
.fin-tbl tfoot td.fin-sum-lab { color: #7c3aed; border-bottom-left-radius: 8px; }
.fin-tbl tfoot tr td:last-child { border-bottom-right-radius: 8px; }
/* 可编辑网格 Excel 化: 输入框隐形紧凑, 悬停/聚焦才现边框 */
.fin-edit-tbl td { padding: 1px 3px; }
.fin-inp { padding: 2px 6px; font-size: 12px; min-width: 56px; border-radius: 5px; line-height: 1.5; }
.fin-edit-tbl tbody tr:hover .fin-inp { border-color: #ececf1; }
/* 彩色下拉/徽章收敛: 更小更轻, 不再满屏大色块 */
.fin-sel { font-size: 11px; padding: 1px 6px; border-radius: 6px; }
.fin-cat-badge { font-size: 10.5px; padding: 1px 7px; }
/* 筛选条轻量化: 融入块标题区, 不再抢视觉 */
.fin-filters { gap: 6px; margin: 2px 0 6px; }
.fin-filters .fin-f { padding: 3px 7px; font-size: 11.5px; background: #fafafc; border-color: #ececf1; border-radius: 7px; }
.fin-f-kw { width: 130px; }
.fin-f-amt { width: 84px; }
.fin-f-reset { font-size: 11.5px; padding: 3px 5px; }
/* 实发等公式列与数字对齐更醒目 */
.fin-calc { padding: 3px 8px; font-size: 12px; }
@media (max-width: 860px) { .fin-wrap { flex-direction: column; } .fin-side { flex-direction: row; overflow-x: auto; position: static; width: 100%; } .fin-card { min-width: 180px; } }
/* ================= V278: 统一月份面板/下拉卡片 + 筛选简化 + 多栏 band + 钟数矩阵 ================= */
/* 报表工具条月份/银行卡选择器: 与顶栏 store/card pill 同款 */
.fin-monthbar, .fin-cardbar { display: flex; align-items: center; gap: 8px; background: #f2f2f7; border-radius: 10px; padding: 6px 12px; min-height: 36px; font-weight: 600; transition: background .12s; }
.fin-monthbar:hover, .fin-cardbar:hover { background: #e9e9f0; }
.fin-monthbar.open, .fin-cardbar.open { background: #fff; box-shadow: 0 0 0 3px rgba(124,58,237,.12); }
.fin-monthbar .picker-label, .fin-cardbar .picker-label { font-size: 13px; color: var(--text); pointer-events: none; }
.fin-monthbar .month-ico, .fin-cardbar > svg:first-child { color: var(--sub); pointer-events: none; flex-shrink: 0; }
/* 月份面板: 复用顶栏 .month-panel + mp-* 样式, 全展开无滚动条 */
.fin-mpanel { position: absolute; top: calc(100% + 6px); left: 0; z-index: 60; }
.fin-cardbar .picker-panel { max-height: none; overflow: visible; }
/* 网格类目/部门列: 自绘下拉按钮 + 浮层(与顶栏 picker 卡片同款) */
/* V280: 类目/部门按钮改统一对账同款淡彩胶囊(去边框、单行不换行, "线上/刷卡"完整显示) */
/* V281: 叠加白色半透明层压淡底色, 与统一对账筛选 chip 同款轻底色 */
.fin-sel-btn { display: inline-block; width: auto; min-width: 0; border: none; border-radius: 8px; padding: 2px 9px; white-space: nowrap; font-weight: 600; text-align: center; background-color: #f2f2f7; background-image: linear-gradient(rgba(255,255,255,.6), rgba(255,255,255,.6)); color: #9ca3af; cursor: pointer; font-family: inherit; line-height: 1.5; }
.fin-sel-btn:hover { filter: brightness(.98) saturate(1.15); }
/* V280: 顶栏报表月份/银行卡 pill 字号与统一对账顶栏一致 */
.title-bar .fin-monthbar .picker-label, .title-bar .fin-cardbar .picker-label { font-size: 14px; }
/* V281: 卡 pill 不适用当前报表时灰显禁用(始终占位, 顶栏固定不跳) */
.fin-pill-off { opacity: .45; pointer-events: none; }
/* V284: 表内筛选下拉卡片(复用顶栏 picker 结构, 紧凑尺寸) */
.fin-f-dd { display: inline-flex; align-items: center; padding: 5px 10px; background: #f2f2f7; border-radius: 10px; font-size: 12.5px; color: #3a3a3c; }
.fin-f-dd .picker-label { pointer-events: none; white-space: nowrap; }
.fin-f-dd.open { background: #fff; box-shadow: 0 0 0 2px rgba(124, 58, 237, .18); }
.fin-f-dd .picker-panel { min-width: 120px; top: calc(100% + 6px); }
.fin-f-dd .picker-panel button { padding: 7px 10px; font-size: 13px; }
.fin-f-dd .picker-panel button .tick { width: 14px; }
/* V281: 常显滚动条槽位, 切报表内容高度变化不再引起整页左右跳动 */
html { scrollbar-gutter: stable; }
.fin-sel-pop { display: block; position: fixed; z-index: 120; max-height: none; overflow: visible; }
/* 多栏 band 布局: 行按视口宽拆成 3/2/1 栏并排, 单页完整展示 */
.fin-bands { display: flex; gap: 10px; align-items: flex-start; }
.fin-bands .fin-band { flex: 1 1 0; min-width: 0; width: 100%; border: 1px solid #f0eef6; border-radius: 10px; overflow: hidden; }
.fin-total-row { display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; margin-top: 8px; padding: 6px 12px; background: #f3edfd; border-radius: 8px; font-size: 12px; color: #4c1d95; }
.fin-total-lab { font-weight: 800; color: #7c3aed; }
.fin-total-cell b { margin-left: 6px; font-weight: 800; }
/* 钟数矩阵: 行=项目, 列=1~月末号数; 首列冻结, 单页无纵向滚动 */
/* V281: 矩阵 table-layout:fixed + 宽度100%, 31日列自适应容器, 彻底消除横向滚动条 */
.fin-mx-scroll { overflow-x: hidden; }
.fin-mx { font-size: 11px; width: 100%; table-layout: fixed; }
.fin-mx th { padding: 4px 1px; text-align: center; font-size: 10.5px; white-space: nowrap; overflow: hidden; }
.fin-mx td { padding: 1px; text-align: center; overflow: hidden; }
.fin-mx .mx-name { position: sticky; left: 0; z-index: 2; background: #fff; text-align: left; width: 104px; box-shadow: 1px 0 0 #ececf1; }
.fin-mx tbody tr:nth-child(even) .mx-name { background: #fcfbfe; }
.fin-mx thead th.mx-name { background: #f4f1fb; z-index: 3; }
.fin-mx tfoot td { background: #f3edfd; padding: 4px 1px; }
.fin-mx .mx-note { width: 52px; }
.fin-mx .mx-sum { font-weight: 700; color: #4c1d95; width: 50px; font-size: 10px; }
.fin-mx .fin-op-col, .fin-mx td.fin-op { width: 22px; }
.mx-inp { width: 100%; min-width: 0; padding: 1px; font-size: 10.5px; text-align: center; border: 1px solid transparent; background: transparent; border-radius: 4px; -moz-appearance: textfield; appearance: textfield; }
.mx-inp::-webkit-inner-spin-button, .mx-inp::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.mx-inp:hover { border-color: #e5e0f2; background: #fff; }
.mx-inp:focus { border-color: #7c3aed; background: #fff; outline: none; }
.fin-mx .mx-proj-inp, .fin-mx .mx-note-inp { width: 100%; border: none; background: transparent; font-size: 11.5px; padding: 2px 4px; border-radius: 4px; }
.fin-mx .mx-proj-inp:focus, .fin-mx .mx-note-inp:focus { outline: none; background: #fff; box-shadow: inset 0 0 0 1px #7c3aed; }
