/* board.css — 手机看板（移动端竖屏优先，一眼看全局 + 轻量收支写）*/
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #f3f4f8; color: #222; font-size: 15px; line-height: 1.5;
  max-width: 520px; margin: 0 auto; padding-bottom: 24px;
}

/* Token 录入 */
.token-modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 1000;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.token-card { background: #fff; border-radius: 14px; padding: 22px; width: 100%; max-width: 360px; }
.token-card h2 { margin: 0 0 8px; font-size: 18px; }
.muted { color: #888; font-size: 13px; }
.token-card input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; margin: 10px 0; font-size: 14px; }
.token-error { color: #c0392b; font-size: 13px; }

/* 头部 */
.board-header { background: linear-gradient(135deg, #534AB7, #7b6ff0); color: #fff; padding: 16px; border-radius: 0 0 16px 16px; }
.store-line { display: flex; justify-content: space-between; align-items: center; font-size: 19px; font-weight: 700; gap: 8px; }
.header-right { display: flex; align-items: center; gap: 8px; }
.meta-line { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 13px; gap: 8px; }
.meta-left { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.update-time { font-size: 11px; opacity: .8; }
.badge { padding: 2px 8px; border-radius: 10px; font-size: 12px; }
.badge-on { background: rgba(255,255,255,.22); }
.badge-off { background: #e74c3c; }
.badge-channel { background: rgba(255,255,255,.18); }
.badge-edit { background: rgba(255,255,255,.22); border: none; cursor: pointer; font-size: 13px; padding: 2px 6px; color: #fff; }

/* 主体 */
.board-main { padding: 12px; }
.kpi-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 12px; }
.kpi-card { background: #fff; border-radius: 12px; padding: 12px 10px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.kpi-label { font-size: 12px; color: #888; }
.kpi-value { font-size: 18px; font-weight: 700; margin-top: 4px; color: #333; }

.panel { background: #fff; border-radius: 12px; padding: 14px; margin-bottom: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.panel h3 { margin: 0 0 10px; font-size: 15px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; }
.panel-head h3 { margin: 0; }
.expense-total { color: #c0392b; font-size: 14px; }
.exp-pos { color: #2e7d32; }
.exp-neg { color: #c62828; }

.zone-grid { display: flex; gap: 10px; flex-wrap: wrap; }
.zone-cell { background: #f6f6fc; border-radius: 10px; padding: 8px 12px; text-align: center; min-width: 64px; }
.zone-name { font-size: 12px; color: #777; }
.zone-occ { font-size: 16px; font-weight: 700; }
.overtime { color: #c0392b; font-size: 13px; margin-top: 8px; }

.pay-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.pay-grid > div { display: flex; flex-direction: column; align-items: center; }
.pay-k { font-size: 12px; color: #888; }
.pay-v { font-size: 15px; font-weight: 600; }
.pay-total { margin-top: 10px; font-size: 14px; text-align: right; color: #555; }
.pay-total b { color: #333; font-size: 16px; }

.ts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; }
.ts-n { display: block; font-size: 18px; font-weight: 700; }
.ts-l { font-size: 12px; color: #888; }

/* 收支列表 */
.expense-list { list-style: none; margin: 8px 0 0; padding: 0; }
.expense-item { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "main actions" "sub actions"; padding: 8px 0; border-top: 1px solid #f0f0f0; align-items: center; }
.exp-main { grid-area: main; }
.exp-sub { grid-area: sub; font-size: 12px; color: #999; }
.exp-actions { grid-area: actions; display: flex; gap: 6px; }
.exp-expense { color: #c0392b; font-weight: 700; }
.exp-income { color: #2e7d32; font-weight: 700; }
.exp-meta { font-size: 13px; color: #555; margin-left: 6px; }
.exp-edit, .exp-del { border: none; border-radius: 6px; padding: 4px 10px; font-size: 13px; cursor: pointer; }
.exp-edit { background: #534AB7; color: #fff; }
.exp-del { background: #fdecea; color: #c0392b; }
.exp-ro { font-size: 12px; color: #aaa; }
.expense-empty { color: #aaa; font-size: 13px; padding: 8px 0; }

.foot-note { text-align: center; color: #999; font-size: 12px; margin-top: 6px; }
.link-btn { background: none; border: none; color: #534AB7; text-decoration: underline; font-size: 12px; cursor: pointer; }

/* 按钮 */
.btn-primary { background: #534AB7; color: #fff; border: none; border-radius: 8px; padding: 10px 16px; font-size: 15px; cursor: pointer; }
.btn-secondary { background: #eee; color: #333; border: none; border-radius: 8px; padding: 10px 16px; font-size: 15px; cursor: pointer; }
.btn-mini { background: #534AB7; color: #fff; border: none; border-radius: 8px; padding: 5px 12px; font-size: 13px; cursor: pointer; }

/* 记一笔弹窗（底部 sheet）*/
.modal-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 960; display: flex; align-items: flex-end; justify-content: center; }
.modal-sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 16px 16px 0 0; padding: 18px; }
.modal-sheet h3 { margin: 0 0 12px; }
.modal-sheet label { display: block; font-size: 13px; color: #666; margin: 10px 0 4px; }
.modal-sheet input, .modal-sheet select { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; }
.seg { display: flex; gap: 12px; }
.seg label { display: inline-flex; align-items: center; gap: 4px; margin: 0; }
.modal-actions { display: flex; gap: 10px; margin-top: 16px; }
.modal-actions button { flex: 1; }

/* ===================== 时间范围切换条（变更点 B）===================== */
.range-bar { display: flex; gap: 6px; padding: 10px 12px 0; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.range-btn {
  flex: 1 0 auto; min-width: 52px; padding: 7px 6px; border: 1px solid #ddd; background: #fff;
  border-radius: 999px; font-size: 13px; color: #555; cursor: pointer; white-space: nowrap;
}
.range-btn.active { background: #534AB7; color: #fff; border-color: #534AB7; }

.range-custom { display: flex; align-items: center; gap: 8px; padding: 8px 12px; font-size: 13px; color: #555; }
.range-custom[hidden] { display: none; }
.range-custom input[type="date"] {
  flex: 1; padding: 8px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px;
  color: #333; background: #fff;
}
.range-custom .range-sep { color: #999; }

/* KPI 可点击（销售明细入口） */
.kpi-clickable { cursor: pointer; position: relative; }
.kpi-clickable:active { transform: scale(0.98); }
.kpi-hint { font-size: 10px; color: #534AB7; margin-top: 2px; }

/* panel 头部操作区 + 幽灵按钮 */
.panel-head-actions { display: flex; gap: 6px; }
.btn-ghost { background: #eee; color: #534AB7; border: none; border-radius: 8px; padding: 5px 12px; font-size: 13px; cursor: pointer; }

/* 记一笔 radio 横排（变更点 E：水平排列、不换行） */
.seg { display: flex; flex-direction: row; flex-wrap: nowrap; gap: 16px; }
.seg label { display: inline-flex; align-items: center; gap: 4px; margin: 0; white-space: nowrap; }

/* ===================== 明细下钻弹窗（变更点 C/D）===================== */
.detail-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 950;
  display: flex; align-items: flex-end; justify-content: center;
}
.detail-sheet {
  background: #fff; width: 100%; max-width: 520px; max-height: 88vh;
  border-radius: 16px 16px 0 0; display: flex; flex-direction: column; overflow: hidden;
}
.detail-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid #f0f0f0; }
.detail-head h3 { margin: 0; font-size: 16px; }
.detail-close { border: none; background: #f2f2f7; color: #555; border-radius: 50%; width: 30px; height: 30px; font-size: 15px; line-height: 1; cursor: pointer; }
.detail-body { padding: 12px 16px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.detail-foot { padding: 10px 16px 16px; border-top: 1px solid #f0f0f0; }
.detail-more { width: 100%; padding: 10px; border: none; border-radius: 8px; background: #534AB7; color: #fff; font-size: 14px; cursor: pointer; }
.detail-more:disabled { opacity: .6; }
.detail-foot-note { text-align: center; color: #aaa; font-size: 12px; }
.detail-loading, .detail-empty, .detail-error { text-align: center; color: #999; padding: 24px 0; font-size: 14px; }
.detail-error { color: #c0392b; }

/* 明细表格（销售 / 账户汇总共用） */
.detail-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.detail-table th { text-align: left; color: #888; font-weight: 600; padding: 6px 8px; border-bottom: 2px solid #eee; position: sticky; top: 0; background: #fff; }
.detail-table td { padding: 8px; border-bottom: 1px solid #f4f4f4; vertical-align: top; }
.detail-table .cell-items { max-width: 140px; }
.detail-table .cell-note { max-width: 120px; color: #777; }

/* 收支明细列表 */
.detail-exp-list { list-style: none; margin: 0; padding: 0; }
.detail-exp-list li { padding: 10px 0; border-bottom: 1px solid #f0f0f0; }
.de-main { display: flex; align-items: baseline; gap: 8px; }
.de-main .exp-income { color: #2e7d32; font-weight: 700; }
.de-main .exp-expense { color: #c0392b; font-weight: 700; }
.de-meta { font-size: 13px; color: #555; }
.de-sub { font-size: 12px; color: #999; margin-top: 2px; }

/* 账户汇总 */
.acc-summary { margin-top: 14px; }
.acc-title { font-size: 13px; color: #333; font-weight: 600; margin-bottom: 4px; }
.acc-title b { color: #534AB7; }
.acc-empty { color: #bbb; font-size: 13px; padding: 4px 0; }
.acc-table td:last-child { text-align: right; font-weight: 600; }

/* ===================== 头部/面板点击下钻（决策 2/3：桌台/寄存）===================== */
#tableZones { cursor: pointer; }
#tableZones:active { opacity: .7; }
#tempStorePanel { cursor: pointer; }
#tempStorePanel:active { opacity: .7; }
.panel-hint { font-size: 11px; color: #534AB7; font-weight: 400; margin-left: 4px; }

/* ===================== 账户余额（收支管理面板内，决策 4）===================== */
.acc-balances { margin: 8px 0 4px; }
.acc-balance-title { font-size: 12px; color: #888; margin-bottom: 4px; }
.acc-balance-row { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-balance-item { font-size: 13px; color: #555; background: #f6f6fc; border-radius: 8px; padding: 4px 10px; }
.acc-balance-item b { color: #534AB7; }

/* 面板内「更多 ›」按钮 */
.expense-more { text-align: center; padding: 8px 0; }
.expense-more .link-btn { font-size: 13px; }

/* ===================== 账户收支汇总（收支管理面板）===================== */
.acc-summary-box { margin: 10px 0 4px; }
.acc-sum-title { font-size: 13px; color: #333; font-weight: 600; margin-bottom: 6px; }
.acc-sum-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.acc-sum-table th { text-align: left; color: #888; font-weight: 600; padding: 6px 8px; border-bottom: 2px solid #eee; }
.acc-sum-table td { padding: 7px 8px; border-bottom: 1px solid #f4f4f4; }
.acc-sum-table th:not(:first-child), .acc-sum-table td:not(:first-child) { text-align: right; }
.acc-inc { color: #2e7d32; font-weight: 600; }
.acc-exp { color: #c0392b; font-weight: 600; }
.acc-net-pos { color: #2e7d32; font-weight: 700; }
.acc-net-neg { color: #c62828; font-weight: 700; }
.acc-sum-total td { border-top: 2px solid #eee; border-bottom: none; font-weight: 700; color: #333; }

/* v23：L1 按账户收支明细表——紧凑排布，375px 屏宽不溢出 */
.acc-summary-box .acc-sum-table { table-layout: fixed; font-size: 12px; }
.acc-summary-box .acc-sum-table th,
.acc-summary-box .acc-sum-table td { padding: 6px 4px; white-space: nowrap; }
.acc-summary-box .acc-sum-table th:first-child,
.acc-summary-box .acc-sum-table td.acc-name { width: 24%; text-align: left; }
.acc-summary-box .acc-sum-table td.acc-name {
  overflow: hidden; text-overflow: ellipsis; color: #333; font-weight: 500;
}
.acc-empty { font-size: 12px; color: #999; padding: 8px 4px; }

/* ===================== 明细列表内 编辑/删除 按钮 ===================== */
.de-actions { display: flex; gap: 6px; margin-top: 6px; }
.de-edit, .de-del { border: none; border-radius: 6px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.de-edit { background: #534AB7; color: #fff; }
.de-del { background: #fdecea; color: #c0392b; }

/* ===================== 全局密码弹窗（删除 / 编辑密码）===================== */
.gp-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 980;
  display: flex; align-items: flex-end; justify-content: center;
}
.gp-sheet {
  background: #fff; width: 100%; max-width: 520px; border-radius: 16px 16px 0 0;
  padding: 18px; box-sizing: border-box;
}
.gp-sheet h3 { margin: 0 0 12px; font-size: 16px; }
.gp-summary { background: #f7f7fb; border-radius: 8px; padding: 10px; font-size: 14px; color: #333; word-break: break-all; }
.gp-warn { color: #c0392b; font-size: 12px; margin: 8px 0 4px; }
.gp-input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; margin-top: 8px; }
.gp-err { color: #c0392b; font-size: 13px; margin: 6px 0 0; }
.gp-actions { display: flex; gap: 10px; margin-top: 14px; }
.gp-actions button { flex: 1; }

/* ===================== 弹窗内筛选栏（收支/寄存明细）===================== */
.exp-filter { background: #f7f7fb; border-radius: 10px; padding: 10px; margin-bottom: 10px; }
.exp-filter-row { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.exp-filter-row:last-child { margin-bottom: 0; }
.exp-filter select,
.exp-filter input[type="text"],
.exp-filter input[type="date"] { flex: 1 1 auto; min-width: 80px; padding: 7px 8px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; background: #fff; }
.exp-filter input.exp-filter-kw { width: 100%; flex-basis: 100%; }
.exp-filter-sep { color: #999; }
.exp-filter-check { font-size: 13px; color: #555; display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }

/* ===================== 3 级栏目页面壳（L2/L3，#pageHeader + #pageRoot）===================== */
#pageHeader {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, #534AB7, #7b6ff0); color: #fff;
  padding: 12px 14px; border-radius: 0 0 14px 14px;
}
#pageBack {
  border: none; background: rgba(255,255,255,.2); color: #fff;
  width: 32px; height: 32px; border-radius: 50%; font-size: 18px; line-height: 1; cursor: pointer; flex: 0 0 auto;
}
#pageTitle { font-size: 16px; font-weight: 700; }

#pageRoot { padding: 12px; min-height: calc(100vh - 56px); }

/* v8 hotfix：#pageHeader { display: flex } 默认优先级高于 [hidden] 默认值 display:none，
 * 导致 L1 状态 pageHeader（← 返回键）错误显示在 L1 顶部。补 [hidden]!important 兜底，
 * 让 L1 时彻底隐藏 pageHeader 和 pageRoot。user 反馈"一级返回键没用就删"——此 CSS 隐藏即等同删除。 */
#pageHeader[hidden], #pageRoot[hidden] { display: none !important; }

/* L1 元素进入 L2/L3 时必须真正隐藏（ID 选择器优先级高于 [hidden]，故用 !important 兜底） */
#boardMain[hidden], #boardHeader[hidden], #rangeBar[hidden], #rangeCustom[hidden] { display: none !important; }

/* 筛选栏（L2 共用） */
.l2-filter { display: flex; gap: 6px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 2px; margin-bottom: 10px; }
.l2-filter.l2-filter-2 { flex-wrap: wrap; overflow: visible; }
.l2-tab {
  flex: 0 0 auto; min-width: 56px; padding: 7px 10px; border: 1px solid #ddd; background: #fff;
  border-radius: 999px; font-size: 13px; color: #555; cursor: pointer; white-space: nowrap;
}
.l2-tab.active { background: #534AB7; color: #fff; border-color: #534AB7; }
.l2-filter select, .l2-filter input[type="text"] {
  flex: 1 1 auto; min-width: 0; padding: 8px 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 13px; background: #fff;
}
.l2-filter input.l2-kw { flex-basis: 100%; }
.l2-custom { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; color: #555; }
.l2-custom[hidden] { display: none; }
.l2-custom input[type="date"] { flex: 1; padding: 8px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; }

/* 卡片列表 / 记录卡片（销售） */
.card-list { display: flex; flex-direction: column; gap: 10px; }
.group-head { font-size: 12px; color: #888; margin: 6px 2px 2px; font-weight: 600; }
.record-card { background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); cursor: pointer; }
.record-card:active { transform: scale(.99); }
.rc-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.rc-name { font-size: 15px; font-weight: 600; color: #222; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rc-table { font-size: 13px; color: #534AB7; flex: 0 0 auto; }
.rc-mid { display: flex; justify-content: space-between; font-size: 12px; color: #888; margin-top: 4px; }
.rc-bottom { display: flex; justify-content: space-between; align-items: baseline; margin-top: 4px; }
.rc-total { font-size: 18px; font-weight: 700; color: #333; }
.rc-meta { font-size: 12px; color: #999; }
.rc-tags { margin-top: 6px; display: flex; gap: 6px; }
.tag { font-size: 11px; padding: 2px 8px; border-radius: 8px; background: #eee; color: #555; }
.tag-os-completed, .tag-ps-paid { background: #e6f4ea; color: #1e7a34; }
.tag-os-refunded, .tag-ps-refunded { background: #fdecea; color: #c0392b; }
.tag-os-partial_refund, .tag-ps-partial_refund { background: #fff4e0; color: #b8860b; }
.tag-ps-pending { background: #eef; color: #555; }

/* 加载更多 / 空状态 / 页脚 */
.load-more { width: 100%; padding: 10px; border: none; border-radius: 8px; background: #534AB7; color: #fff; font-size: 14px; cursor: pointer; }
.load-more:disabled { opacity: .6; }
.empty-state { text-align: center; color: #aaa; font-size: 13px; padding: 28px 0; }
.l2-foot { margin-top: 12px; }

/* ===================== 桌台网格（L2）===================== */
.table-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.table-cell { background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); position: relative; }
.table-cell.idle { background: #f4f4f6; color: #aaa; }
.table-cell.clickable { cursor: pointer; }
.table-cell.clickable:active { transform: scale(.98); }
.tc-top { display: flex; justify-content: space-between; align-items: flex-start; }
.tc-id { font-size: 20px; font-weight: 700; color: #333; }
.table-cell.idle .tc-id { color: #bbb; }
.tc-reg { border: none; background: #534AB7; color: #fff; border-radius: 6px; font-size: 11px; padding: 3px 8px; cursor: pointer; }
.tc-name { font-size: 13px; color: #555; margin-top: 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tc-status { font-size: 12px; margin-top: 4px; font-weight: 600; }
.status-计时中 { color: #2e7d32; }
.status-暂停 { color: #b8860b; }
.status-超时 { color: #c0392b; }
.status-空闲 { color: #aaa; }
.tc-time { font-size: 12px; color: #888; margin-top: 4px; font-variant-numeric: tabular-nums; }

/* 区域分组（全部区域 L2） */
.zone-group { margin-bottom: 12px; }
.zone-group-head { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); display: flex; justify-content: space-between; align-items: center; cursor: pointer; font-size: 16px; font-weight: 600; }
.zone-group-head:active { transform: scale(.99); }
.zone-occ { color: #534AB7; font-size: 14px; }

/* ===================== 三级详情（L3 共用）===================== */
.l3-head { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 10px; }
.l3-title { font-size: 18px; font-weight: 700; }
.l3-sub { font-size: 13px; color: #666; margin-top: 4px; }
.l3-tags { margin-top: 6px; display: flex; gap: 6px; }
.l3-amount { display: flex; gap: 10px; margin-bottom: 8px; }
.l3-amount > div { flex: 1; background: #f6f6fc; border-radius: 12px; padding: 12px; text-align: center; }
.l3-amt-label { font-size: 12px; color: #888; display: block; }
.l3-amount b { font-size: 20px; font-weight: 700; color: #333; }
.l3-note { font-size: 12px; color: #c0392b; background: #fdecea; border-radius: 8px; padding: 8px; margin-bottom: 10px; }
.l3-sec { background: #fff; border-radius: 12px; padding: 12px 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 10px; }
.l3-sec h4 { margin: 0 0 8px; font-size: 14px; color: #333; }
.l3-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.l3-table th { text-align: left; color: #888; font-weight: 600; padding: 6px 4px; border-bottom: 2px solid #eee; }
.l3-table td { padding: 6px 4px; border-bottom: 1px solid #f4f4f4; }
.l3-kv { display: flex; justify-content: space-between; padding: 5px 0; border-bottom: 1px solid #f4f4f4; font-size: 14px; }
.l3-kv span { color: #888; }
.l3-foot { padding: 6px 0 16px; }
.l3-foot.two { display: flex; gap: 10px; }
.l3-foot.two button { flex: 1; }

/* 倒计时卡 */
.countdown-card { background: linear-gradient(135deg, #534AB7, #7b6ff0); color: #fff; border-radius: 14px; padding: 18px; text-align: center; margin-bottom: 10px; }
.cd-label { font-size: 13px; opacity: .9; }
.cd-time { font-size: 34px; font-weight: 800; font-variant-numeric: tabular-nums; margin: 4px 0; }
.cd-rule { font-size: 12px; opacity: .85; }

/* ===================== 寄存列表（L2）+ 画廊 + 时间线（L3）===================== */
.ts-card { display: flex; gap: 10px; background: #fff; border-radius: 12px; padding: 10px; box-shadow: 0 1px 3px rgba(0,0,0,.06); cursor: pointer; align-items: center; }
.ts-card:active { transform: scale(.99); }
.ts-thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; flex: 0 0 auto; background: #f0f0f4; }
.ts-thumb-empty { display: flex; align-items: center; justify-content: center; color: #bbb; font-size: 11px; }
.ts-info { flex: 1; min-width: 0; }
.ts-code { font-size: 18px; font-weight: 700; color: #333; }
.ts-cust { font-size: 13px; color: #555; }
.ts-loc { font-size: 12px; color: #888; }
.ts-date { font-size: 11px; color: #aaa; }
.ts-days { font-size: 12px; color: #555; margin-top: 2px; }
.ts-days-overdue { color: #c0392b; font-weight: 600; }

.gallery { display: flex; gap: 8px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 4px 0 10px; }
.gallery-item { position: relative; flex: 0 0 auto; }
.gallery-item img { width: 160px; height: 160px; border-radius: 12px; object-fit: cover; }
.gallery-idx { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 1px 6px; border-radius: 8px; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 10px; padding: 6px 0; }
.tl-dot { width: 10px; height: 10px; border-radius: 50%; background: #534AB7; margin-top: 5px; flex: 0 0 auto; }
.tl-body b { font-size: 14px; color: #333; }
.tl-op { font-size: 12px; color: #888; }
.tl-time { font-size: 11px; color: #aaa; }

/* ===================== 收支列表（L2）===================== */
.record-list { list-style: none; margin: 10px 0 0; padding: 0; }
.record-item { background: #fff; border-radius: 12px; padding: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06); margin-bottom: 10px; }
.ri-main { display: flex; justify-content: space-between; align-items: baseline; }
.ri-amt { font-size: 18px; font-weight: 700; }
.ri-amt.inc { color: #2e7d32; }
.ri-amt.exp { color: #c0392b; }
.ri-meta { font-size: 13px; color: #555; }
.ri-sub { font-size: 12px; color: #999; margin-top: 2px; }
.ri-actions { display: flex; gap: 6px; margin-top: 8px; }
.ri-edit, .ri-del { border: none; border-radius: 6px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.ri-edit { background: #534AB7; color: #fff; }
.ri-del { background: #fdecea; color: #c0392b; }

/* ===================== 寄存录入表单（拍照）===================== */
.reg-mask { position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 970; display: flex; align-items: flex-end; justify-content: center; }
.reg-sheet { background: #fff; width: 100%; max-width: 520px; border-radius: 16px 16px 0 0; padding: 18px; max-height: 92vh; overflow-y: auto; box-sizing: border-box; }
.reg-sheet h3 { margin: 0 0 12px; font-size: 16px; }
.reg-sheet label { display: block; font-size: 13px; color: #666; margin: 10px 0 4px; }
.reg-input { width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px; box-sizing: border-box; }
.reg-sheet input[type="file"] { margin-top: 6px; font-size: 14px; }
.reg-preview { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.reg-thumb { width: 56px; height: 56px; border-radius: 8px; object-fit: cover; }
.reg-actions { display: flex; gap: 10px; margin-top: 16px; }
.reg-actions button { flex: 1; }

/* ===================== v9 hotfix：新桌台卡片（替换原 .table-cell）===================== */
/* 右上角容器：寄存录入按钮 + 状态标签 横向排列 */
.tc-head-right { display: flex; align-items: center; gap: 6px; }

.table-card { background:#fff; border-radius:14px; padding:14px 14px 12px; box-shadow:0 1px 4px rgba(0,0,0,.06); position:relative; display:flex; flex-direction:column; gap:8px; min-height:120px; }
.table-card.idle { background:#f7f7fa; opacity:.55; }
.table-card.clickable { cursor: pointer; }
.table-card.clickable:active { transform: scale(.98); }
.tc-head { display:flex; align-items:center; justify-content:space-between; gap:8px; }
.tc-id-large { font-size:18px; font-weight:700; color:#222; line-height:1; white-space:nowrap; }
.tc-state-pill { font-size:11px; padding:3px 8px; border-radius:999px; font-weight:600; }
.tc-state-pill.s-timing { background:#e6f7ee; color:#0a8c4a; }
.tc-state-pill.s-paused { background:#fff0ee; color:#c0392b; }
.tc-state-pill.s-overtime { background:#fde8e6; color:#c0392b; }
.tc-reg-btn { font-size:11px; padding:4px 9px; border-radius:6px; background:#534AB7; color:#fff; border:none; cursor:pointer; }
.tc-product { font-size:14px; color:#444; line-height:1.3; min-height:18px; }
.tc-product-empty { color:#bbb; }
.tc-countdown { font-size:30px; font-weight:800; line-height:1; font-variant-numeric:tabular-nums; letter-spacing:-1px; margin-top:auto; }
.tc-countdown.c-timing { color:#0a8c4a; }   /* 限时未超时 绿 */
.tc-countdown.c-paused { color:#c0392b; }   /* 暂停 红 */
.tc-countdown.c-overtime { color:#c0392b; } /* 超时 红 */
.tc-countdown.c-unlimited { color:#666; }   /* 不限时已用 灰 */
.tc-countdown-empty { color:#ddd; font-size:18px; }

/* 底部行：大计时器（左）+ 寄存录入按钮（右）；card 为 flex 列，margin-top:auto 推到底部 */
.tc-foot { display:flex; align-items:flex-end; justify-content:space-between; gap:8px; margin-top:auto; }
.tc-foot .tc-countdown { margin-top:0; flex:1 1 auto; min-width:0; }
.tc-foot .tc-reg-btn { flex:0 0 auto; }

.tc-cd-label { font-size:12px; color:#888; margin-right:4px; font-weight:500; }

/* ===================== L3 倒计时卡四态背景（替换原固定紫色，背景随状态 class 切换）===================== */
.countdown-card.cd-unlimited { background:#f2f2f5; color:#555; }
.countdown-card.cd-timing { background:#e6f7ee; color:#0a8c4a; }
.countdown-card.cd-paused { background:#fdeceb; color:#c0392b; }
.countdown-card.cd-overtime { background:#fde8e6; color:#c0392b; }

/* ===================== v27：L2 收支配置管理面板（类型 / 账户 CRUD）===================== */
/* 入口按钮：小字灰色幽灵按钮，与「+ 记一笔」同排但视觉权重更低 */
.ex-mgr-entry {
  background: transparent; color: #888; border: 1px solid #ddd; border-radius: 8px;
  padding: 5px 10px; font-size: 12px; cursor: pointer; flex: 0 0 auto;
}
.ex-mgr-entry:active { background: #f2f2f5; }

/* 遮罩 + 底部抽屉（与 .modal-mask/.modal-sheet 同一套视觉语言，z-index 更高，避免被弹窗压住） */
.ex-mgr-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 980;
  display: flex; align-items: flex-end; justify-content: center;
}
.ex-mgr-sheet {
  background: #fff; width: 100%; max-width: 520px; border-radius: 16px 16px 0 0;
  display: flex; flex-direction: column; max-height: 86vh;
}
.ex-mgr-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px 10px; font-size: 16px; font-weight: 600; color: #222;
  border-bottom: 1px solid #f0f0f4;
}
.ex-mgr-x {
  background: none; border: none; font-size: 24px; line-height: 1; color: #999;
  padding: 0 4px; cursor: pointer;
}
.ex-mgr-body { padding: 12px 18px 4px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.ex-mgr-sec { margin-bottom: 18px; }
.ex-mgr-title { font-size: 14px; font-weight: 600; color: #333; margin-bottom: 8px; }
.ex-mgr-sub { font-size: 12px; color: #888; margin: 8px 0 4px; }
.ex-mgr-tags { display: flex; flex-wrap: wrap; gap: 8px; min-height: 28px; }
.ex-mgr-hint { font-size: 12px; color: #bbb; line-height: 26px; }

/* 标签：收入绿 / 支出红 / 账户蓝，右侧带 × 删除 */
.ex-mgr-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 13px; padding: 5px 6px 5px 10px; border-radius: 8px; background: #eee; color: #555;
}
.ex-mgr-tag-inc { background: #e6f4ea; color: #1e7a34; }
.ex-mgr-tag-exp { background: #fdecea; color: #c0392b; }
.ex-mgr-tag-acc { background: #e8eefc; color: #2b4fa8; }
.ex-mgr-del {
  background: none; border: none; color: inherit; opacity: .55;
  font-size: 16px; line-height: 1; padding: 0 2px; cursor: pointer;
}
.ex-mgr-del:active { opacity: 1; }

/* 添加行：输入框 + （方向下拉）+ 添加按钮，手机端保证按钮不被挤没 */
.ex-mgr-add { display: flex; gap: 8px; align-items: center; margin-top: 10px; }
.ex-mgr-add input, .ex-mgr-add select {
  flex: 1 1 auto; min-width: 0; padding: 9px 10px;
  border: 1px solid #ddd; border-radius: 8px; font-size: 14px;
}
.ex-mgr-add select { flex: 0 0 84px; }
.ex-mgr-add .ex-mgr-num { flex: 0 0 96px; }
.ex-mgr-add .btn-mini { flex: 0 0 auto; padding: 9px 12px; }

.ex-mgr-msg { font-size: 12px; margin: 4px 0 10px; }
.ex-mgr-msg-ok { color: #1e7a34; }
.ex-mgr-msg-err { color: #c0392b; }

.ex-mgr-foot { padding: 10px 18px 18px; border-top: 1px solid #f0f0f4; }
.ex-mgr-foot .btn-primary { width: 100%; }
