/* ========== 全局字体：阿里巴巴普惠体 3.0（中英文统一，本地自托管，免费商用） ========== */
@font-face {
  font-family: 'Alibaba PuHuiTi 3.0';
  font-style: normal;
  font-weight: 400 500;
  font-display: swap;
  src: local('Alibaba PuHuiTi 3.0 55 Regular'), local('Alibaba PuHuiTi'),
       url('fonts/AlibabaPuHuiTi-3-55-Regular.woff2') format('woff2');
}
@font-face {
  font-family: 'Alibaba PuHuiTi 3.0';
  font-style: normal;
  font-weight: 600 900;
  font-display: swap;
  src: local('Alibaba PuHuiTi 3.0 85 Bold'), local('Alibaba PuHuiTi Bold'),
       url('fonts/AlibabaPuHuiTi-3-85-Bold.woff2') format('woff2');
}

/* ========== 全局基础 ========== */
* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --font-sans: 'Alibaba PuHuiTi 3.0', 'Alibaba PuHuiTi', 'Alibaba PuHuiTi 3.0 55 Regular',
               -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --primary: #7C3AED;        /* 公司主色：紫 */
  --primary-light: #F5F3FF;  /* violet-50 */
  --primary-dark: #6D28D9;   /* violet-700 */
  --success: #16a34a;
  --warning: #f59e0b;
  --danger: #dc2626;
  --gray-50: #f9fafb;
  --gray-100: #f3f4f6;
  --gray-200: #e5e7eb;
  --gray-300: #d1d5db;
  --gray-400: #9ca3af;
  --gray-500: #6b7280;
  --gray-600: #4b5563;
  --gray-700: #374151;
  --gray-800: #1f2937;
  --gray-900: #111827;
  --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
  --shadow: 0 2px 8px rgba(0,0,0,0.06);
  --shadow-lg: 0 8px 24px rgba(0,0,0,0.12);
  --radius: 8px;
  --surface: #f8f7f3;  /* 大面积面板底色：暖白纸色，替代纯白降低刺眼感 */
}
html, body { height: 100%; font-family: var(--font-sans); color: var(--gray-800); background: #c6cdd9; font-size: 14px; line-height: 1.5; }
/* 全站（含弹窗、表格、标签、提示条等）统一阿里普惠体，中英文一致 */
*, *::before, *::after, #app, #modal-root, #toast-root { font-family: var(--font-sans); }
button { font-family: inherit; cursor: pointer; }
input, select, textarea, optgroup, option { font-family: inherit; font-size: 14px; }
.hidden { display: none !important; }

/* ========== 登录页 ========== */
.login-page { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #7C3AED 0%, #A78BFA 100%); }
.login-box { background: var(--surface); padding: 40px; border-radius: 12px; width: 400px; box-shadow: var(--shadow-lg); }
.login-header { text-align: center; margin-bottom: 28px; }
.login-header .logo { font-size: 48px; margin-bottom: 8px; }
.login-header h1 { font-size: 20px; color: var(--gray-800); margin-bottom: 4px; }
.login-header .subtitle { font-size: 12px; color: var(--gray-400); }
.login-hint { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--gray-200); font-size: 12px; color: var(--gray-500); }
.login-hint summary { cursor: pointer; user-select: none; }
.login-hint ul { margin-top: 8px; padding-left: 20px; }
.login-hint li { margin: 4px 0; }

/* ========== 表单 ========== */
.form-row { margin-bottom: 14px; }
.form-row label { display: block; font-size: 12px; color: var(--gray-600); margin-bottom: 6px; font-weight: 500; }
.form-row input, .form-row select, .form-row textarea {
  width: 100%; padding: 8px 12px; border: 1px solid var(--gray-300); border-radius: var(--radius); background: white;
  transition: border-color 0.15s;
}
.form-row input:focus, .form-row select:focus, .form-row textarea:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.15); }
.form-row textarea { resize: vertical; min-height: 64px; }
.form-row.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-row.row-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.form-row.row-4 { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 12px; }
.error-msg { color: var(--danger); font-size: 12px; margin-top: 8px; min-height: 16px; }

/* 多选 checkbox 网格 */
.checkbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 8px; padding: 10px; background: var(--gray-50); border-radius: var(--radius); border: 1px solid var(--gray-200); max-height: 180px; overflow-y: auto; }
/* 项目表单客户勾选区限高：腾出高度，保证下方必填「税点」在常见笔记本屏幕上默认可见（可滚动查看全部客户）。移动端沿用 46vh。 */
#client-checkboxes { max-height: 140px; }
@media (max-width: 768px) { #client-checkboxes { max-height: 46vh; } }
.checkbox-item { display: flex; align-items: center; gap: 6px; padding: 6px 10px; background: white; border-radius: 6px; cursor: pointer; border: 1px solid var(--gray-200); transition: all 0.15s; }
.checkbox-item:hover { border-color: var(--primary); }
.checkbox-item input { margin: 0; cursor: pointer; }
/* 修复：.form-row input 的 width:100% 会把勾选框撑满整行，导致文字被挤到最右侧。
   这里提高优先级把复选框/单选框恢复成固定 16px，桌面与手机端都生效。 */
.form-row input[type=checkbox], .form-row input[type=radio],
.checkbox-grid input[type=checkbox], .checkbox-item input[type=checkbox],
.modal-body input[type=checkbox], .modal-body input[type=radio] {
  width: 16px; height: 16px; min-width: 16px; min-height: 0; padding: 0; flex: none;
  accent-color: var(--primary); cursor: pointer;
}
.checkbox-item input:checked + span { color: var(--primary); font-weight: 500; }
.checkbox-item:has(input:checked) { border-color: var(--primary); background: var(--primary-light); }

/* ========== 按钮 ========== */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: var(--radius); border: 1px solid transparent; background: white; font-size: 13px; font-weight: 500; transition: all 0.15s; }
.btn:hover { box-shadow: var(--shadow-sm); }
.btn-primary { background: var(--primary); color: white; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-success { background: var(--success); color: white; }
.btn-danger { background: var(--danger); color: white; }
.btn-warning { background: var(--warning); color: white; }
.btn-ghost { background: transparent; color: var(--gray-700); border-color: var(--gray-300); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-print { background: #0ea5e9; color: #fff; border-color: #0ea5e9; }
.btn-print:hover { background: #0284c7; border-color: #0284c7; }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn-block { display: flex; width: 100%; justify-content: center; }
.btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn.active:hover { background: var(--primary-dark); }

/* ========== 主布局 ========== */
#main-app { display: grid; grid-template-columns: 220px 1fr; grid-template-rows: minmax(0, 1fr); height: 100vh; }
.sidebar { background: #1f2937; border-right: 1px solid #0f172a; display: flex; flex-direction: column; }
.sidebar-brand { display: flex; align-items: center; gap: 8px; padding: 18px 20px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.sidebar-brand .logo-mini { font-size: 24px; color: #fff; }
.sidebar-brand .brand-text { font-weight: 600; font-size: 15px; color: #fff; }
.nav { flex: 1; padding: 12px 8px; overflow-y: auto; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; color: #cbd5e1; text-decoration: none; border-radius: var(--radius); margin-bottom: 2px; cursor: pointer; border-left: 3px solid transparent; }
.nav-item:hover { background: rgba(255,255,255,0.08); }
.nav-item.active { background: rgba(44,95,199,0.30); color: #fff; font-weight: 500; border-left: 3px solid var(--primary); }
.nav-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 8px 12px; }
/* ---------- 侧栏导航自定义排序（2026-09-27 buck）：拖拽换位，「常用的放上面」 ---------- */
/* 手柄用 ::before 画（不是真文本节点）：多个回归脚本读 `.nav-item` 的 textContent，
   往里加字符会把它们全部带跑。 */
.nav-draggable { position: relative; }
/* 手柄放在右侧、悬停才出现：不挤动文字、不改变默认观感（grip 用 ::before 生成，不进 textContent） */
.nav-draggable::after {
  content: '⠿'; position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  font-size: 12px; line-height: 1; color: rgba(255,255,255,0.38); opacity: 0;
  transition: opacity .12s ease; pointer-events: none;
}
.nav-item.nav-draggable:hover::after { opacity: 1; }
.nav-item.dragging { opacity: .45; background: rgba(255,255,255,0.12); }
/* 自定义顺序下隐藏分隔线：原「业务 / 财务 / 老板」的分组语义已被用户自己的顺序取代，
   留着只会让人以为那还是一组。 */
.nav.nav-custom > .nav-divider { display: none; }
.nav-reset {
  display: block; width: calc(100% - 16px); margin: 10px 8px 2px; padding: 7px 10px;
  background: transparent; border: 1px dashed rgba(255,255,255,0.25); border-radius: var(--radius);
  color: rgba(255,255,255,0.62); font-size: 12px; cursor: pointer; text-align: center;
}
.nav-reset:hover { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.45); }
.sidebar-footer { padding: 12px; border-top: 1px solid rgba(255,255,255,0.08); }
.user-card { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: var(--radius); margin-bottom: 8px; cursor: pointer; }
.user-card:hover { background: rgba(255,255,255,0.08); }
.uc-gear { margin-left: auto; font-size: 14px; color: rgba(255,255,255,0.55); }
.user-card:hover .uc-gear { color: #fff; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: rgba(255,255,255,0.15); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; }
.user-name { font-weight: 500; font-size: 13px; color: #fff; }
.user-role { font-size: 11px; color: rgba(255,255,255,0.6); }
.footer-actions { display: flex; gap: 8px; }
.btn-personal { flex: 1; padding: 6px; background: rgba(124,58,237,0.22); border: 1px solid rgba(167,139,250,0.55); border-radius: var(--radius); color: #fff; font-size: 12px; }
.btn-personal:hover { background: rgba(124,58,237,0.38); }
.btn-logout { flex: 1; padding: 6px; background: transparent; border: 1px solid rgba(255,255,255,0.25); border-radius: var(--radius); color: rgba(255,255,255,0.8); font-size: 12px; }
.btn-logout:hover { background: rgba(255,255,255,0.08); }

/* ========== 主区 ========== */
.main { display: flex; flex-direction: column; min-width: 0; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--gray-200); padding: 12px 24px; display: flex; align-items: center; justify-content: space-between; }
.topbar h2 { font-size: 16px; font-weight: 600; color: var(--gray-800); }
/* 右上角：通知 + 日期时钟 横向排布，不重叠 */
.topbar-right { display: flex; align-items: center; gap: 16px; flex-shrink: 0; }
/* 右上角日期 + 时钟（12 小时制 AM/PM，显示到分） */
.topbar-clock {
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1.25; white-space: nowrap;
}
.topbar-clock .tc-date { font-size: 13px; font-weight: 600; color: var(--gray-700); }
.topbar-clock .tc-time { font-size: 13px; color: var(--primary); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .3px; }
.pending-bell { background: var(--gray-100); padding: 6px 12px; border-radius: 20px; font-size: 13px; font-weight: 600; cursor: pointer; }
.pending-bell:hover { background: var(--gray-200); }
.pending-bell.has { background: #fef3c7; color: var(--warning); }

/* ====== 通知下拉 ====== */
.bell-wrap { position: relative; display: inline-block; }
.notif-dropdown {
  display: none;
  position: absolute;
  right: 0;
  top: 100%;
  margin-top: 8px;
  width: 380px;
  max-height: 540px;
  background: var(--surface);
  border-radius: 12px;
  box-shadow: 0 6px 28px rgba(0,0,0,0.12), 0 2px 6px rgba(0,0,0,0.08);
  z-index: 1000;
  overflow: hidden;
  flex-direction: column;
}
.notif-dropdown.open { display: flex; }
.notif-dropdown-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 16px;
  border-bottom: 1px solid var(--gray-100, #f1f5f9);
  font-weight: 600;
  color: var(--gray-700, #334155);
  background: var(--gray-50, #f8fafc);
}
.btn-link {
  background: none;
  border: none;
  color: var(--primary, #4f46e5);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}
.btn-link:hover { text-decoration: underline; }
.notif-list {
  flex: 1;
  overflow-y: auto;
  max-height: 420px;
}
.notif-item {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  cursor: pointer;
  border-bottom: 1px solid #f8fafc;
  transition: background 0.12s;
}
.notif-item:hover { background: var(--gray-50, #f8fafc); }
.notif-item.unread { background: #fefce8; }
.notif-item.unread:hover { background: #fef9c3; }
.notif-body { flex: 1; min-width: 0; }
.notif-title {
  font-size: 13px;
  font-weight: 600;
  color: #1e293b;
  margin-bottom: 2px;
}
.notif-content {
  font-size: 12px;
  color: #64748b;
  line-height: 1.5;
  word-break: break-word;
  margin-bottom: 4px;
}
.notif-time {
  font-size: 11px;
  color: #94a3b8;
}
.notif-loading, .notif-empty {
  padding: 32px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}
.notif-dropdown-foot {
  padding: 8px 16px;
  text-align: center;
  font-size: 11px;
  color: #94a3b8;
  background: var(--gray-50, #f8fafc);
  border-top: 1px solid var(--gray-100, #f1f5f9);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.notif-view-all {
  color: var(--primary, #4f46e5);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.notif-view-all:hover { text-decoration: underline; }
.notif-foot-hint { font-size: 10px; text-align: right; }

/* ====== 通知中心页面 ====== */
.notif-center { max-width: 860px; margin: 0 auto; padding: 4px 0 24px; }
.notif-toolbar {
  display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; margin-bottom: 12px;
}
.notif-filter { display: flex; gap: 6px; background: var(--gray-50, #f8fafc); padding: 4px; border-radius: 10px; }
.nf-tab {
  border: none; background: none; padding: 7px 16px; border-radius: 8px;
  font-size: 14px; color: var(--gray-600, #475569); cursor: pointer; font-weight: 500;
}
.nf-tab.active { background: var(--surface); color: var(--primary, #4f46e5); box-shadow: 0 1px 3px rgba(0,0,0,0.08); font-weight: 600; }
.nf-unread-n {
  display: inline-block; min-width: 18px; margin-left: 6px; padding: 0 5px;
  font-size: 11px; line-height: 18px; text-align: center; border-radius: 9px;
  background: #ef4444; color: #fff;
}
.notif-toolbar-right { display: flex; gap: 8px; flex-wrap: wrap; }
.notif-bulkbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  padding: 10px 14px; border-radius: 10px; margin-bottom: 12px; font-size: 14px;
}
.notif-bulkbar .btn { margin-left: auto; }
.notif-bulkbar #nf-sel-clear { margin-left: 0; }
.notif-rows { display: flex; flex-direction: column; gap: 8px; }
.notif-row {
  display: flex; align-items: flex-start; gap: 10px; position: relative;
  padding: 14px 14px 14px 12px; background: var(--surface); border: 1px solid var(--gray-100, #f1f5f9);
  border-radius: 12px; cursor: pointer; transition: background 0.12s, border-color 0.12s;
}
.notif-row:hover { background: var(--gray-50, #f8fafc); }
.notif-row.is-unread { background: #fefce8; border-color: #fde68a; }
.notif-row.is-unread:hover { background: #fef9c3; }
.notif-row.is-read { opacity: 0.78; }
.notif-dot {
  width: 8px; height: 8px; border-radius: 50%; background: #ef4444; margin-top: 6px; flex: 0 0 auto;
}
.notif-dot.read { background: transparent; }
.notif-check { flex: 0 0 auto; margin-top: 2px; display: flex; align-items: center; }
.notif-check input { width: 17px; height: 17px; cursor: pointer; }
.notif-main { flex: 1; min-width: 0; }
.notif-title { font-size: 14px; font-weight: 600; color: #1e293b; margin-bottom: 3px; }
.notif-row.is-unread .notif-title { color: #111827; }
.notif-content { font-size: 13px; color: #64748b; line-height: 1.55; word-break: break-word; margin-bottom: 4px; }
.notif-time { font-size: 11px; color: #94a3b8; }

@media (max-width: 768px) {
  .notif-toolbar { flex-direction: column; align-items: stretch; }
  .notif-toolbar-right { justify-content: space-between; }
  .notif-row { padding: 12px 10px; }
  .notif-bulkbar { font-size: 13px; }
}
.page-content { padding: 24px; overflow-y: auto; flex: 1; }

/* ========== 卡片 ========== */
/* 2026-10-29 buck（C 方案「深底浮卡」）：底色 #c6cdd9 偏深，卡片一律纯白、不加边框，
   靠一致的浮起阴影把「卡片 ↔ 背景」「卡片 ↔ 卡片」区分开（原来是淡紫底 + 暖白卡，几乎同色分不清）。
   有 inline background / border 的卡片（待审批琥珀、警示红等）保持原样，只统一默认观感。 */
.card { background: #ffffff; border-radius: var(--radius); box-shadow: 0 4px 14px rgba(15,23,42,0.16); padding: 18px; }
.card-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; padding-bottom: 12px; border-bottom: 1px solid var(--gray-200); }
/* 「常用项目」入口大卡（2026-10-29 buck）：一眼可点的大入口，hover 时轻微浮起提示可点击 */
.freq-proj-card { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 16px 18px; cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .15s; }
.freq-proj-card:hover { border-color: #94a3b8; box-shadow: 0 4px 12px rgba(15,23,42,.12); transform: translateY(-1px); }
.card-title { font-size: 14px; font-weight: 600; color: var(--gray-800); }
.card.alert-red { border-top: 4px solid #F43F5E; background: #fff5f7; }
.card.alert-red .card-title { color: #be123c; }
.card.alert-amber { border-top: 4px solid #F59E0B; background: #fffbeb; }
.card.alert-amber .card-title { color: #b45309; }

/* ========== 仪表盘 ========== */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 20px; }
/* 顶部色带卡片：白色卡身 + 顶部整条彩色带（标签写在带内）+ 色带右上角小方块；整体主色为紫色，其余状态用糖果色 */
.stat-card { background: var(--surface); border: 1px solid var(--gray-200); border-radius: var(--radius); box-shadow: var(--shadow-sm); position: relative; overflow: hidden; padding: 0 18px 18px; }
.stat-card::before { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 26px; background: var(--sc-band, var(--primary)); border-radius: var(--radius) var(--radius) 0 0; }
.stat-card::after { content: ""; position: absolute; top: 7px; right: 8px; width: 12px; height: 12px; background: rgba(255,255,255,0.6); border: 1px solid rgba(255,255,255,0.85); border-radius: 3px; z-index: 2; }
.stat-card .label { position: relative; z-index: 1; height: 26px; line-height: 26px; margin: 0; font-size: 12px; font-weight: 500; color: #fff; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.stat-card .value { font-size: 24px; font-weight: 600; color: var(--gray-800); margin-top: 10px; }
.stat-card .sub { font-size: 11px; color: var(--gray-400); margin-top: 4px; }
/* 色带配色：primary=公司紫，其余按色彩学选取与紫搭配的糖果色 */
.stat-card.primary      { --sc-band: var(--primary); }  /* 紫 */
.stat-card.success      { --sc-band: #10B981; }         /* 薄荷绿 */
.stat-card.warning      { --sc-band: #F59E0B; }         /* 蜜橙 */
.stat-card.danger       { --sc-band: #F43F5E; }         /* 玫瑰红 */
.stat-card.alarm-orange { --sc-band: #FB923C; }         /* 橙 */
.stat-card.alarm-red    { --sc-band: #EF4444; }         /* 红 */
.stat-card.alarm-blue   { --sc-band: #0EA5E9; }         /* 天蓝 */

.dashboard-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 900px) { .dashboard-row { grid-template-columns: 1fr; } }

/* ========== 表格（D 强调表头：全边框 + 表头紫色双线，呼应品牌紫） ========== */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid #e2e6ec; }
.table th { background: #eef2f7; padding: 10px 12px; text-align: left; font-weight: 500; font-size: 12px; color: #4c1d95; border: 1px solid #e2e6ec; border-bottom: 2px solid var(--primary); }
.table td { padding: 10px 12px; border: 1px solid #e2e6ec; font-size: 13px; color: var(--gray-700); }
.table tr:hover { background: #f5f3ff; }
.table .actions { display: flex; gap: 6px; flex-wrap: wrap; }
/* 紧凑表格（2026-11-03）：列多的宽表用（如暂存款对账单 11 列），收窄单元格左右 padding，
   换取「不换行 + 不横向滚动」。别全局改 .table，那会影响全站表格观感。 */
.table.table-compact th, .table.table-compact td { padding: 8px 5px; }
.table.table-compact { font-size: 12.5px; }
/* 键值对信息表（客户信息 / 供应商信息等）：键列固定宽度，未填写显示「未填写」 */
.cinfo-table th.cinfo-k { width: 132px; background: #f6f8fb; border-bottom: 1px solid #e2e6ec; border-right: 1px solid #e2e6ec; color: var(--gray-600); font-size: 12px; font-weight: 500; white-space: nowrap; vertical-align: top; }
.cinfo-table td.cinfo-v { color: var(--gray-800); font-size: 13px; word-break: break-all; vertical-align: top; }
.cinfo-table tr:hover { background: transparent; }
/* 修复：text-right 在表头需高于 .table th(text-align:left) 的优先级，否则表头左对齐而数字右对齐导致错位 */
.table th.text-right, .table td.text-right { text-align: right; }

/* ========== 工具栏 ========== */
.toolbar { display: flex; gap: 8px; margin-bottom: 14px; align-items: center; flex-wrap: wrap; }
.toolbar input, .toolbar select { padding: 6px 10px; border: 1px solid var(--gray-300); border-radius: var(--radius); }
.toolbar .search { flex: 1; min-width: 200px; max-width: 300px; }
.toolbar .spacer { flex: 1; }

/* ========== 标签 ========== */
.tag { display: inline-block; padding: 2px 8px; border-radius: 12px; font-size: 11px; font-weight: 500; }
.tag.preparing { background: #fef3c7; color: #b45309; }
.tag.ongoing { background: #dbeafe; color: #1e40af; }
.tag.active { background: #dbeafe; color: #1e40af; }
.tag.settled { background: #d1fae5; color: #065f46; }
.tag.closed { background: var(--gray-200); color: var(--gray-600); }
.tag.pending { background: #fef3c7; color: #b45309; }
/* 业务主管看板：分账户账目 */
.acc-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: middle; }
.acc-summary-row { background: #f1f5f9; }
.acc-summary-row td { border-top: 2px solid var(--gray-300); font-weight: 700; }
.tag.manager_approved { background: #dbeafe; color: #1e40af; }
.tag.paid { background: #d1fae5; color: #065f46; }
.tag.partial { background: #e0e7ff; color: #4338ca; }
.tag.received { background: #d1fae5; color: #065f46; }
.tag.overdue { background: #fee2e2; color: #991b1b; }
.tag.rejected { background: #fee2e2; color: #991b1b; }
.tag.admin { background: #fee2e2; color: #991b1b; }
.tag.manager { background: #dbeafe; color: #1e40af; }
.tag.finance { background: #d1fae5; color: #065f46; }
.tag.employee { background: var(--gray-200); color: var(--gray-600); }
/* 报销审批流状态 */
.tag.draft { background: #e5e7eb; color: #374151; }
.tag.packaged { background: #ede9fe; color: #5b21b6; }
.tag.pending_pm { background: #fef3c7; color: #b45309; }
.tag.pm_rejected { background: #fee2e2; color: #991b1b; }
.tag.pm_approved { background: #dbeafe; color: #1e40af; }
.tag.boss_rejected { background: #fecaca; color: #7f1d1d; }
.tag.boss_approved { background: #d1fae5; color: #065f46; }
.tag.in_payable { background: #cffafe; color: #0e7490; }

/* ========== 供应商应付「审批中」状态列 · 三阶段线性图标 ========== */
/* 票据 → 提交审批 → 审批完成；已完成阶段绿色点亮、未完成灰色，中间用连接线串起。 */
.ps-steps { display: flex; align-items: center; gap: 0; }
.ps-step { display: inline-flex; align-items: center; gap: 4px; padding: 2px 7px; border-radius: 11px; font-size: 11px; white-space: nowrap; line-height: 1.2; }
.ps-step.on { background: #d1fae5; color: #065f46; border: 1px solid #6ee7b7; font-weight: 600; }
.ps-step.off { background: #f1f5f9; color: #94a3b8; border: 1px dashed #cbd5e1; }
/* 「部分收」这种中间态：既不是灰（没做）也不是绿（做完）⇒ 用黄，与打款页的「部分付」同色系 */
.ps-step.part { background: #fef3c7; color: #92400e; border: 1px solid #fde68a; font-weight: 600; }
.ps-dot { width: 13px; height: 13px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 9px; line-height: 1; flex: 0 0 auto; }
.ps-step.on .ps-dot { background: #16a34a; color: #ffffff; }
.ps-step.part .ps-dot { background: #f59e0b; color: #ffffff; }
.ps-step.off .ps-dot { background: #e2e8f0; color: #94a3b8; }
.ps-line { width: 10px; height: 2px; background: #cbd5e1; flex: 0 0 auto; margin: 0 1px; }
.ps-line.on { background: #16a34a; }
/* 2026-11-11 buck：项目详情「供应商」表格的「票据 / 审批」列是重要信息，
   三个状态格与字体整体翻倍（11px → 22px、格子与圆点同步翻倍）。
   ⚠ 只作用于 .ps-steps-large：应收款三阶段与独立【供应商应付】页共用 .ps-* 类名，⛔不能全局放大。
   flex-wrap 让窄屏换行而不是把整张表撑爆。 */
.ps-steps.ps-steps-large { gap: 2px; flex-wrap: wrap; }
.ps-steps.ps-steps-large .ps-step { font-size: 22px; padding: 4px 14px; gap: 8px; border-radius: 22px; border-width: 2px; line-height: 1.25; }
.ps-steps.ps-steps-large .ps-dot { width: 26px; height: 26px; font-size: 18px; }
.ps-steps.ps-steps-large .ps-line { width: 20px; height: 4px; margin: 0 2px; }

/* 报销明细表：票据缩略图 */
.reim-thumb { height: 30px; width: 30px; object-fit: cover; border-radius: 4px; border: 1px solid var(--gray-200); margin-right: 4px; }

/* ========== Modal ========== */
.modal-mask { position: fixed; top: 0; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,0.5); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; }
.modal { background: var(--surface); border-radius: 12px; width: 600px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal.modal-lg { width: 900px; }
/* 加宽弹窗（对账单等宽表格用）：尽量让时间 / 项目名在一行里显示完整（2026-10-19 buck） */
.modal.modal-xl { width: 1500px; max-width: 96vw; }
/* 超宽弹窗（2026-11-03 buck：暂存款对账单列多、用途说明被挤到换行）—— 桌面端尽量铺满 */
.modal.modal-xxl { width: 100%; max-width: 100%; }
/* 供应商业务明细（2026-11-15 buck）：原来只有 900px，表头元信息 / 表格被挤得折行。
   专属作用域，只影响这一个弹窗：铺满视口 + 一律不折行，超出则横向滚动。 */
.modal.supplier-detail-modal .modal-header { flex-wrap: nowrap; gap: 18px; align-items: center; }
.modal.supplier-detail-modal .modal-header h2 { flex: 0 0 auto; margin: 0; font-size: 18px; white-space: nowrap; }
.modal.supplier-detail-modal .modal-header .detail-meta { flex: 1 1 auto; min-width: 0; flex-wrap: nowrap; overflow-x: auto; gap: 16px; }
.modal.supplier-detail-modal .modal-header .detail-meta span { flex: 0 0 auto; white-space: nowrap; }
.modal.supplier-detail-modal .modal-header .modal-close { flex: 0 0 auto; }
.modal.supplier-detail-modal .modal-tabs { flex-wrap: nowrap; overflow-x: auto; }
.modal.supplier-detail-modal .modal-tab { flex: 0 0 auto; white-space: nowrap; }
.modal.supplier-detail-modal #supp-tab-content { flex: 1 1 auto; min-height: 0; overflow: auto; padding: 16px 20px 20px; }
.modal.supplier-detail-modal #supp-tab-content .table { width: max-content; min-width: 100%; }
.modal.supplier-detail-modal #supp-tab-content .table th,
.modal.supplier-detail-modal #supp-tab-content .table td { white-space: nowrap; }
.modal-header { padding: 16px 20px; border-bottom: 1px solid var(--gray-200); display: flex; justify-content: space-between; align-items: center; }
.modal-header h3 { font-size: 15px; color: var(--gray-800); }
.modal-close { background: transparent; border: none; font-size: 20px; cursor: pointer; color: var(--gray-400); padding: 0; width: 28px; height: 28px; }
.modal-close:hover { color: var(--gray-700); }
.modal-body { padding: 20px; overflow-y: auto; flex: 1; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--gray-200); display: flex; justify-content: flex-end; gap: 8px; }
/* 新建 / 编辑应付：宽版表单、深色上传卡片与大文件行（2026-11-10 buck） */
.payable-basic-grid { align-items: start; }
.payable-prepay-card { background: #dbeafe; border: 1px solid #60a5fa; border-radius: 10px; padding: 14px; }
.payable-flag-large { display: flex; align-items: center; gap: 12px; margin: 8px 0 14px; padding: 16px 18px; border: 2px solid #334155; border-radius: 10px; background: #ffffff; color: #0f172a; font-size: 24px; font-weight: 800; line-height: 1.35; cursor: pointer; }
.modal-body .payable-flag-large input[type=checkbox] { width: 26px; height: 26px; min-width: 26px; min-height: 26px; margin: 0; }
.payable-upload-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; align-items: start; }
.payable-upload-card { border-radius: 12px; padding: 16px; border: 2px solid; min-width: 0; }
/* 2026-11-11 buck：红底红字 / 蓝底蓝字对比太弱，标题不够跳。
   统一改近墨黑并加大 4 个号（18px → 22px），靠深色 + 白色细描边在色底上凸显，不新增高饱和色块。 */
.payable-upload-card h4 { margin: 0 0 10px; font-size: 22px; font-weight: 900; letter-spacing: .02em; color: #0f172a; text-shadow: 0 1px 0 rgba(255,255,255,.55); }
.payable-invoice-card { background: #fca5a5; border-color: #dc2626; }
.payable-invoice-card h4 { color: #0f172a; }
.payable-docs-card { background: #93c5fd; border-color: #2563eb; }
.payable-docs-card h4 { color: #0f172a; }
.payable-upload-desc { color: #334155; font-size: 13px; line-height: 1.65; margin-bottom: 12px; }
.payable-upload-card .dropzone { min-height: 104px; display: flex; align-items: center; justify-content: center; background: rgba(255,255,255,.92); border-width: 2px; }
.payable-upload-card .dz-text { font-size: 14px; line-height: 1.7; color: #1f2937; }
.payable-upload-card .dz-text span { display: inline-block; margin-top: 4px; color: #64748b; font-size: 12px; }
.payable-doc-block + .payable-doc-block { margin-top: 16px; padding-top: 14px; border-top: 1px solid #93c5fd; }
.payable-doc-block > label { display: block; margin-bottom: 6px; color: #1e40af; font-size: 14px; font-weight: 700; }
.payable-file-list { margin-top: 10px; display: grid; gap: 8px; }
.payable-file-row { display: flex; align-items: center; gap: 10px; padding: 10px 12px; background: #fff; border: 1px solid #94a3b8; border-radius: 9px; min-height: 62px; box-shadow: 0 1px 2px rgba(15,23,42,.05); }
.payable-file-row.is-pending { border-left: 5px solid #f59e0b; }
.payable-file-row.is-existing { border-left: 5px solid #16a34a; }
.payable-file-type { flex: none; min-width: 46px; padding: 5px 6px; border-radius: 5px; background: #1e293b; color: #fff; text-align: center; font-size: 11px; font-weight: 800; }
.payable-file-main { flex: 1; min-width: 0; }
.payable-file-name { display: block; color: #0f172a; font-size: 14px; font-weight: 700; line-height: 1.45; word-break: break-all; }
a.payable-file-name { color: #1d4ed8; cursor: pointer; }
.payable-file-meta { margin-top: 3px; color: #64748b; font-size: 12px; }
.payable-file-ai { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 4px; }
.payable-file-state { flex: none; color: #15803d; font-size: 12px; font-weight: 700; }
.payable-file-remove { flex: none; }
#att-dropzone.att-dropzone-large { min-height: 280px; padding: 28px !important; display: flex; flex-direction: column; justify-content: center; }
.att-drop-hint { margin-top: 16px; padding: 18px; border: 2px dashed #2563eb; border-radius: 12px; background: #eff6ff; color: #1d4ed8; text-align: center; font-size: 20px; font-weight: 800; line-height: 1.5; }
.att-drop-hint span { display: inline-block; margin-top: 6px; color: #475569; font-size: 13px; font-weight: 500; }
/* ===== staged 模式（应付补票）：可点击 + 拖曳的蓝色大框 ===== */
.att-stage-drop { margin-top: 6px; min-height: 130px; border: 2px dashed #2563eb; border-radius: 12px; background: #eff6ff; color: #1d4ed8; display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; padding: 20px; font-size: 18px; font-weight: 800; line-height: 1.5; transition: background .12s, border-color .12s; }
.att-stage-drop:hover { background: #dbeafe; }
.att-stage-text { user-select: none; }
.att-staged-list { margin-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.att-staged-title { font-weight: 700; color: #334155; font-size: 13px; }
.att-staged-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: #fff; border: 1px solid #e2e8f0; border-radius: 8px; padding: 8px 10px; }
.att-staged-name { font-weight: 700; color: #0f172a; font-size: 14px; word-break: break-all; }
.att-staged-meta { color: #64748b; font-size: 12px; margin-top: 2px; }
.att-staged-ai { margin-top: 4px; }
.att-staged-warn { color: #b91c1c; font-size: 12px; font-weight: 700; margin-top: 4px; }
/* 文件分类：staged 模式下放大 2 倍并换醒目颜色 */
.att-cat-xl label, .att-cat-xl select { font-size: 26px !important; font-weight: 800; color: #b45309 !important; }
.att-cat-xl select { padding: 8px 12px; border-color: #f59e0b; }

/* 附件管理：悬停在文件上直接出大预览（2026-11-13 buck）——加放大镜光标 + 虚下划线，让人知道「可以悬停看」。 */
.att-hover-preview { text-decoration: underline dotted; cursor: zoom-in; }
.att-hover-preview:hover { color: #1d4ed8; }
.att-staged-hover { cursor: zoom-in; transition: background .12s, border-color .12s; }
.att-staged-hover:hover { background: #eff6ff; border-color: #93c5fd; }
@media (max-width: 1100px) {
  .payable-upload-grid { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .payable-basic-grid { grid-template-columns: 1fr; }
  .payable-upload-card { padding: 12px; }
  .payable-flag-large { padding: 13px 14px; font-size: 20px; }
  .payable-upload-card h4 { font-size: 20px; }
  .payable-file-row { align-items: flex-start; }
  .payable-file-remove { padding: 6px 8px; }
  #att-dropzone.att-dropzone-large { min-height: 240px; padding: 16px !important; }
}
.modal-content { background: var(--surface); border-radius: 12px; width: 600px; max-width: 100%; max-height: 90vh; display: flex; flex-direction: column; box-shadow: var(--shadow-lg); }
.modal-content.modal-lg { width: 900px; }
.modal-content.modal-xl { width: 1500px; max-width: 96vw; }
.modal-content .modal-header { padding: 20px 24px; border-bottom: 1px solid var(--gray-200); }
.modal-content .modal-header h2 { font-size: 18px; color: var(--gray-800); margin-bottom: 8px; }
.modal-content .modal-header .detail-meta { display: flex; gap: 16px; font-size: 13px; color: var(--gray-500); flex-wrap: wrap; }
.modal-tabs { display: flex; gap: 4px; padding: 0 20px; border-bottom: 1px solid var(--gray-200); background: var(--gray-50); }
.modal-tab { padding: 10px 16px; cursor: pointer; color: var(--gray-500); border-bottom: 2px solid transparent; font-size: 13px; transition: all 0.15s; }
.modal-tab:hover { color: var(--gray-800); background: var(--surface); }
.modal-tab.active { color: var(--primary); border-bottom-color: var(--primary); background: var(--surface); font-weight: 500; }
#client-tab-content, #supp-tab-content { padding: 20px; overflow-y: auto; flex: 1; }
.link-primary { color: var(--primary); }
.link-primary:hover { text-decoration: underline; }
.text-sm { font-size: 12px; }

/* ========== 可搜索下拉组件（供应商等超长列表实时筛选） ========== */
.sselect { position: relative; }
.sselect-input { width: 100%; }
.sselect-pop {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 1200;
  margin-top: 4px; background: var(--surface, #fff);
  border: 1px solid var(--gray-200, #e5e7eb); border-radius: var(--radius, 8px);
  box-shadow: var(--shadow-lg, 0 10px 25px rgba(0,0,0,.12));
  max-height: 260px; overflow-y: auto; padding: 4px;
}
.sselect-opt {
  padding: 8px 10px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--gray-800, #1f2937);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sselect-opt:hover { background: var(--primary-light, #f5f3ff); }
.sselect-opt.active { background: var(--primary-light, #f5f3ff); color: var(--primary, #7C3AED); }
.sselect-empty { padding: 10px; color: var(--gray-400, #9ca3af); font-size: 13px; text-align: center; }

/* ========== 项目详情 ========== */
.project-detail .detail-header { background: var(--surface); padding: 20px; border-radius: var(--radius); margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.detail-header h2 { margin-bottom: 8px; color: var(--gray-800); }
.detail-meta { display: flex; gap: 18px; font-size: 13px; color: var(--gray-500); flex-wrap: wrap; }
.detail-meta span { display: flex; align-items: center; gap: 4px; }
.detail-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--gray-200); margin-bottom: 16px; }
.detail-tab { padding: 8px 16px; cursor: pointer; color: var(--gray-500); border-bottom: 2px solid transparent; font-size: 13px; }
.detail-tab:hover { color: var(--gray-800); }
.detail-tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
/* 项目详情操作标签：字号与间距收紧，避免"客户 / 应收 / ..."显得过大 */
#proj-tabs .pd-op { padding: 9px 14px; }
#proj-tabs .pd-op-name { font-size: 13px; }
#proj-tabs .pd-op-sub { font-size: 11px; }

/* ---------- 项目详情（整页模式） ---------- */
.pd-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--gray-200); border-radius: 14px; padding: 18px 22px; margin-bottom: 16px; box-shadow: var(--shadow-sm); }
.pd-head-main { min-width: 0; flex: 1; }
.pd-back { margin-bottom: 10px; }
.pd-title { font-size: 24px; font-weight: 700; color: var(--gray-800); margin: 0 0 10px; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; line-height: 1.3; }
.pd-title .tag { font-size: 13px; font-weight: 600; }
.pd-submeta { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--gray-500); align-items: center; }
.pd-submeta b { color: var(--gray-800); font-weight: 600; }
.pd-desc { margin-top: 10px; font-size: 13px; color: var(--gray-500); line-height: 1.7; }
.pd-actions { display: flex; flex-wrap: wrap; gap: 7px; align-items: flex-start; justify-content: flex-end; max-width: none; }
/* 2026-09-27 buck：右上角这几个按钮（转派项目经理 / 管理成员 / 编辑项目 / 导出结项资料 / 项目结算）
   字号缩小、尽量排成一行。以前 max-width:440px + 14px 字号会把它们挤成两三行。 */
.pd-actions .btn { padding: 6px 11px; font-size: 12.5px; line-height: 1.25; white-space: nowrap; }
.pd-act-tip { flex-basis: 100%; font-size: 12px; color: var(--gray-500); text-align: right; line-height: 1.5; }

/* 财务概览（放大版） */
.pd-fin { grid-template-columns: repeat(auto-fit, minmax(132px, 1fr)); gap: 12px; padding: 14px; background: #fff; border: 1px solid var(--gray-200); }
.pd-fin > div { padding: 10px 12px; background: var(--gray-50); border-radius: 10px; }
.pd-fin .label { font-size: 12px; }
.pd-fin .value { font-size: 21px; margin-top: 6px; }

/* 主操作区：客户 / 应收 / 应付 / 报销 / 上会 … 大卡片 */
.pd-ops { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin: 18px 0 14px; }
.pd-ops .pd-op { display: flex; align-items: center; gap: 12px; padding: 15px 16px; border: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); border-radius: 12px; background: #fff; cursor: pointer; transition: transform .15s, box-shadow .15s, border-color .15s; box-shadow: var(--shadow-sm); }
.pd-ops .pd-op:hover { border-color: var(--op-accent); transform: translateY(-2px); box-shadow: 0 6px 16px rgba(15, 23, 42, .10); }
.pd-ops .pd-op.active { border: 2px solid var(--op-accent); border-bottom: 2px solid var(--op-accent); padding: 14px 15px; background: #fbfcfe; }
.pd-op-txt { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.pd-op-name { font-size: 15px; font-weight: 600; color: var(--gray-800); display: flex; align-items: center; gap: 7px; }
.pd-op-n { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px; background: var(--op-accent); color: #fff; font-size: 12px; font-style: normal; font-weight: 700; text-align: center; }
.pd-op-sub { font-size: 12px; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-op.active .pd-op-name { color: var(--op-accent); }
.pd-panel { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; padding: 18px; box-shadow: var(--shadow-sm); }

@media (max-width: 900px) {
  .pd-head { flex-direction: column; }
  .pd-actions { max-width: none; justify-content: flex-start; }
  .pd-title { font-size: 20px; }
  .pd-ops { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .pd-op-name { font-size: 14px; }
  #proj-tabs .pd-op-name { font-size: 12px; }
}

/* ⚠ 最小列宽 150 → 128px（2026-09-24）：项目金额卡片从 8 格变成 9 格（新增「上会费」）后，
   150px × 9 + 间隙超过了 1440 内容宽 ⇒ 「毛利」被挤到第二行单独一个，最重要的数字反而不显眼。
   128px 能一屏放下 9 格，窄屏时 auto-fit 照旧自动换行。 */
.finance-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(128px, 1fr)); gap: 12px; padding: 12px; background: var(--gray-50); border-radius: var(--radius); margin-bottom: 16px; }
.finance-summary > div { padding: 4px; }
.finance-summary .label { font-size: 11px; color: var(--gray-500); }
.finance-summary .value { font-size: 16px; font-weight: 600; margin-top: 4px; }
.finance-summary .value.positive { color: var(--success); }
.finance-summary .value.negative { color: var(--danger); }

/* ========== Toast ========== */
#toast-root { position: fixed; top: 20px; right: 20px; z-index: 9999; display: flex; flex-direction: column; gap: 8px; }
.toast { padding: 10px 16px; border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow-lg); font-size: 13px; min-width: 200px; animation: slideIn 0.2s ease-out; }
.toast.success { border-left: 3px solid var(--success); }
.toast.error { border-left: 3px solid var(--danger); }
.toast.info { border-left: 3px solid var(--primary); }
@keyframes slideIn { from { transform: translateX(100%); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

/* ========== 空状态 ========== */
.empty { text-align: center; padding: 40px; color: var(--gray-400); }

/* ========== Misc ========== */
.text-right { text-align: right; }
.text-success { color: var(--success); }
.text-danger { color: var(--danger); }
.text-warning { color: var(--warning); }
.text-muted { color: var(--gray-500); }
.text-bold { font-weight: 600; }
.text-mono { font-family: var(--font-sans); font-variant-numeric: tabular-nums; letter-spacing: .2px; }
.mt-2 { margin-top: 8px; } .mt-4 { margin-top: 16px; } .mb-2 { margin-bottom: 8px; } .mb-4 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-2 { gap: 8px; }
.gap-4 { gap: 16px; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }

/* ========== 审批历史时间线 ========== */
.timeline {
  position: relative;
  padding: 8px 0 8px 20px;
}
.timeline::before {
  content: '';
  position: absolute;
  left: 13px;
  top: 16px;
  bottom: 16px;
  width: 2px;
  background: var(--gray-200);
}
.timeline-item {
  position: relative;
  padding: 10px 12px 14px 28px;
  margin-bottom: 4px;
}
.timeline-item .dot {
  position: absolute;
  left: -20px;
  top: 12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 13px;
  box-shadow: 0 0 0 3px white;
  z-index: 1;
}
.timeline-item .content-body {
  background: var(--gray-50);
  padding: 10px 14px;
  border-radius: 8px;
  border: 1px solid var(--gray-200);
}
.timeline-item .reason {
  margin-top: 6px;
}

/* ========== 记事本（便利贴） ========== */
.note-search { padding: 7px 10px; border: 1px solid var(--gray-200); border-radius: 6px; font-size: 13px; min-width: 220px; }
.notes-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; align-items: start; }
.note-card {
  position: relative; border: 1px solid #f2e27a; border-radius: 4px; padding: 14px 14px 10px;
  min-height: 150px; display: flex; flex-direction: column; gap: 8px;
  box-shadow: 0 2px 6px rgba(15, 12, 40, .08); transition: transform .12s, box-shadow .12s;
}
.note-card:hover { transform: translateY(-2px); box-shadow: 0 6px 14px rgba(15, 12, 40, .14); }
.note-pin { position: absolute; top: -1px; right: 10px; font-size: 10px; background: #7c6bd6; color: #fff; padding: 1px 7px; border-radius: 0 0 4px 4px; }
.note-title { font-weight: 700; font-size: 14px; color: #3b3557; word-break: break-word; padding-right: 34px; }
/* 归属项目徽标：点一下只看该项目的便利贴 */
.note-proj {
  align-self: flex-start; max-width: 100%; font-size: 11px; line-height: 1.6;
  padding: 1px 8px; border-radius: 10px; cursor: pointer;
  background: rgba(255, 255, 255, .72); border: 1px solid rgba(0, 0, 0, .1); color: #4338ca;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.note-proj:hover { background: #fff; border-color: #6366f1; }
/* 记事本页的「归属项目」筛选下拉 */
.note-proj-filter { padding: 7px 10px; border: 1px solid var(--gray-200); border-radius: 6px; font-size: 13px; background: #fff; max-width: 260px; }
.note-body { font-size: 13px; line-height: 1.7; color: #4a4460; white-space: pre-wrap; word-break: break-word; flex: 1; }
.note-imgs { display: flex; flex-wrap: wrap; gap: 6px; }
.note-img-wrap, .note-img-more {
  width: 56px; height: 56px; border-radius: 6px; overflow: hidden; cursor: pointer;
  border: 1px solid rgba(0, 0, 0, .08); background: rgba(255, 255, 255, .55);
  display: flex; align-items: center; justify-content: center; font-size: 12px; color: var(--gray-600);
}
.note-img-wrap img { width: 100%; height: 100%; object-fit: cover; }
.note-file { font-size: 10px; padding: 2px; text-align: center; word-break: break-all; line-height: 1.3; }
.note-foot { display: flex; align-items: center; justify-content: space-between; gap: 6px; border-top: 1px dashed rgba(0, 0, 0, .1); padding-top: 6px; margin-top: 2px; }
.note-acts { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.note-acts .btn { padding: 2px 8px; font-size: 11px; }
.note-colors { display: flex; gap: 8px; }
.note-color { width: 26px; height: 26px; border-radius: 50%; border: 2px solid #ccc; cursor: pointer; }
.note-color.active { box-shadow: 0 0 0 2px #fff inset; }
.note-editor-imgs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.note-editor-img { width: 92px; text-align: center; }
.note-editor-img img { width: 92px; height: 72px; object-fit: cover; border-radius: 6px; border: 1px solid var(--gray-200); display: block; }
.note-editor-img .btn { margin-top: 4px; padding: 1px 8px; font-size: 11px; }
.note-save-status { font-size: 12px; color: #16a34a; margin-right: auto; align-self: center; }

/* 便利贴图片画布（内嵌图片，可拖曳） */
.note-board { position: relative; min-height: 220px; border: 1px dashed #c9c9d6; border-radius: 8px; background: rgba(255,255,255,.45); padding: 8px; overflow: auto; }
.note-board-hint { color: #8a8699; font-size: 12px; line-height: 1.7; padding: 6px; }
.note-board-img { position: absolute; cursor: grab; user-select: none; }
.note-board-img img { width: 100%; display: block; border-radius: 6px; border: 1px solid rgba(0,0,0,.1); pointer-events: none; -webkit-user-drag: none; }
.note-board-img .note-board-del { position: absolute; top: -8px; right: -8px; width: 20px; height: 20px; border-radius: 50%; border: 0; background: #e2554b; color: #fff; font-size: 13px; line-height: 18px; cursor: pointer; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.note-board-actions { margin-top: 8px; }

/* ========== 项目日历 ========== */
.cal-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; flex-wrap: wrap; gap: 8px; }
.cal-title { font-size: 18px; font-weight: 600; color: var(--gray-800); }
.cal-nav { display: flex; gap: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-week { text-align: center; font-size: 12px; color: var(--gray-500); padding: 4px 0; font-weight: 500; }
.cal-cell { position: relative; min-height: 120px; background: white; border: 1px solid #e2e6ec; border-radius: 6px; padding: 5px 6px; overflow: hidden; }
/* 上会档期：内嵌虚线框（第二层再往里一圈），与「项目色块」走完全不同的视觉通道 */
.cal-cell.cal-trip-day::after, .cal-cell.cal-trip-day::before {
  content: ''; position: absolute; pointer-events: none; z-index: 4; border-radius: 5px;
}
.cal-cell.cal-trip-day::after { inset: 3px; border: 2px dashed var(--tc, #4166cc); }
.cal-cell.cal-trip-day::before { inset: 7px; border: 2px dashed var(--tc2, transparent); }
/* 上会日：项目色块略内缩，读感是「虚线框套在色块外面」 */
.cal-cell.cal-trip-day .cal-ev { margin-left: 3px; margin-right: 3px; }
.cal-cell.cal-trip-day:not(.cal-tp2-start):not(.cal-tp2-mid):not(.cal-tp2-end)::before { display: none; }
.cal-trip-tag { font-size: 11px; line-height: 1.35; margin-top: 2px; font-weight: 600; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; position: relative; z-index: 5; }
.cal-trip-tag:hover { text-decoration: underline; }
.cal-cell.cal-other { opacity: 0.45; background: #fafafa; }
.cal-cell.cal-weekend { background: #f5f4ef; }
.cal-cell.cal-weekend.cal-conflict { background: #fff6f5; }
.cal-cell.cal-today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); }
.cal-cell.cal-conflict { border-color: #e8938f; background: #fff6f5; }
.cal-daynum { font-size: 12px; color: var(--gray-600); margin-bottom: 3px; display: flex; align-items: center; gap: 4px; }
.cal-today .cal-daynum { color: var(--primary); font-weight: 700; }
.cal-badge { font-size: 10px; line-height: 1; padding: 2px 4px; border-radius: 8px; background: #e8938f; color: #fff; font-weight: 600; }
.cal-ev { font-size: 11px; line-height: 1.4; padding: 1px 5px; border-radius: 4px; margin-bottom: 2px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #4a4460; }
.cal-ev:hover { filter: brightness(0.94); }
.cal-trip { font-size: 11px; line-height: 1.4; padding: 1px 5px; border-radius: 4px; margin-bottom: 2px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: #1e5a8a; background: #eaf4fd; border: 1px dashed #7db8e0; }
.cal-trip:hover { filter: brightness(0.95); }
.cal-seg { display: flex; gap: 0; margin-right: 8px; }
.cal-seg .btn { border-radius: 0; }
.cal-seg .btn:first-child { border-radius: var(--radius) 0 0 var(--radius); }
.cal-seg .btn:last-child { border-radius: 0 var(--radius) var(--radius) 0; }
.cal-foot { margin-top: 12px; font-size: 12px; color: var(--gray-500); line-height: 1.8; }

/* ---------- 上会天数 · 津贴结算（项目日历页底部，仅 3 位业务主管可见） ---------- */
.ts-card { margin-top: 16px; }
.ts-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.ts-title { font-size: 15px; color: var(--gray-800); margin-right: 4px; }
.ts-year { background: #ede9fe; color: #5b21b6; }
.ts-sub { font-size: 12px; color: var(--gray-500); margin-left: 8px; line-height: 1.7; }
.ts-wrap { overflow-x: auto; }
.ts-table { margin: 0; }
.ts-table th, .ts-table td { white-space: nowrap; }
.ts-table tfoot td { background: #f6f8fb; border-top: 2px solid var(--primary); font-weight: 600; }
.ts-num { font-variant-numeric: tabular-nums; }
.ts-zero { color: var(--gray-300); }
.ts-total { color: var(--gray-900); }
.ts-money { font-variant-numeric: tabular-nums; color: #b45309; font-weight: 600; }
.ts-row { cursor: pointer; }
.ts-row:hover td { background: #f5f3ff; }
.ts-caret { color: var(--gray-400); text-align: center; font-size: 12px; }
.ts-detail-row td { background: #fafbfd; padding: 0 !important; }
.ts-detail { padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.ts-detail-item { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--gray-600); }
.ts-detail-d { flex: none; width: 172px; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.ts-detail-days { flex: none; width: 46px; font-weight: 600; color: var(--gray-800); }
.ts-detail-proj { color: var(--primary); cursor: pointer; }
.ts-detail-proj:hover { text-decoration: underline; }
.ts-detail-dest { color: var(--gray-400); }
.ts-pend { margin-top: 10px; padding: 8px 12px; border: 1px solid #fde68a; background: #fffbeb;
  border-radius: 8px; font-size: 12px; color: #92400e; }
.ts-foot { margin-top: 8px; font-size: 12px; color: var(--gray-500); line-height: 1.8; }

/* ---------- 上会天数 · 柱状图（2026-09-27 buck）：每人一根柱子，Q1~Q4 / 全年切换 ---------- */
.ts-chart { border: 1px solid var(--gray-200); border-radius: 10px; overflow: hidden; margin-bottom: 12px; background: #fff; }
.ts-chart-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 8px 12px; background: #f8fafc; border-bottom: 1px solid var(--gray-200); }
.ts-chart-title { font-size: 14px; color: var(--gray-800); }
.ts-chart-sub { font-size: 12px; color: var(--gray-500); }
.ts-chart-bars { display: flex; align-items: flex-end; justify-content: center; gap: 8px;
  padding: 18px 14px 12px; min-height: 200px; overflow-x: auto; }
.ts-bar-col { flex: 0 1 78px; min-width: 44px; display: flex; flex-direction: column;
  align-items: center; justify-content: flex-end; gap: 4px; }
.ts-bar-val { font-size: 12px; font-weight: 700; color: var(--gray-800); font-variant-numeric: tabular-nums; }
.ts-bar { width: 56%; max-width: 52px; min-height: 2px; border-radius: 6px 6px 0 0;
  background: linear-gradient(180deg, #a78bfa, var(--primary)); transition: height .25s ease; }
.ts-bar.zero { background: var(--gray-200); }
.ts-bar-name { font-size: 12px; color: var(--gray-600); white-space: nowrap; }
.ts-bar-col.me .ts-bar-name { color: var(--primary-dark); font-weight: 700; }
.ts-bar-col.me .ts-bar { background: linear-gradient(180deg, #7c3aed, var(--primary-dark)); }

/* ---------- 柱状图 · 第一名荣誉 / 最后名鞭策（2026-11-16 buck）----------
   纯图形：皇冠、金柱、柔光、星点 / 暗红斜纹、向下标记、虚线框。
   ⛔ 不加任何文字、不改人名与天数样式；每人都有同高的装饰层 ⇒ 柱子底部对齐不跑偏。 */
.ts-bar-col { position: relative; }
.ts-bar-deco { flex: 0 0 20px; width: 100%; height: 20px;
  display: flex; align-items: center; justify-content: center; position: relative; }
.ts-bar { position: relative; }

/* 第一名：皇冠（clip-path 三尖）+ 金色柱 + 顶部高光 + 星点 */
.ts-bar-col.champ .ts-bar-deco::before {
  content: ''; width: 26px; height: 15px;
  background: linear-gradient(180deg, #ffe7a0, #dfa12c);
  clip-path: polygon(0 100%, 0 22%, 23% 52%, 50% 0, 77% 52%, 100% 22%, 100% 100%);
  filter: drop-shadow(0 2px 2px rgba(176,116,12,.4));
}
.ts-bar-col.champ .ts-bar-deco::after {
  content: ''; position: absolute; left: 50%; top: 2px; width: 3px; height: 3px;
  margin-left: -1.5px; border-radius: 50%; background: #efb53c;
  box-shadow: -18px 6px 0 -0.5px #efb53c, 18px 5px 0 -0.5px #efb53c,
              -13px -3px 0 -1px #efb53c, 13px -4px 0 -1px #efb53c;
}
.ts-bar-col.champ .ts-bar,
.ts-bar-col.me.champ .ts-bar {
  background: linear-gradient(180deg, #ffe9a8 0%, #f2bd47 42%, #d59418 100%);
  box-shadow: 0 0 0 1px rgba(184,124,16,.38), 0 6px 16px rgba(214,158,32,.3);
}
.ts-bar-col.champ .ts-bar::after,
.ts-bar-col.me.champ .ts-bar::after {
  content: ''; position: absolute; left: 0; right: 0; top: 0; height: 4px;
  background: rgba(255,255,255,.6); border-radius: 6px 6px 0 0;
}

/* 最后名：暗红斜纹柱 + 向下警示三角 + 淡红虚线框（不刺眼，但一眼看得出） */
.ts-bar-col.last .ts-bar-deco::before {
  content: ''; width: 18px; height: 13px;
  background: linear-gradient(180deg, #d97563, #b84633);
  clip-path: polygon(0 0, 100% 0, 50% 100%);
  filter: drop-shadow(0 2px 2px rgba(150,50,35,.28));
}
.ts-bar-col.last .ts-bar,
.ts-bar-col.me.last .ts-bar {
  background: repeating-linear-gradient(135deg, #cf6a58 0 6px, #b34a37 6px 12px);
  box-shadow: inset 0 0 0 1px rgba(140,45,30,.3), 0 4px 12px rgba(179,74,55,.18);
}
.ts-bar-col.last::after {
  content: ''; position: absolute; left: -3px; right: -3px; top: 20px; bottom: 0;
  border: 1px dashed rgba(183,72,53,.4); border-radius: 8px; pointer-events: none;
}

/* ---------- 打款页 · 员工报销「按人分组」卡（2026-09-23 改版） ---------- */
/* 一人一张卡：人是**付款对象**，也是一笔转账的粒度（公司按人一次性打款）。 */
.rr-group { border: 1px solid var(--gray-200); border-radius: 10px; overflow: hidden; margin-bottom: 12px; background: #fff; }
.rr-group:last-child { margin-bottom: 0; }
.rr-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; background: #f6fdf9; border-bottom: 1px solid #d1fae5; }
.rr-name { font-size: 15px; color: #065f46; }
.rr-count { font-size: 12px; color: var(--gray-500); }
.rr-total { font-size: 12px; color: var(--gray-600); }
.rr-total b { font-size: 15px; color: #b45309; font-variant-numeric: tabular-nums; }
.rr-wrap { overflow-x: auto; }
.rr-table { margin: 0; border: 0; }
.rr-table th, .rr-table td { white-space: nowrap; }
.rr-table tbody tr:last-child td { border-bottom: 0; }
.rr-amt { font-weight: 700; color: var(--gray-900); font-variant-numeric: tabular-nums; }
.rr-items { margin-left: 8px; font-size: 11px; color: var(--gray-400); }
/* 员工报销 · 按人分块样式 B（2026-09-26 buck 选定）：清晰边框 + **中性色卡头** + 姓名首字圆标。
   ⚠ 只作用于【打款 → 员工报销】的 `.rr-group[data-reim-user]`；不动上会费的 `.tf-person`。 */
.rr-group[data-reim-user] { border: 2px solid var(--gray-400); box-shadow: 0 2px 6px rgba(15,23,42,.08); }
.rr-group[data-reim-user] + .rr-group[data-reim-user] { margin-top: 24px; }
.rr-group[data-reim-user] > .rr-head { background: #eef2f7; border-bottom: 1px solid var(--gray-300); padding: 10px 14px; }
.rr-group[data-reim-user] > .rr-head .rr-name { font-size: 16px; }
.rr-group[data-reim-user] > .rr-wrap { padding: 8px 12px 12px; }
/* 卡内表：去掉全局 .table 的紫色重框，改轻量分隔线，块内不再和外框打架 */
.rr-group[data-reim-user] .rr-table { border: 0; border-collapse: separate; border-spacing: 0; }
.rr-group[data-reim-user] .rr-table thead th { background: #f8fafc; border: 0; border-bottom: 1px solid var(--gray-300);
  padding: 8px 10px; font-weight: 600; color: var(--gray-600); }
.rr-group[data-reim-user] .rr-table tbody td { border: 0; border-bottom: 1px solid var(--gray-100); padding: 9px 10px; }
.rr-group[data-reim-user] .rr-table tbody tr:last-child td { border-bottom: 0; }
/* 包裹行「整行可点」（2026-09-27 buck）：点行任意位置即打开这个包裹的报销明细 ——
   原来只有行尾那枚「详情」可点，鼠标得一路挪到最右边，操作上不便利。 */
.rr-group[data-reim-user] .rr-table tbody tr.rr-row { cursor: pointer; }
.rr-group[data-reim-user] .rr-table tbody tr.rr-row:hover > td { background: #eef2f7; }
.rr-group[data-reim-user] .rr-table tbody tr.rr-row:hover > td:first-child { box-shadow: inset 3px 0 0 var(--primary); }
/* 「一键标记」弹窗：先把这笔转账到底包含哪几张单列清楚 */
.rr-batch-list { border: 1px solid var(--gray-200); border-radius: 8px; overflow: hidden; margin-bottom: 12px; max-height: 240px; overflow-y: auto; }
.rr-batch-item { display: flex; align-items: center; gap: 10px; padding: 7px 12px; font-size: 12px; }
.rr-batch-item + .rr-batch-item { border-top: 1px solid var(--gray-100); }
.rr-batch-amt { flex: none; width: 92px; text-align: right; font-weight: 700; color: var(--gray-900); font-variant-numeric: tabular-nums; }
.rr-batch-proj { flex: 1; min-width: 0; color: var(--gray-600); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- 项目管理页：「我负责 / 我参与」身份色块（2026-09-23，糖果色改版） ---------- */
/* 项目一多，列表里要能一眼扫出自己的项目：项目名前一个色块 + 整行左侧同色色条。
   ⚠ 改版原因（用户原话）：「我负责 / 我参与 / 其他项目用的都是很接近的紫色调，不舒服」——
   上一版两块是**高饱和平涂**（正紫 + 天蓝），而项目名链接本身又是紫色、行悬停还是淡紫，
   整页都在紫区里打转。现在统一成**糖果色：浅底 + 深字**（低饱和、色相彼此拉开），
   并把**项目名链接改回中性深灰**（悬停才变紫）⇒「我负责（暖橙）/ 我参与（冷绿）/ 其他（无色）」
   三类一眼可分，整页也不再发紫。
   ⚠ 色条仍只用 box-shadow 画，不碰 rowStyle 的 background（待审批黄底 / 已驳回红底要留着）。 */
.pj-chip { display: inline-block; padding: 1px 7px; border-radius: 999px; font-size: 11px; font-weight: 600;
  margin-right: 6px; vertical-align: 1px; white-space: nowrap; }
.pj-chip-pm { background: #FFE8D6; color: #C2410C; }        /* 糖果蜜桃 · 暖 */
.pj-chip-member { background: #D9F5E6; color: #047857; }    /* 糖果薄荷 · 冷 */
.pj-name { color: var(--gray-800); cursor: pointer; text-decoration: none; }
.pj-name:hover { color: var(--primary); text-decoration: underline; }
.pj-legend { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 10px;
  font-size: 12px; color: var(--gray-500); }
.pj-legend b { color: var(--gray-800); }
.pj-sep { color: var(--gray-300); }
/* ---------- 项目列表 · 置顶星标（2026-09-24） ---------- */
/* 用户原话：「让所有用户都可以设置某个项目置顶…因为大家使用习惯不一样」
   ⇒ 置顶是**各人自己的**偏好（服务端按 user_id 存），只影响本人看到的顺序。
   设计：不新增列（加列会牵动表头/单元格对齐），星标就贴在项目名前。
   已置顶 = 实心金色 ★（醒目、一眼看出哪些是自己特意排前面的）；
   未置顶 = 空心 ☆ 且**压到很低对比度**（列表里几十行，不能每行都跳出来抢注意力），悬停才亮。 */
.pj-pin { background: none; border: 0; padding: 0 3px 0 0; cursor: pointer; font-size: 15px; line-height: 1;
  color: var(--gray-300); vertical-align: -1px; transition: color .12s, transform .12s; }
.pj-pin:hover { color: #F59E0B; transform: scale(1.15); }
.pj-pin.is-on { color: #F59E0B; }              /* 已置顶：糖果琥珀 */
.pj-pin.is-on:hover { color: #B45309; }
.pj-pin-demo { cursor: default; font-size: 13px; padding: 0; }
.pj-pin-demo:hover { transform: none; color: #F59E0B; }
.pj-pin-hint { color: var(--gray-400); }

/* ---------- 项目列表「表头排序」（2026-10-09 buck） ---------- */
/* 起始日期 / 结束日期 / 合同 / 已收 / 毛利 五列表头可点，升 / 降序切换。
   未排序时显示淡色 ⇅（暗示"可点"），当前排序列高亮 + ▲ / ▼。 */
.pj-sortable { cursor: pointer; user-select: none; white-space: nowrap; }
.pj-sortable:hover { color: var(--primary); }
.pj-sortable.is-on { color: var(--primary); }
.pj-sort-ic { color: var(--gray-300); font-size: 11px; }
.pj-sortable:hover .pj-sort-ic { color: var(--primary); }
.pj-sort-ic.is-on { color: var(--primary); }

/* ---------- 【打款】页 · 四个大标签（2026-09-23） ---------- */
/* 用户原话：「四个一直往下一个个挂，这个页面就太长了……显示四个大标签，点击大标签再进各自板块」。
   供应商应付 / 员工报销 / 上会费 / 行政支出。⚠ 非当前标签的 pane 是 display:none，
   里面的元素仍可被 textContent 读到，但 innerText 会是空串（回归脚本取数前要先切标签）。
   ⚠ 2026-10-10 buck：「7 个标签之间没有隔断 / 颜色区分，混在一起了」⇒ 改成**胶囊标签 + 分组隔断**：
     每个标签自带 1px 边框与圆角（任何换行都不会出现孤立的分隔线），并分三段装在 .payrun-tabgroup 里，
     第 2/3 段的**左边框**就是组间竖线（跟着整组走 ⇒ 换行也不会变孤儿，见 app.js 的注释）。
     颜色克制：只有「已申请支付，尚未放行（卡在审批），先不打款」用琥珀色 —— 那是「不能付」的警示页，
     语义色，一眼能与别的页分开；其余标签统一中性灰，选中态用主题色实心。 */
.payrun-tabs { display: flex; gap: 14px; flex-wrap: wrap; align-items: stretch;
  margin-bottom: 14px; padding: 8px 10px; background: #f8fafc;
  border: 1px solid var(--gray-200); border-radius: 10px; }
.payrun-tabgroup { display: flex; flex-wrap: wrap; gap: 8px; align-items: stretch; }
.payrun-tabgroup-sep { border-left: 1px solid var(--gray-300); padding-left: 14px; }
.payrun-tab { display: inline-flex; align-items: center; gap: 6px; line-height: 1.35;
  padding: 7px 14px; font-size: 13.5px; font-weight: 600; color: var(--gray-600);
  background: #fff; border: 1px solid var(--gray-200); border-radius: 8px;
  cursor: pointer; font-family: inherit; transition: color .12s, background .12s, border-color .12s; }
.payrun-tab:hover { color: var(--primary); background: #f7f7ff; border-color: #c7d2fe; }
.payrun-tab.active { color: #fff; background: var(--primary); border-color: var(--primary);
  box-shadow: 0 1px 3px rgba(124, 58, 237, .28); }
/* ⚠ 警示页：琥珀色（"这些钱还不能付"），与其余中性标签明显区分 */
.payrun-tab[data-ptab="stuck"] { background: #fffbeb; border-color: #fcd34d; color: #92400e; }
.payrun-tab[data-ptab="stuck"]:hover { background: #fef3c7; border-color: #f59e0b; color: #78350f; }
.payrun-tab[data-ptab="stuck"].active { background: #b45309; border-color: #b45309; color: #fff;
  box-shadow: 0 1px 3px rgba(180, 83, 9, .28); }
/* 计数：小胶囊（0 笔时留空 ⇒ :empty 直接不占位） */
.pt-count { font-size: 11.5px; font-weight: 700; color: var(--gray-500);
  background: var(--gray-100, #f1f5f9); border-radius: 999px; padding: 1px 7px; }
.pt-count:empty { display: none; }
.pt-count-warn { color: #b45309; background: #fef3c7; }
.payrun-tab.active .pt-count { color: var(--primary); background: #fff; }
.payrun-tab.active .pt-count-warn { color: #b45309; background: #fff; }

/* ---------- 上会费 / 行政支出板块 ---------- */
.tf-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
/* 结算周期提示：本季度没过完 ⇒ 不出账（2026-10-14 buck）。琥珀=注意，不是错误。 */
.tf-notice { margin-bottom: 10px; padding: 9px 12px; background: #fffbeb; border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b; border-radius: 8px; font-size: 12.5px; line-height: 1.75; color: #92400e; }
.tf-notice b { color: #78350f; }
.tf-title { font-size: 15px; color: var(--gray-800); }
.tf-year { background: #ede9fe; color: #5b21b6; }
.tf-sub { font-size: 12px; color: var(--gray-500); line-height: 1.7; }
.tf-total { padding: 8px 12px; margin-bottom: 10px; background: #f8fafc; border: 1px solid var(--gray-200);
  border-radius: 8px; font-size: 13px; color: var(--gray-600); }
.tf-total b { color: var(--gray-900); }
.tf-unpaid { color: #c2410c !important; }
.tf-badge-wait { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #FFE8D6; color: #C2410C; }
.tf-badge-ok { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #D9F5E6; color: #047857; }
/* 「结算中」= 季度未结束、暂不出账（与 tf-badge-wait 的橙区分：这个是中性琥珀，表示"还不到时候"） */
.tf-badge-hold { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #fef3c7; color: #92400e; }
.tf-tag-hold { font-size: 12px; color: #92400e; }
.tf-hold-txt { color: #92400e; }
.tf-tag-ok { font-size: 12px; color: #047857; }
.tf-qrow { cursor: pointer; }
.tf-qrow:hover td { background: #f7f5fd; }
.tf-qrow-none td { color: var(--gray-400); }
.tf-caret { margin-left: 5px; font-size: 11px; color: var(--gray-400); }
.tf-detail-row td { background: #fafbfd; padding: 0 !important; }
.tf-detail { padding: 8px 12px 10px; display: flex; flex-direction: column; gap: 4px; }
.tf-detail-item { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; font-size: 12px; color: var(--gray-600); }
.tf-detail-d { flex: none; width: 176px; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.tf-detail-days { flex: none; width: 46px; font-weight: 600; color: var(--gray-800); }
.tf-detail-amt { flex: none; width: 84px; text-align: right; font-weight: 600; color: var(--gray-900); font-variant-numeric: tabular-nums; }
.tf-tag-paid { background: #D9F5E6; color: #047857; }
.tf-tag-part { background: #FFE8D6; color: #C2410C; }
/* 剥离前登记的津贴（走报销链路）：中性灰，视觉上明确「不是这里付的钱」 */
.tf-tag-legacy { background: #F1F5F9; color: #475569; }
.tf-badge-legacy { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 999px; background: #F1F5F9; color: #475569; }
/* 上会费 · 按人分块（2026-09-26 用户反馈：「各人底色一样、没有边框、看着乱」）：
   给每人一块边界清晰的卡片 + 一条**中性色**卡头，靠边框与留白分区，不给人上不同颜色（避免花）。 */
.tf-person { border: 2px solid var(--gray-400); border-radius: 10px; overflow: hidden; background: #fff; box-shadow: 0 2px 6px rgba(15,23,42,.08); }
.tf-person + .tf-person { margin-top: 24px; }
.tf-person > .rr-head { background: #eef2f7; border-bottom: 1px solid var(--gray-300); padding: 10px 14px; }
.tf-person > .rr-head .rr-name { font-size: 16px; }
.rr-avatar { flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--gray-300); color: #1e293b;
  font-size: 13px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.tf-person > .rr-wrap { padding: 8px 12px 12px; }
/* 卡内季度表：去掉全局 .table 的紫色重框，改成轻量分隔线，块内不再和外框打架 */
.tf-person .rr-table { border: 0; border-collapse: separate; border-spacing: 0; }
.tf-person .rr-table thead th { background: #f8fafc; border: 0; border-bottom: 1px solid var(--gray-300);
  padding: 8px 10px; font-weight: 600; color: var(--gray-600); }
.tf-person .rr-table tbody td { border: 0; border-bottom: 1px solid var(--gray-100); padding: 9px 10px; }
.tf-person .rr-table tbody tr:last-child td { border-bottom: 0; }
.tf-person .tf-detail-row td { background: #f9fafb; }
.tf-person .tf-detail { background: #fff; border: 1px dashed var(--gray-300); border-radius: 8px; margin: 4px 2px 6px; }
/* 图例：说清两套视觉通道（色块 vs 虚线框） */
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 6px; font-size: 12px; color: var(--gray-500); line-height: 1.6; }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.cal-legend i { display: inline-block; flex: none; }
.lg-box { width: 14px; height: 12px; border-radius: 3px; background: linear-gradient(180deg, #e2f5dc 0 50%, #e0eaff 50% 100%); }
.lg-dash { width: 14px; height: 12px; border-radius: 3px; border: 2px dashed #4166cc; }
.lg-dot { width: 10px; height: 10px; border-radius: 50%; background: #e8938f; margin: 0 2px; }
.lg-sep { color: var(--gray-400); }
.lg-who { padding: 0 6px; border: 1px solid var(--gray-200); border-radius: 10px; background: var(--gray-50); font-size: 12px; }
.lg-who .lg-dash { width: 12px; height: 10px; }
#cal-tip { position: fixed; z-index: 9999; background: #2b2640; color: #fff; font-size: 12px; line-height: 1.7; padding: 10px 12px; border-radius: 8px; max-width: 300px; box-shadow: var(--shadow-lg); pointer-events: none; }
.cal-tip-title { font-weight: 600; font-size: 13px; margin-bottom: 2px; }
.cal-tip-row { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 280px; }
.cal-tip-link { cursor: pointer; }
.cal-tip-link:hover { text-decoration: underline; }
.cal-tip-swatch { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: baseline; }
.cal-tip-dash { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 5px; vertical-align: baseline; border: 2px dashed #4166cc; }
.cal-tip-sep { margin: 4px 0 1px; font-size: 11px; color: #b9b2d0; border-top: 1px solid rgba(255,255,255,0.15); padding-top: 4px; }
.cal-tip-warn { color: #ffc36b; }

/* ---------- 年视图：12 个月平铺，自适应铺满一屏（无需滚动） ----------
   兼容：不依赖 :has()（老内核会整条丢弃）。mobile.js 会给 .page-content 同步 .has-cal-year-grid 类。 */
/* 年视图：上面的日历卡片占满剩余高度，**下方**再接「上会天数 · 津贴结算」板块 ——
   所以容器改成**纵向** flex，并允许纵向滚动（12 个月 + 结算表本来就放不进一屏）。 */
.page-content:has(.cal-year-grid),
.page-content.has-cal-year-grid { display: flex; flex-direction: column; overflow-y: auto; overflow-x: hidden; }
/* 11-18 buck：日历日期格太扁、看不清项目档期 ⇒ 月卡改为固定高度并允许页面继续下拉，
   不再为「塞满一屏」把 12 个月压成 3 行矮格。格高约 45px，色带上直接写项目名。 */
.cal-card.cal-year-card { flex: none; min-width: 0; display: flex; flex-direction: column; }
.cal-card.cal-year-card .cal-head { margin-bottom: 8px; }
.cal-year-grid { flex: none; display: grid; grid-template-columns: repeat(4, 1fr); grid-auto-rows: 340px; gap: 10px; }
.cal-month-card { display: flex; flex-direction: column; min-height: 0; min-width: 0; background: #fff; border: 1px solid #e2e6ec; border-radius: 8px; padding: 4px 6px 6px; }
.cal-mtitle { font-weight: 600; font-size: clamp(11px, 0.8vw, 13px); color: var(--gray-800); margin-bottom: 2px; cursor: pointer; display: flex; align-items: center; justify-content: space-between; flex: none; line-height: 1.4; }
.cal-mtitle:hover { color: var(--primary); }
.cal-mcount { font-size: 10px; font-weight: 500; color: var(--gray-500); }
.cal-ygrid { flex: 1; min-height: 0; display: grid; grid-template-columns: repeat(7, 1fr); grid-template-rows: auto repeat(6, 1fr); gap: 2px; }
.cal-yweek { font-size: clamp(8px, 0.6vw, 11px); text-align: center; color: var(--gray-500); line-height: 1.4; }
.cal-card.cal-year-card .cal-foot { margin-top: 6px; font-size: 11px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
/* 日期格：一个日子一个方块，内部按项目数竖向等分为色带 */
.cal-yd { position: relative; min-height: 0; min-width: 0; border-radius: 4px; background: #fafaf7; overflow: hidden; }
.cal-yd-blank { background: transparent; }
.cal-yd-weekend { background: #f5f4ef; }
.cal-yd-num { position: absolute; top: 2px; left: 3px; z-index: 3; font-size: 11px; line-height: 1.35; color: var(--gray-700); background: rgba(255,255,255,0.8); border-radius: 3px; padding: 0 3px; pointer-events: none; }
.cal-yd-weekend .cal-yd-num { color: #a29b8c; }
.cal-yd-today .cal-yd-num { color: #fff; background: var(--primary); font-weight: 700; }
.cal-band { position: absolute; left: 0; right: 0; z-index: 1; cursor: pointer; display: flex; align-items: flex-end; }
.cal-band:hover { filter: brightness(0.94); }
/* 色带上直接写项目名：格子放宽后才放得下；同日多项目时每条只显示一行、悬浮看全名。
   ⚠ 色盘是浅色，文字必须用深色，白字会糊掉。 */
.cal-band-name { display: block; width: 100%; padding: 0 3px 1px; font-size: 9px; line-height: 1.2; color: #4a4460; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; pointer-events: none; }
/* 上会档期：内嵌虚线管道（第二层再往里一圈）。
   注意 outline 通道已完全让给上会——撞期改用日期数字变红，今天改用淡紫底，三者不再互相覆盖。 */
.cal-yd-trip::after, .cal-yd-trip::before {
  content: ''; position: absolute; pointer-events: none; z-index: 2; border-radius: 4px;
}
.cal-yd-trip::after { inset: 1px; border: 2px dashed var(--tc, #4166cc); }
.cal-yd-trip::before { inset: 4px; border: 2px dashed var(--tc2, transparent); }
.cal-yd-trip:not(.cal-tp2-start):not(.cal-tp2-mid):not(.cal-tp2-end)::before { display: none; }
/* 跨天区间连成一条：首日缺右边、中间只留上下、末日缺左边 */
.cal-tp-start::after { border-right-color: transparent; }
.cal-tp-mid::after { border-left-color: transparent; border-right-color: transparent; }
.cal-tp-end::after { border-left-color: transparent; }
.cal-tp2-start::before { border-right-color: transparent; }
.cal-tp2-mid::before { border-left-color: transparent; border-right-color: transparent; }
.cal-tp2-end::before { border-left-color: transparent; }
/* 撞期：不再用外圈，改为日期数字变红加粗（色带本身已表达"这天有多个项目"） */
.cal-yd-conflict .cal-yd-num { color: #c0392b; font-weight: 800; }
/* 今天：改用底色，不占 outline 通道 */
.cal-yd-today { background: #ebe5fb; }
@media (max-width: 1280px) {
  .cal-year-grid { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 900px) {
  .page-content:has(.cal-year-grid),
  .page-content.has-cal-year-grid { display: block; overflow-y: auto; }
  .cal-year-grid { grid-template-columns: repeat(2, 1fr); }
  .cal-month-card { min-height: 320px; }
}

/* ========== 移动端响应式 (max-width: 768px) ========== */
.hamburger { display: none; background: transparent; border: 0; font-size: 15px; font-weight: 600; cursor: pointer; padding: 4px 10px; }
.sidebar-mask { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.4); z-index: 99; }
.sidebar-mask.open { display: block; }
@media (max-width: 768px) {
  /* 顶栏 */
  .topbar { padding: 10px 16px; }
  .topbar h2 { font-size: 15px; }
  .hamburger { display: inline-block; }
  .topbar-right { gap: 10px; }
  .topbar-clock .tc-date, .topbar-clock .tc-time { font-size: 11px; }

  /* 侧栏：抽屉式 */
  .sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    width: 260px;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.2s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open { transform: translateX(0); }
  .nav-item { padding: 14px 16px; font-size: 14px; }

  /* 主区全宽 */
  .main { margin-left: 0; width: 100%; }
  .page-content { padding: 12px; }

  /* 表格：横向滚动 */
  .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .table th, .table td { padding: 8px 6px; font-size: 13px; white-space: nowrap; }

  /* 工具栏：搜索框独占一行，按钮缩小 */
  .toolbar { flex-wrap: wrap; gap: 6px; }
  .toolbar .search { flex: 1 1 100%; min-width: 0; max-width: 100%; }
  .toolbar .btn { padding: 8px 12px; font-size: 13px; }

  /* modal 全屏 */
  .modal, .modal-content { width: 100vw; max-width: 100vw; height: 100vh; max-height: 100vh; border-radius: 0; }
  .modal-mask { padding: 0; align-items: stretch; }
  .modal-header, .modal-body, .modal-footer { padding: 12px 16px; }
  .modal-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; }

  /* 表单行单列 */
  .form-row.row-2 { grid-template-columns: 1fr; }
  .form-row.row-3 { grid-template-columns: 1fr; }
  .form-row.row-4 { grid-template-columns: 1fr 1fr; }

  /* 触摸友好按钮 */
  .btn { min-height: 40px; padding: 10px 16px; font-size: 14px; }
  .btn-sm { min-height: 32px; padding: 6px 10px; }

  /* 仪表盘卡片 */
  .stat-card { padding: 12px; }
  .stat-card .value { font-size: 20px; }
  .dashboard-row { grid-template-columns: 1fr; }

  /* 报销/财务卡片：堆叠更紧凑 */
  .finance-summary { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .finance-summary > div { padding: 8px 10px; }
  .finance-summary .value { font-size: 16px; }

  /* 项目详情标签横向滚动 */
  .detail-tabs { overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; flex-wrap: nowrap; }
  .detail-tab { padding: 8px 12px; font-size: 13px; flex-shrink: 0; }

  /* 时间线左缩 */
  .timeline { padding-left: 8px; }
  .timeline-item { padding-left: 22px; }
  .timeline-item .dot { left: -16px; width: 24px; height: 24px; }

  /* 通知下拉全屏 */
  .notif-dropdown { width: calc(100vw - 24px); right: -8px; max-height: 70vh; }

  /* 表格行变小 */
  .actions { display: flex; gap: 4px; flex-wrap: wrap; }
  .actions .btn { padding: 4px 8px; font-size: 12px; min-height: 28px; }

  /* 财务概览 */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 8px; }

  /* 项目详情头部 */
  .detail-header h2 { font-size: 18px; }
  .detail-meta { font-size: 12px; gap: 6px; }
}
@media (max-width: 480px) {
  .finance-summary { grid-template-columns: 1fr; }
  .stats-grid { grid-template-columns: 1fr; }
  .modal-title { font-size: 15px; }
}

/* 移动端：所有 card 内的表格横向滚动 */
@media (max-width: 768px) {
  .card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card .table { min-width: 600px; }
  /* 项目日历：小屏保持 7 列可读，横向滚动查看 */
  .cal-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cal-grid { min-width: 620px; }
  .cal-cell { min-height: 96px; padding: 4px 5px; }
  .cal-ev, .cal-trip { font-size: 10px; }
  .cal-head { flex-wrap: wrap; gap: 6px; }
  .cal-nav { flex-wrap: wrap; }
  .cal-week { font-size: 11px; }
  /* 年视图手机端：2 列小卡片 */
  .cal-year-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 320px; gap: 8px; }
  .cal-month-card { padding: 6px 6px 4px; }
  .cal-mtitle { font-size: 12px; margin-bottom: 4px; }
  .cal-yd { font-size: 9px; border-radius: 3px; }
  .cal-yweek { font-size: 9px; }
}

/* ========== 彩蛋：鼠标「左 左 右 右」秘籍 ========== */
#egg-layer { position: fixed; inset: 0; z-index: 99999; pointer-events: none; overflow: hidden; }
.egg-word {
  position: absolute;
  bottom: -14vh;
  white-space: nowrap;
  font-weight: 800;
  letter-spacing: 2px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, .18);
  will-change: transform, opacity;
  animation: egg-float var(--egg-dur, 6s) linear var(--egg-delay, 0s) both;
}
@keyframes egg-float {
  0%   { transform: translate3d(0, 0, 0) rotate(-10deg) scale(.85); opacity: 0; }
  12%  { opacity: 1; }
  50%  { transform: translate3d(var(--egg-dx, 20px), -52vh, 0) rotate(8deg) scale(1); opacity: 1; }
  88%  { opacity: 1; }
  100% { transform: translate3d(calc(var(--egg-dx, 20px) * -1), -112vh, 0) rotate(-12deg) scale(.95); opacity: 0; }
}
.egg-banner {
  position: absolute;
  left: 50%; top: 50%;
  font-size: clamp(38px, 9vw, 112px);
  font-weight: 900;
  letter-spacing: 10px;
  color: #fff;
  -webkit-text-stroke: 3px #7C3AED;
  text-shadow: 0 10px 34px rgba(124, 58, 237, .45);
  animation: egg-pop 8s ease-out both;
}
@keyframes egg-pop {
  0%   { opacity: 0; transform: translate(-50%, -50%) scale(.4); }
  8%   { opacity: 1; transform: translate(-50%, -50%) scale(1.06); }
  14%  { transform: translate(-50%, -50%) scale(1); }
  82%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, -50%) scale(1.18); }
}

/* 提示条（如首次登录强制改密说明） */
.alert-tip {
  padding: 10px 12px;
  border-radius: var(--radius);
  background: var(--primary-light, #F5F3FF);
  border: 1px solid var(--primary, #7C3AED);
  color: var(--gray-700, #374151);
  font-size: 13px;
  line-height: 1.7;
}

/* 报销票据拖拽上传 */
.dropzone { border:2px dashed var(--gray-300,#cbd5e1); border-radius:10px; padding:20px 14px; text-align:center; cursor:pointer; color:var(--gray-500,#64748b); background:var(--gray-50,#f8fafc); transition:.15s; }
.dropzone:hover { border-color:var(--primary,#7c3aed); }
.dropzone.drag { border-color:var(--primary,#7c3aed); background:#eff6ff; color:var(--primary,#7c3aed); }
.dz-text { font-size:13px; line-height:1.6; }
.dz-files { margin-top:8px; display:flex; flex-wrap:wrap; gap:6px; }
.dz-chip { display:inline-flex; align-items:center; gap:5px; background:#eef2ff; border:1px solid #c7d2fe; color:#3730a3; border-radius:6px; padding:3px 8px; font-size:12px; max-width:240px; }
.dz-chip .x { cursor:pointer; font-weight:700; color:#4338ca; }
.dz-mini { display:inline-flex; align-items:center; padding:3px 8px; border:1px dashed var(--gray-300,#cbd5e1); border-radius:6px; font-size:12px; color:var(--gray-500,#64748b); cursor:pointer; }
.dz-mini:hover { border-color:var(--primary,#7c3aed); color:var(--primary,#7c3aed); }
.dz-mini.drag { border-color:var(--primary,#7c3aed); background:#eff6ff; color:var(--primary,#7c3aed); }
.dz-mini.active { border-style:solid; border-color:var(--primary,#7c3aed); background:#eef2ff; color:var(--primary,#7c3aed); box-shadow:0 0 0 2px rgba(124,58,237,.15); }

/* 行政支出「点击 / 拖曳」上传框（2026-11-15 buck）：与【新建应付】同款虚线大框 */
.ae-dz { padding:18px 14px; margin-bottom:12px; }
.ae-dz .dz-text b { color:var(--primary,#7c3aed); }
.ae-dz input[type=file] { display:none; }
/* 打包多笔明细：一行一个框，拖到哪一行就归哪一笔，不用再选归属 */
.ae-item-dz { display:flex; align-items:center; justify-content:center; min-height:34px; padding:4px 8px;
  border:2px dashed var(--gray-300,#cbd5e1); border-radius:8px; background:var(--gray-50,#f8fafc);
  color:var(--gray-500,#64748b); font-size:12px; line-height:1.35; text-align:center; cursor:pointer; transition:.15s; }
.ae-item-dz.ok { border-color:#a7f3d0; background:#f0fdf4; color:#065f46; }
.ae-item-dz:hover { border-color:var(--primary,#7c3aed); color:var(--primary,#7c3aed); }
.ae-item-dz.drag { border-color:var(--primary,#7c3aed); background:#eff6ff; color:var(--primary,#7c3aed); }
.ae-item-dz input[type=file] { display:none; }

/* ========== 个人日历（私人工作日历） ========== */
.pcal-wrap { display: grid; grid-template-columns: minmax(0,1fr) 320px; gap: 14px; align-items: start; }
@media (max-width: 1100px) { .pcal-wrap { grid-template-columns: 1fr; } .pcal-pool { order: -1; } }
.pcal-main { min-width: 0; }
.pcal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 8px; }
.pcal-title { display: flex; align-items: center; gap: 6px; }
.pcal-title-txt { font-size: 17px; font-weight: 700; min-width: 140px; text-align: center; }
.pcal-legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; color: var(--gray-500,#64748b); margin: 4px 0 8px; align-items: center; }
.pcal-legend span { display: inline-flex; align-items: center; gap: 5px; }
.pcal-tag-legend { display: inline-flex !important; gap: 4px !important; margin-left: auto; }
.pe-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; flex: none; }
.pe-done { text-decoration: line-through; opacity: .6; }

/* 网格格子内容 */
.pcal-grid .cal-cell { display: flex; flex-direction: column; gap: 2px; cursor: pointer; }
.pcal-grid .cal-cell:hover { border-color: var(--primary,#7c3aed); }
.pcal-grid .cal-daynum { position: relative; }
.pcal-dot-badge { display:inline-flex; align-items:center; justify-content:center; min-width:15px; height:15px; padding:0 3px; border-radius:8px; background:var(--primary,#7c3aed); color:#fff; font-size:10px; font-weight:700; margin-left:2px; }
.pcal-proj { font-size:10px; line-height:1.5; padding:0 4px; border-radius:3px; color:#6b7280; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pcal-ev { font-size:11px; line-height:1.5; padding:0 5px; border-radius:3px; color:#fff; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.pcal-ev.done { opacity:.55; text-decoration:line-through; }
.pcal-more { font-size:10px; color:var(--gray-400,#94a3b8); }
.pcal-trip-day .pcal-proj, .pcal-trip-day .pcal-ev { margin-left:3px; margin-right:3px; }

/* 侧边待办池 */
.pcal-pool { background:#fff; border:1px solid var(--gray-200,#e2e8f0); border-radius:10px; padding:10px; position:sticky; top:14px; max-height: calc(100vh - 40px); overflow:auto; }
.pcal-pool-titlebar { font-weight:700; font-size:14px; display:flex; align-items:center; gap:8px; }
.pcal-pool-sub { font-weight:400; font-size:12px; color:var(--gray-500,#64748b); margin-left:auto; }
.pcal-pool-grp { margin-top:10px; }
.pcal-pool-head { display:flex; align-items:center; justify-content:space-between; font-weight:600; font-size:12px; padding:2px 0 4px; border-bottom:1px dashed var(--gray-200,#e2e8f0); }
.pcal-pool-cnt { background:var(--gray-100,#f1f5f9); border-radius:9px; min-width:18px; text-align:center; font-size:11px; padding:0 4px; }
.pcal-pool-row { display:flex; align-items:flex-start; gap:6px; padding:5px 0; border-bottom:1px solid var(--gray-50,#f8fafc); }
.pcal-pool-row input[type=checkbox] { margin-top:3px; }
.pcal-pool-main { flex:1; min-width:0; cursor:pointer; }
.pcal-pool-title { font-size:13px; word-break:break-word; }
.pcal-pool-meta { font-size:11px; color:var(--gray-400,#94a3b8); }
.btn-xs { padding:1px 8px; font-size:11px; line-height:1.6; }

/* 某天弹窗 */
.pcal-daylist { max-height:200px; overflow:auto; margin-bottom:8px; }
.pcal-day-row { display:flex; align-items:center; gap:7px; padding:5px 0; border-bottom:1px dashed var(--gray-100,#f1f5f9); }
.pcal-day-title { font-size:13px; }
.pcal-time { font-size:11px; color:var(--gray-400,#94a3b8); margin-left:auto; }
.pcal-sub { font-size:11px; color:var(--gray-400,#94a3b8); }
.pcal-row-actions { display:inline-flex; gap:2px; margin-left:4px; }
.pcal-triprow .lg-dash { width:16px; height:12px; flex:none; }
/* 新增/编辑表单 */
.pcal-form { display:flex; flex-direction:column; gap:8px; }
.pcal-form .form-row { display:flex; flex-direction:column; gap:4px; }
.pcal-form .form-row label { font-size:12px; color:var(--gray-600,#475569); font-weight:600; }
.pcal-form .form-row.row-2 { display:grid; grid-template-columns:1fr 1fr; }
.pcal-form input[type=text],.pcal-form input[type=date],.pcal-form input[type=time],.pcal-form textarea { width:100%; padding:7px 9px; border:1px solid var(--gray-300,#cbd5e1); border-radius:6px; font-size:13px; box-sizing:border-box; }
.pcal-form textarea { resize:vertical; font-family:inherit; }
.pcal-tag-pick { display:flex; flex-wrap:wrap; gap:8px; }
.pe-tagpick { width:26px; height:26px; border-radius:50%; cursor:pointer; border:3px solid transparent; }
.pe-tagpick.active { border-color:var(--gray-800,#1e293b); box-shadow:0 0 0 2px #fff inset; }
.pcal-form .form-row input[type=checkbox] { width:auto; }

/* 个人日历周标题（周一开头，与 .cal-grid 7 列同宽对齐） */
.pcal-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin-bottom: 4px; }
.pcal-dow span { text-align: center; font-size: 12px; color: var(--gray-500,#64748b); padding: 3px 0; font-weight: 600; }

/* ==================================================================================
   手机浏览器自适应 v2（2026-09-10）
   目标：iPhone/Android 竖屏（360~430px）可直接操作 —— 主区占满、无横向挤压、
        表格卡片化、输入框不被 iOS 放大、点击区域 ≥ 40px。
   ================================================================================== */

/* 全局：禁止 iOS 自动放大文本字号；去掉移动端点击 300ms 延迟与双击缩放 */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
button, input, select, textarea, a, label, .nav-item, .btn, .stat-card, .pcal-pool-row { touch-action: manipulation; }

/* ---------- 汉堡按钮：移动端显示为图标按钮（桌面隐藏） ---------- */
.hamburger {
  display: none; width: 40px; height: 40px; padding: 0; border: 0; border-radius: 10px;
  background: var(--gray-100); color: var(--gray-700); font-size: 0; line-height: 0;
  align-items: center; justify-content: center; flex: none;
}
.hamburger::before { content: "\2630"; font-size: 18px; line-height: 1; }
.hamburger:active { background: var(--gray-200); }

@media (max-width: 768px) {
  /* ======== 1. 根因修复：主区必须占满整宽 ========
     原 #main-app 为 grid-template-columns: 220px 1fr，
     而侧栏在移动端已改为 position:fixed 脱离文档流，
     于是 .main 被自动放进第一列 220px 的轨道里 —— 整站只剩 220px 宽。
     这里强制单列，并让列宽可收缩（minmax(0,1fr) 防止内容把列撑爆）。 */
  #main-app {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    height: var(--app-h, 100vh);   /* --app-h 由 mobile.js 按真实视口高度实时写入 */
    overflow: hidden;
  }
  .main { width: 100%; min-width: 0; overflow: hidden; }

  /* ======== 2. 顶栏：紧凑但不丢信息 ======== */
  .topbar { padding: 8px 12px; gap: 8px; align-items: center; }
  .hamburger { display: flex; }
  .topbar h2 {
    font-size: 15px; flex: 1 1 auto; min-width: 0;
    white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  }
  .topbar-right { gap: 8px; flex: none; }
  .pending-bell { padding: 6px 10px; font-size: 12px; white-space: nowrap; }
  .topbar-clock { flex-direction: row; align-items: baseline; gap: 4px; }
  .topbar-clock .tc-date, .topbar-clock .tc-time { font-size: 11px; }
  .topbar-clock .tc-date::after { content: ""; }

  /* ======== 3. 页面容器与卡片 ======== */
  .page-content { padding: 12px 12px calc(20px + env(safe-area-inset-bottom)); overflow-x: hidden; overscroll-behavior: contain; }
  .card { padding: 14px 12px; overflow: visible; }
  .card-header { flex-wrap: wrap; gap: 8px; }

  /* ======== 4. 登录页 ======== */
  .login-page { align-items: center; padding: 20px 16px calc(20px + env(safe-area-inset-bottom)); min-height: var(--app-h, 100vh); }
  .login-box { width: 100%; max-width: 420px; padding: 28px 20px; border-radius: 14px; }
  .login-header .logo { font-size: 40px; }

  /* ======== 5. 输入控件：font-size 必须 ≥16px，否则 iOS 聚焦时页面会被放大 ======== */
  .form-row input, .form-row select, .form-row textarea,
  .toolbar input, .toolbar select,
  .modal-body input, .modal-body select, .modal-body textarea,
  .pcal-form input[type=text], .pcal-form input[type=date], .pcal-form input[type=time], .pcal-form textarea {
    font-size: 16px; padding: 10px 12px; min-height: 42px;
  }
  .form-row textarea, .modal-body textarea { min-height: 78px; }
  .checkbox-grid { grid-template-columns: 1fr; max-height: 46vh; }
  .checkbox-grid label { min-height: 38px; display: flex; align-items: center; gap: 8px; }

  /* 表单栅格一律单列（含 .pcal-form 里优先级更高的二次声明） */
  .form-row.row-2, .form-row.row-3, .form-row.row-4,
  .pcal-form .form-row.row-2 { grid-template-columns: 1fr; display: grid; }

  /* ======== 6. 工具栏：搜索框整行，按钮不被挤压 ======== */
  .toolbar { gap: 8px; align-items: stretch; }
  .toolbar .search, .toolbar > input, .toolbar > select { flex: 1 1 100%; max-width: 100%; min-width: 0; }
  .toolbar .spacer { display: none; }
  /* 覆盖旧移动端规则，避免按钮被压成 13px/小内边距（用户反馈"按钮变小"） */
  .toolbar .btn { flex: 0 1 auto; font-size: 14px; padding: 10px 14px; min-height: 40px; }
  .toolbar .btn.btn-primary { flex: 1 1 auto; justify-content: center; }

  /* ======== 7. 全部表格：手机端一律可横向滚动兜底（卡片化由 mobile.js + 下方规则接管） ======== */
  .table-wrap, .card > div[style*="overflow"], .modal-body > div[style*="overflow"] { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .card::after { content: none; }

  /* ======== 8. 表格卡片化（需 mobile.js 注入 data-label 与 .rwd 类） ========
     一行 = 一张卡片；第一列升级为卡片标题栏；其余单元格为「标签 / 值」两栏。 */
  table.table.rwd { min-width: 0 !important; width: 100%; border: 0; background: transparent; display: block; }
  table.table.rwd thead { display: none; }
  table.table.rwd tbody { display: block; }
  table.table.rwd tr {
    display: block; background: var(--surface); border: 1px solid #e2e6ec; border-radius: 10px;
    margin-bottom: 10px; padding: 0; overflow: hidden; box-shadow: var(--shadow-sm);
  }
  table.table.rwd tr:hover { background: var(--surface); }
  table.table.rwd td {
    display: grid; grid-template-columns: minmax(74px, 32%) 1fr; align-items: start; gap: 10px;
    padding: 8px 12px; border: 0; border-bottom: 1px dashed var(--gray-100);
    font-size: 13px; white-space: normal; word-break: break-word; text-align: left !important;
  }
  table.table.rwd td:last-child { border-bottom: 0; }
  /* 标签类小药丸不要被拉伸成整行 */
  table.table.rwd td > .tag, table.table.rwd td > .badge, table.table.rwd td > .chip,
  table.table.rwd td > span[class*="tag"] { justify-self: start; }
  table.table.rwd td::before {
    content: attr(data-label); color: var(--gray-500); font-size: 12px; font-weight: 500; line-height: 1.6;
  }
  /* 第一列 → 卡片标题 */
  table.table.rwd td:first-child {
    display: block; padding: 10px 12px; background: var(--gray-50);
    border-bottom: 1px solid var(--gray-100); font-weight: 600; font-size: 14px; color: var(--gray-800);
  }
  table.table.rwd td:first-child::before { display: none; }
  table.table.rwd td:first-child:empty { display: none; }
  /* 跨列行（空态/合计行）不显示标签列 */
  table.table.rwd td.rwd-plain { display: block; }
  table.table.rwd td.rwd-plain::before { display: none; }
  /* 操作列：按钮右对齐并自动换行 */
  table.table.rwd td.actions, table.table.rwd td .actions { display: flex; flex-wrap: wrap; gap: 6px; }
  table.table.rwd td.actions::before { flex: 0 0 auto; }
  table.table.rwd td.actions > .btn, table.table.rwd td .actions .btn { flex: 1 1 auto; justify-content: center; }
  /* 表格单元格里的长文本/进度条容器允许换行 */
  table.table.rwd td > div { min-width: 0; }

  /* 两列（键值型）表格保持原样，本身已能放下；
     旧规则 .card .table{min-width:600px} 会把这类窄表顶出屏幕，这里统一放开。 */
  table.table:not(.rwd) { font-size: 13px; min-width: 0; }
  table.table:not(.rwd) th, table.table:not(.rwd) td { white-space: normal; padding: 8px 10px; }
  .card .table { min-width: 0; }

  /* ======== 9. 详情页 / 弹窗 ======== */
  .detail-tabs, .modal-tabs {
    overflow-x: auto; -webkit-overflow-scrolling: touch; white-space: nowrap; flex-wrap: nowrap;
    padding: 0 12px; scrollbar-width: none;
  }
  .detail-tabs::-webkit-scrollbar, .modal-tabs::-webkit-scrollbar { display: none; }
  .detail-tab, .modal-tab { flex: 0 0 auto; padding: 9px 14px; font-size: 13px; }
  .modal-mask { padding: 0; align-items: stretch; }
  .modal, .modal-content {
    /* 用 100% 而非 100vw：100vw 在带滚动条的老内核上会超出视口，产生横向裁切 */
    width: 100%; max-width: 100%; height: var(--app-h, 100vh); max-height: var(--app-h, 100vh);
    border-radius: 0;
  }
  .modal-header, .modal-body, .modal-footer { padding: 12px 14px; }
  .modal-body { padding-bottom: calc(14px + env(safe-area-inset-bottom)); }
  .modal-footer { flex-wrap: wrap; gap: 8px; }
  .modal-footer .btn { flex: 1 1 auto; justify-content: center; }
  .detail-header h2 { font-size: 17px; }
  .detail-header .pd-head { flex-direction: column; }

  /* ======== 10. 通知下拉 / Toast ======== */
  .notif-dropdown { position: fixed; left: 10px; right: 10px; top: 60px; width: auto; max-height: 68vh; }
  #toast-root { left: 10px; right: 10px; top: 10px; }
  .toast { min-width: 0; font-size: 13px; }

  /* ======== 11. 触摸尺寸与滚动 ======== */
  .btn { min-height: 40px; padding: 10px 16px; font-size: 14px; }
  .btn-sm, .btn-xs { min-height: 34px; padding: 7px 12px; font-size: 13px; }
  /* 表格内操作按钮：旧规则压到 12px / 28px 高，手机上点不准，回调到可点尺寸 */
  .actions { gap: 8px; }
  .actions .btn { min-height: 34px; padding: 7px 12px; font-size: 13px; }
  .nav-item { padding: 14px 16px; font-size: 15px; min-height: 48px; }
  .sidebar { width: min(280px, 84vw); }
  .sidebar-footer { padding-bottom: calc(12px + env(safe-area-inset-bottom)); }
  body.drawer-open { overflow: hidden; }

  /* ======== 12. 日历 / 看板 / 其他多列布局 ======== */
  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .stat-card { padding: 0 12px 14px; }
  .stat-card .value { font-size: 20px; }
  .finance-summary { grid-template-columns: repeat(2, 1fr); gap: 8px; }
  .dashboard-row { grid-template-columns: 1fr; }
  .pd-ops { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .notes-grid { grid-template-columns: 1fr; }
  .pcal-wrap { grid-template-columns: 1fr; }
  .pcal-title-txt { font-size: 15px; min-width: 0; }
  /* 项目月视图：色块里是项目名，保留少量横向滚动以保证能看清并点中；
     个人日历整格可点（弹当天详情），直接铺满 7 列，不再横向滚动。 */
  .cal-card { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cal-grid { min-width: 520px; }
  .cal-grid.pcal-grid { min-width: 0 !important; width: 100%; gap: 3px; }
  .pcal-grid .cal-cell { min-height: 62px; padding: 2px 3px; border-radius: 6px; }
  .pcal-grid .cal-daynum { font-size: 11px; margin-bottom: 1px; gap: 2px; }
  .pcal-grid .pcal-dot-badge { min-width: 13px; height: 13px; font-size: 9px; }
  .pcal-grid .pcal-ev, .pcal-grid .pcal-proj { font-size: 9px; line-height: 1.45; padding: 0 3px; border-radius: 3px; }
  .pcal-dow { min-width: 0; }
  .pcal-dow span, .cal-week { font-size: 11px; }
  .cal-year-grid { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 320px; gap: 8px; }
  .pcal-pool { position: static; max-height: none; }
  .timeline { padding-left: 4px; }
}

/* 超小屏（iPhone SE / 老机型 320~380px）再收紧一档 —— 只收间距，不收字号 */
@media (max-width: 380px) {
  .topbar-clock .tc-date { display: none; }
  .stats-grid, .finance-summary, .pd-ops { grid-template-columns: 1fr; }
  .page-content { padding: 10px 8px; }
  table.table.rwd td { grid-template-columns: minmax(62px, 32%) 1fr; gap: 8px; padding: 8px 10px; }
}

/* 横屏 / 大屏手机：侧栏回归常驻，避免抽屉遮住内容 */
@media (min-width: 769px) {
  .hamburger { display: none; }
}

/* 支持 dvh 的浏览器用动态视口高度，地址栏收起时不出现空白 */
@supports (height: 100dvh) {
  @media (max-width: 768px) {
    #main-app { height: var(--app-h, 100dvh); }
    .modal, .modal-content { height: var(--app-h, 100dvh); max-height: var(--app-h, 100dvh); }
    .login-page { min-height: var(--app-h, 100dvh); }
  }
}

/* ========== 记账台（报销界面重构 2026-09-11）========== */
/* 心智模型：平时一条条「记一笔」垫付 → 需要钱时勾选 →「打包并申请报销」→ 审批流 → 应付 → 打款 */
.reim-tabs { display: flex; align-items: center; gap: 6px; margin-bottom: 14px; flex-wrap: wrap; }
.reim-tabs .spacer { flex: 1; }
.reim-tab { border: 1px solid var(--gray-200); background: #fff; color: var(--gray-600);
            padding: 7px 16px; border-radius: 999px; font-size: 14px; }
.reim-tab.active { background: var(--primary); border-color: var(--primary); color: #fff; font-weight: 600; }

/* 项目详情「报销」页签 · 包裹卡片头（2026-09-27 buck）：整行可点展开 —— 一眼可见。
   原来卡头是近白的 #f8fafc、只有一个很小的 ▸，用户根本不知道整行能点，只会去点右边那个按钮。
   现在：明显的灰带 + 左侧色脊 + 圆形展开指示 + 「点击整行展开明细」提示 + hover 高亮。 */
.reim-pkg-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 12px; background: #eef2f7; border-left: 4px solid #94a3b8;
  border-bottom: 1px solid #cbd5e1; cursor: pointer;
  transition: background .12s ease, border-color .12s ease; }
.reim-pkg-head:hover { background: #e2e8f0; border-left-color: var(--primary); }
.reim-pkg-head.is-open { background: #eff6ff; border-left-color: var(--primary); border-bottom-color: #bfdbfe; }
.reim-pkg-caret { flex: none; width: 22px; height: 22px; border-radius: 50%; background: #fff;
  border: 1px solid #cbd5e1; color: #334155; font-size: 11px; font-weight: 700; line-height: 1;
  display: inline-flex; align-items: center; justify-content: center; }
.reim-pkg-head:hover .reim-pkg-caret,
.reim-pkg-head.is-open .reim-pkg-caret { border-color: var(--primary); color: var(--primary); }
.reim-pkg-tip { font-size: 12px; color: #64748b; white-space: nowrap; }
.reim-pkg-head:hover .reim-pkg-tip { color: var(--primary-dark); font-weight: 600; }

/* 顶部统计 */
.led-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 10px; margin-bottom: 16px; }
.led-stat { background: #fff; border: 1px solid var(--gray-200); border-radius: 10px; padding: 12px 14px; }
.led-stat .k { font-size: 12px; color: var(--gray-500); }
.led-stat .v { font-size: 19px; font-weight: 700; margin-top: 2px; font-variant-numeric: tabular-nums; }
.led-stat .s { font-size: 11px; color: var(--gray-400); margin-top: 1px; }
.led-stat.warn .v { color: #b45309; }
.led-stat.ok .v { color: var(--success); }
.led-stat.now .v { color: var(--primary); }

/* 区块标题 */
.led-sec { display: flex; align-items: baseline; gap: 8px; margin: 20px 0 8px; flex-wrap: wrap; }
.led-sec h3 { font-size: 15px; font-weight: 600; }
.led-sec .n { font-size: 13px; color: var(--gray-500); }
.led-sec .hint { font-size: 12px; color: var(--gray-400); }
.led-sec .led-all { display: inline-flex; align-items: center; gap: 5px; align-self: center; font-size: 13px; color: var(--gray-700); cursor: pointer; user-select: none; }
.led-sec .led-all input { width: 15px; height: 15px; cursor: pointer; margin: 0; }
.led-sec .led-filter { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.led-sec .led-filter .lb { font-size: 12px; color: var(--gray-500); }
.led-sec .led-filter select { padding: 5px 8px; border: 1px solid var(--gray-300); border-radius: var(--radius); font-size: 13px; max-width: 280px; }

/* 单笔流水 */
/* ⚠ 列宽全部**固定**（2026-10-25 buck：「金额不对齐，看起来很难受」）：
   原来金额 / 票据 / 操作三列都是 flex:0 0 auto（宽度随内容浮动）⇒
   ¥65.00 与 ¥124.00 位数不同、票据标签长短不同、操作按钮个数不同 ⇒ 每一行的列起点都在漂。
   ⇒ 金额列定宽 + 右对齐（小数点对齐）、票据列定宽 + 标签左对齐、操作列定宽 + 右对齐。
   ⛔ 别把这里改回 auto：金额左边缘会重新随位数跳动。 */
.led-list { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; overflow: hidden; }
.led-item { display: flex; align-items: center; gap: 12px; padding: 11px 14px; border-bottom: 1px solid var(--gray-100); }
.led-item:last-child { border-bottom: 0; }
.led-item.on { background: var(--primary-light); }
.led-item input.led-pick { width: 17px; height: 17px; cursor: pointer; flex: 0 0 auto; }
.led-item .led-date { flex: 0 0 50px; font-size: 13px; color: var(--gray-600); font-variant-numeric: tabular-nums; }
.led-item .led-main { flex: 1 1 auto; min-width: 0; }
.led-item .led-title { font-weight: 600; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.led-item .led-sub { font-size: 12px; color: var(--gray-500); margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 票据列：定宽 + 标签统一左对齐（「无发票·抵冲」「有票 2」「待补票」「无需票据」长短不一，左缘对齐才扫得下去） */
.led-item .led-rec { flex: 0 0 104px; display: flex; align-items: center; justify-content: flex-start; min-width: 0; }
.led-item .led-rec .tag { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
/* 金额列：定宽 + 右对齐 + 等宽数字 ⇒ 所有金额右边缘（小数点）对齐 */
.led-item .led-amount { flex: 0 0 108px; text-align: right; font-weight: 700; font-size: 15px; font-variant-numeric: tabular-nums; white-space: nowrap; }
/* 操作列：定宽 + 右对齐（最多 修改 / 票据(＋传票) / 删除 三个按钮；上会津贴那一行是纯文字，也吃同一格宽度） */
.led-item .led-ops { flex: 0 0 186px; display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.led-item .led-ops .text-muted { flex: 1 1 auto; text-align: right; }

.tag.receipt-ok { background: #ecfdf5; color: #047857; }
.tag.receipt-miss { background: #fef3c7; color: #92400e; }
/* 抵冲票：这一笔没有发票，由本单的「抵冲发票」整批冲抵（与「缺票」不是一回事，配色要区分开） */
.tag.receipt-off { background: #ede9fe; color: #5b21b6; border: 1px solid #ddd6fe; }
/* 勾选互斥：抵冲明细与有票明细不能同批打包，异类那几笔置灰禁用 */
.led-item.blocked { opacity: 0.5; }
.led-item.blocked .led-pick { cursor: not-allowed; }

/* 底部悬浮操作条：只在勾选后出现 */
.led-bar { position: sticky; bottom: 12px; z-index: 5; margin-top: 12px;
           display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
           background: #fff; border: 1px solid var(--primary); border-radius: 12px;
           padding: 12px 16px; box-shadow: var(--shadow-lg); }
.led-bar .sum { font-size: 14px; }
.led-bar .warnline { font-size: 12px; color: #b45309; }

/* 审批流程条 */
.led-flow { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; font-size: 12px; }
.led-flow .st { color: var(--gray-400); }
.led-flow .st.done { color: var(--success); }
.led-flow .st.now { color: var(--primary); font-weight: 700; }
.led-flow .st.bad { color: var(--danger); font-weight: 600; }
.led-flow .sep { color: var(--gray-300); }

/* ══ 报销单卡片（2026-10-02 重做）═════════════════════════════════════════════
   buck：「三个包裹之间的边界不清晰，都放在一个底色里、用的是相同的配色方案，看上去比较混乱，
          感觉有很多边框；让现在的三个和以后会有的多个显示更清晰、区分更明显。」
   病因有三个：
     ① **双框** —— 外层包裹面板自己有边框，里面每张卡又各有边框，套起来一眼全是线；
     ② **底色太近** —— 白卡(#fff) 浮在米黄底(#fffbeb) 上，反差几乎为 0，卡片的边界形同虚设；
     ③ **三张卡长得一模一样** —— 唯一的区别只有一个很小的状态标签，扫过去分不出是三个不同的东西。
   改法（面板见文件后段 .led-*-panel）：
     · 每张包裹卡独立成「一张白卡」：浅描边 + 轻阴影 + **左侧 4px 状态色条**；
     · 相邻卡片间距拉到 16px，白卡与淡底反差明确 ⇒ 边界一眼可辨；
     · 标题行最左加**序号徽标**（1 / 2 / 3…）—— 包裹再多也能一眼数清第几个，
       而且它完全中性，不会让配色变花（比「一张卡一种底色」稳得多）。 */
.led-pkg { background: #fff; border: 1px solid #e3e8ef; border-left: 4px solid #cbd5e1;
  border-radius: 10px; margin-bottom: 0; overflow: hidden; box-shadow: 0 1px 2px rgba(15, 23, 42, .05); }
.led-pkg + .led-pkg { margin-top: 16px; }
/* 左侧色条 = 这张包裹在流程里卡在哪一关（一条细线，不构成配色杂乱） */
.led-pkg.st-packaged    { border-left-color: #94a3b8; }   /* 已打包 · 还没提交申请 */
.led-pkg.st-pending_pm  { border-left-color: #3b82f6; }   /* 等项目经理审批 */
.led-pkg.st-pm_approved { border-left-color: #f59e0b; }   /* 等业务主管会签 */
.led-pkg.st-in_payable  { border-left-color: #10b981; }   /* 已通过审批 · 等财务打款 */
.led-pkg.st-paid        { border-left-color: #86c9ac; }   /* 已收到 */
.led-pkg.st-pm_rejected,
.led-pkg.st-boss_rejected,
.led-pkg.rejected       { border-left-color: #ef4444; }   /* 被驳回 */
.led-pkg.rejected { border-color: #fecaca; border-left-color: #ef4444; }
.led-pkg-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; background: var(--gray-50);
                border-bottom: 1px solid var(--gray-100); flex-wrap: wrap; }
/* 「项目 · N 个明细 · 提交时间」这一段是标题行里**唯一可以伸缩**的部分：
   项目名一长就把它压掉、改成省略号，这样右边的金额永远不会被挤到第二行
   （2026-10-02：包裹 BX-20260928-001 的项目名较长，金额被挤下去，一行一个包裹的整齐感就断了）。 */
/* ⚠ basis 必须是**固定值**，不能是 auto：flex-wrap 的换行判断用的是 basis，
   而 basis:auto = 内容宽度 ⇒ 项目名一长，换行判断就认为「这行放不下」而把金额挤到第二行
   （ellipsis 救不了它，因为根本没轮到收缩）。给个 120px 的基准，它才会先被压缩再考虑换行。 */
.led-pkg-head .led-pkg-meta { flex: 1 1 120px; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.led-pkg-head .amt { flex: none; padding-left: 10px; }
.led-pkg-head .idx { flex: none; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 6px;
  background: #eef2f7; color: #475569; font-size: 11.5px; font-weight: 700; line-height: 20px;
  display: inline-flex; align-items: center; justify-content: center; font-variant-numeric: tabular-nums; }
.led-pkg.collapsible:not(.open) .led-pkg-head.has-toggle:hover .idx { background: #e2e8f0; color: #334155; }
.led-pkg-head .no { font-weight: 700; }
.led-pkg-head .amt { font-weight: 700; margin-left: auto; font-variant-numeric: tabular-nums; }
.led-pkg-items { padding: 6px 14px; }
.led-pkg-item { display: flex; align-items: center; gap: 10px; font-size: 13px; padding: 6px 0; border-bottom: 1px dashed var(--gray-100); }
.led-pkg-item:last-child { border-bottom: 0; }
.led-pkg-item .d { flex: 0 0 46px; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.led-pkg-item .c { flex: 0 0 auto; }
.led-pkg-item .t { flex: 1 1 auto; min-width: 0; color: var(--gray-600); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.led-pkg-item .a { flex: 0 0 auto; font-weight: 600; font-variant-numeric: tabular-nums; }
.led-pkg-foot { padding: 10px 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; border-top: 1px solid var(--gray-100); }
.led-pkg-foot .flow { margin-left: auto; }
/* 「未打款的包裹」区：整行可点，默认折叠（一行就是一个包裹，点开才看明细）—— 2026-09-27 buck */
.led-pkg.collapsible .led-pkg-head.has-toggle { cursor: pointer; }
.led-pkg.collapsible .led-pkg-head.has-toggle:hover { background: #eef2f7; }
.led-pkg.collapsible:not(.open) .led-pkg-head { border-bottom: 0; }
.led-pkg.collapsible:not(.open) .led-pkg-items { display: none; }
.led-pkg-caret { flex: none; width: 18px; text-align: center; color: var(--gray-500); font-size: 12px; }
.led-pkg.collapsible.open .led-pkg-caret { color: var(--primary); }
.led-pkg-openhint { flex: none; font-size: 12px; color: var(--primary); font-weight: 600; }
.led-pkg.collapsible.open .led-pkg-openhint { color: var(--gray-400); font-weight: 500; }
/* 「点击展开明细」这行提示每张卡都有一条，三张卡就是三行蓝字，也是「看着乱」的一份子。
   默认压成浅灰小字（不抢眼色条的视觉焦点），鼠标移到这张卡上时才亮起来。 */
.led-pkg-openhint { color: var(--gray-400); font-weight: 500; font-size: 11.5px; }
.led-pkg-head.has-toggle:hover .led-pkg-openhint { color: var(--primary); font-weight: 600; }
/* 折叠时把「会签详情」（谁投了 / 谁还没投）一起收起 —— 摘要就在标题行的 .led-pkg-votechip 上。
   2026-10-02 buck：审批流中的包裹也要「一行一个」，展开才看细节。 */
.led-pkg.collapsible:not(.open) .led-pkg-extra { display: none; }
/* 会签进度角标（标题行）：折叠态一眼看出这个包裹卡在哪一关、还缺几票 */
.led-pkg-votechip { flex: none; font-size: 12px; padding: 1px 8px; border-radius: 20px; white-space: nowrap;
  background: #eef2ff; color: #3730a3; border: 1px solid #c7d2fe; font-weight: 600; }
.led-pkg-votechip.dim { background: #f1f5f9; color: #64748b; border-color: #e2e8f0; font-weight: 500; }
.led-pkg-votechip.ok { background: #ecfdf5; color: #047857; border-color: #a7f3d0; }
.led-pkg-votechip.bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; }
/* 抵冲发票角标（标题行）：2026-10-02 从「每张卡一整行黄底提示条」收进来 ——
   正常（已足额）保持中性灰，只有**不足**时才变红并另在下方展开警示条。 */
.led-pkg-offchip { flex: none; font-size: 12px; padding: 1px 8px; border-radius: 20px; white-space: nowrap;
  background: #f1f5f9; color: #475569; border: 1px solid #e2e8f0; }
.led-pkg-offchip .mk { color: #059669; font-weight: 700; }
.led-pkg-offchip.bad { background: #fef2f2; color: #b91c1c; border-color: #fecaca; font-weight: 600; }
.led-pkg-offchip.bad .mk { color: #dc2626; }
/* 「未打包的明细」按项目分块（2026-09-27 buck）：一个项目一个方块，点方块展开该项目下的明细 */
.led-proj-block { background: #fff; border: 1px solid var(--gray-200); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.led-proj-block.open { box-shadow: 0 1px 3px rgba(15, 23, 42, .06); }
.led-proj-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; background: var(--gray-50);
                 border-bottom: 1px solid var(--gray-100); flex-wrap: wrap; cursor: pointer; }
.led-proj-head:hover { background: #eef2f7; }
.led-proj-block:not(.open) .led-proj-head { border-bottom: 0; }
.led-proj-caret { flex: none; width: 18px; text-align: center; color: var(--gray-500); font-size: 12px; }
.led-proj-block.open .led-proj-caret { color: var(--primary); }
.led-proj-name { font-size: 14px; color: var(--gray-900); }
.led-proj-sum { font-size: 13px; color: var(--gray-600); font-variant-numeric: tabular-nums; }
.led-proj-head .spacer { flex: 1 1 auto; }
.led-proj-block:not(.open) > .led-list { display: none; }
/* 方块内的明细表：去掉外层卡片边框（方块本身已经是卡片），只留分隔线 */
.led-proj-block > .led-list { border: 0; border-radius: 0; border-top: 1px solid var(--gray-200); }
/* 「未打包的明细」与「未打款的包裹」是**并列的两块** ⇒ 用同形色块 + 边框把它们摆成一对（2026-09-27 buck：
   「第一个板块和第二个板块其实是并列关系，但现在的 UI 显示逻辑好像并不是」）。
   绿色那块是「未打款的包裹」，这块原本用**中性冷灰**，但页面底色 `#f0eef8` 本身就是淡紫灰 ⇒ 两者几乎融在一起
   （buck 2026-09-27：「现在是灰色，和背景的淡紫灰很容易混淆」）。改为**淡蓝**：与淡紫灰页面、绿块、暖黄块
   三个都不同色相，仍然是低饱和浅底，不抢眼也不混淆。 */
/* ⚠ 2026-10-02 buck：「感觉有很多边框」—— 面板自己一圈框 + 里面每个卡片一圈框 = **双框**。
   三块面板（未打包的明细 / 审批流中的包裹 / 未打钱的包裹）**统一去掉自身边框**，只留淡底色来
   划出「这是一块」的范围（底色与页面淡紫灰底色的色差足够分辨）；边框只留给里面的卡片。
   这样整页只剩一层边框，层次反而更清楚。 */
.led-items-panel { background: #e3efff; border: 0; border-radius: 14px; padding: 4px 14px 12px; margin: 20px 0 8px; }
.led-items-panel .led-sec { margin-top: 12px; padding-bottom: 9px; border-bottom: 1px solid rgba(30, 64, 175, .14); }
.led-items-panel .led-sec h3 { color: #1e40af; }
.led-items-panel .led-proj-block { background: #fff; }
.led-items-panel .led-empty { background: #fff; border: 1px dashed #9cc0ea; border-radius: 10px; padding: 18px 16px; }
/* 「审批流中的包裹」也是与上面两块同形的面板（2026-09-27 buck：「审批流中的包裹也是一个板块，应该是前面两个板块一样的 UI」）。
   用暖黄表示「进行中」；边框明确，不再是无边框的一排卡片。 */
.led-flow-panel { background: #fdf7e6; border: 0; border-radius: 14px; padding: 4px 14px 14px; margin: 20px 0 8px; }
.led-flow-panel .led-sec { margin-top: 12px; padding-bottom: 9px; border-bottom: 1px solid rgba(146, 64, 14, .14); }
.led-flow-panel .led-sec h3 { color: #92400e; }
.led-flow-panel .led-pkg { background: #fff; }
.led-flow-panel .led-empty { background: #fff; border: 1px dashed #fcd34d; border-radius: 10px; padding: 18px 16px; }
/* 勾选条（「已选 N 笔 / 取消勾选 / 打包申请」）长在所属项目方块内部，且**紧贴项目标题行下方**
   （2026-09-27 buck：「把『取消勾选』和『打包申请』放在选择按钮旁边，明显一点，不然要划到
   明细结束才能看到」——原来它在明细列表的最底部，明细一多就得划到底）。
   空着时不占位。 */
.led-proj-bar:not(:empty) { padding: 10px 14px; background: #fbfcfe; border-top: 1px solid var(--gray-200); border-bottom: 1px solid var(--gray-200); }
/* 条已经在上面画了下边界 ⇒ 明细表顶部的分隔线就别重复画了（否则出现「双线」） */
.led-proj-bar:not(:empty) + .led-list { border-top: 0; }
.led-proj-bar .led-bar { margin: 0; position: static; }   /* 它是块内的一条，不再吸底 */
/* 待打款：单独一块绿色高亮区域，与「待报销明细」「其它报销单」明确分开
   ⚠ 2026-10-02：与上面两块一样**去掉自身边框**（双框问题），只留淡绿底划范围。
   底色从 #f0fdf4 微调到 #e8f7ee —— 去掉边框后它与页面淡紫灰底的色差本来就偏小，
   不加深一点就「看不出这是一块」。 */
.led-payable { background: #e8f7ee; border: 0; border-radius: 14px; padding: 4px 14px 14px; margin: 20px 0 8px; }
.led-payable .led-sec { margin-top: 12px; padding-bottom: 9px; border-bottom: 1px solid rgba(6, 95, 70, .14); }
.led-payable .led-sec h3 { color: #065f46; }
.led-payable .led-pkg { background: #fff; }
.led-note { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; border-radius: 10px; padding: 10px 14px; font-size: 13px; }
.led-empty { background: #fff; border: 1px dashed var(--gray-300); border-radius: 12px; padding: 26px 16px;
             text-align: center; color: var(--gray-400); font-size: 13px; }

@media (max-width: 768px) {
  .led-sec .led-filter { margin-left: 0; flex: 1 1 100%; flex-wrap: wrap; }
  .led-sec .led-filter select { max-width: 100%; flex: 1 1 auto; }
  .led-item { flex-wrap: wrap; gap: 8px; }
  .led-item .led-date { flex: 0 0 auto; }
  .led-item .led-main { flex: 1 1 60%; }
  .led-item .led-rec { flex: 0 0 auto; }
  .led-item .led-amount { flex: 0 0 auto; margin-left: auto; }
  .led-item .led-ops { flex: 1 1 100%; justify-content: flex-end; }
  .led-pkg-head .amt { margin-left: 0; }
  .led-pkg-foot .flow { margin-left: 0; flex: 1 1 100%; }
}


/* ============================================================
   大字号日期选择器（与 datepicker.js 配套）  2026-09-21
   —— 替换浏览器原生的小格子日历：日期格 54x54px、数字 21px、
      上下月按钮 48x48px，另有「今天/昨天/明天/下周一/本月末/下月初」快捷词。
   —— 只在「有精细指针（鼠标）」的设备启用；手机端保留系统自带日历。
   —— 回填格式与原一致（YYYY-MM-DD），业务逻辑不受影响。
   ============================================================ */
input[type="date"] { cursor: pointer; }
input[type="date"]::-webkit-calendar-picker-indicator { opacity: .5; cursor: pointer; pointer-events: none; }
input[type="date"].dp-active { border-color: var(--primary) !important; box-shadow: 0 0 0 3px rgba(124,58,237,.15); }

#dp-pop { position: fixed; z-index: 2000; box-sizing: border-box;
  --dp-cell: 54px; --dp-fs: 21px; --dp-gap: 6px;
  width: calc(7 * var(--dp-cell) + 6 * var(--dp-gap) + 26px);
  background: #fff; border: 1px solid var(--gray-200); border-radius: 14px;
  box-shadow: var(--shadow-lg); padding: 12px; max-height: 92vh; overflow-y: auto; }
#dp-pop[hidden] { display: none; }
/* 面板切换时必须真正隐藏（.dp-dow/.dp-chips 自带 display，会盖掉 UA 的 [hidden] 规则） */
#dp-pop [hidden] { display: none !important; }

#dp-pop .dp-head { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; }
#dp-pop .dp-nav { flex: none; width: 48px; height: 48px; border-radius: 12px; border: 1px solid var(--gray-200);
  background: #fff; color: var(--gray-700); font-size: 22px; line-height: 1; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: .15s; }
#dp-pop .dp-nav:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
#dp-pop .dp-title { flex: 1; height: 48px; border-radius: 12px; border: 1px solid var(--gray-200); background: #fff;
  font-size: 17px; font-weight: 600; color: var(--gray-800); cursor: pointer; transition: .15s;
  display: flex; align-items: center; justify-content: center; gap: 6px; }
#dp-pop .dp-title:hover { background: var(--primary-light); border-color: var(--primary); }
#dp-pop .dp-title .caret { font-size: 11px; color: var(--gray-400); }

#dp-pop .dp-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
#dp-pop .dp-chip { height: 34px; padding: 0 11px; border-radius: 999px; border: 1px solid var(--gray-200);
  background: var(--gray-50); font-size: 13px; font-weight: 600; color: var(--gray-700); cursor: pointer; transition: .15s; }
#dp-pop .dp-chip:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }

#dp-pop .dp-dow { display: grid; grid-template-columns: repeat(7, var(--dp-cell)); gap: var(--dp-gap); justify-content: center; margin-bottom: 4px; }
#dp-pop .dp-dow span { text-align: center; font-size: 12.5px; color: var(--gray-400); }
#dp-pop .dp-dow span.wk { color: var(--gray-600); }
#dp-pop .dp-grid { display: grid; grid-template-columns: repeat(7, var(--dp-cell)); gap: var(--dp-gap); justify-content: center; }
#dp-pop .dp-d { width: var(--dp-cell); height: var(--dp-cell); border-radius: 12px; border: 1px solid transparent;
  background: var(--gray-50); color: var(--gray-700); font-size: var(--dp-fs); font-weight: 600; cursor: pointer;
  display: flex; align-items: center; justify-content: center; transition: .12s; font-variant-numeric: tabular-nums; }
#dp-pop .dp-d:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
#dp-pop .dp-d.out { background: transparent; color: var(--gray-300); font-weight: 400; }
#dp-pop .dp-d.out:hover { background: var(--gray-50); color: var(--gray-500); border-color: var(--gray-200); }
#dp-pop .dp-d.wk { background: #faf8ff; color: var(--primary-dark); }
#dp-pop .dp-d.today { border-color: var(--primary); background: #fff; color: var(--primary-dark); }
#dp-pop .dp-d.sel { background: var(--primary); border-color: var(--primary); color: #fff; box-shadow: 0 3px 10px rgba(124,58,237,.32); }
#dp-pop .dp-d:disabled { opacity: .3; cursor: not-allowed; pointer-events: none; }

/* 月/年面板要横向铺满整行，否则会被父级 .dp-grid 的 7 列网格挤成 54px 宽、文字换行 */
#dp-pop .dp-months, #dp-pop .dp-years { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; grid-column: 1 / -1; }
#dp-pop .dp-m { height: 62px; border-radius: 12px; border: 1px solid var(--gray-200); background: var(--gray-50);
  font-size: 15px; font-weight: 600; color: var(--gray-700); cursor: pointer; transition: .15s; }
#dp-pop .dp-m:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
#dp-pop .dp-m.cur { background: var(--primary); border-color: var(--primary); color: #fff; }
#dp-pop .dp-y { height: 54px; border-radius: 12px; border: 1px solid var(--gray-200); background: var(--gray-50);
  font-size: 15px; font-weight: 600; color: var(--gray-700); cursor: pointer; }
#dp-pop .dp-y:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary-dark); }
#dp-pop .dp-y.cur { background: var(--primary); border-color: var(--primary); color: #fff; }

#dp-pop .dp-foot { display: flex; gap: 8px; margin-top: 10px; }
#dp-pop .dp-btn { flex: 1; height: 44px; border-radius: 12px; border: 1px solid var(--gray-300); background: #fff;
  font-size: 14px; font-weight: 600; color: var(--gray-700); cursor: pointer; transition: .15s; }
#dp-pop .dp-btn:hover { background: var(--gray-100); }

@media (max-width: 780px) { #dp-pop { --dp-cell: 46px; --dp-fs: 18px; --dp-gap: 5px; } }
@media (max-width: 560px) { #dp-pop { --dp-cell: 40px; --dp-fs: 16px; --dp-gap: 4px; } }

/* ===== 【打款】页：按供应商分组 + 多笔一起登记支付（2026-09-23 改版） ===== */
/* 每个供应商一张卡。卡头 / 表格 / 卡脚**共用同一套固定列宽**（PAYRUN_COLS），
   所以「笔数 / 应付合计 / 未付合计」正好压在下方对应列上 —— 这是「上下对齐」的实现方式；
   容器统一横向滚动，保证三者永远同步位移。 */
.pr-group { margin-bottom: 18px; padding: 0; overflow: hidden; border: 1px solid #e5e7eb; border-radius: 12px;
  box-shadow: 0 0 0 1px #e5e7eb, 0 2px 10px rgba(15,23,42,.07); }
/* ⚠⚠⚠ **卡片边框物理宽度必须保持 1px**：卡头 / 卡脚是 grid、表格是 colgroup，两边共用 PAYRUN_COLS，
   而第 3 列是 `minmax(190px,1fr)` —— **它不肯收缩**。边框一加粗，内容区就少 2px，grid 立刻向右溢出 4px，
   卡头金额与表格金额那条「上下对齐的竖线」当场错开（2026-09-23 实测 835 vs 831，4 条断言全红）。
   所以「边界加粗」一律用 `box-shadow: 0 0 0 1px` 外发光模拟（视觉 2px 边框、**不占布局**）。 */
/* 「卡片感」的核心＝**边界要清晰、颜色要有对比**；但**紫色必须从卡片上撤掉**（2026-09-23 配色定稿＝方案 A「石板炭灰」）。
   原因（用户原话「底色是淡紫色，框的主色调是正紫色，太难受」）：原来卡框正紫 + 卡头紫底 + 卡脚淡紫，
   而页面全局底色本身就是淡紫（body #f0eef8）⇒ 整屏泡在紫色里，紫色反而不再有强调作用。
   现在：**深灰卡头 + 亮黄未付金额** —— 全屏最亮的一点就是「未付金额」，视线自动落上去；
   已付清的整卡降饱和成灰，隔着屏幕就能分清「还要不要付钱」。
   （⛔ 别把 `--primary` 加回卡片：卡片属于「操作区」，用中性色才不跟导航/表头/主按钮抢视觉。） */
.pr-group--unpaid { border-color: #334155; box-shadow: 0 0 0 1px #334155, 0 3px 14px rgba(15,23,42,.10); }
.pr-group--done { border-color: #d1d5db; box-shadow: 0 0 0 1px #d1d5db, 0 2px 10px rgba(15,23,42,.06); }
.pr-group--unpaid .pr-group-head { background: linear-gradient(135deg, #1F2937 0%, #111827 100%); border-bottom-color: #111827; }
.pr-group--unpaid .pr-group-head .pr-group-name { color: #fff; }
.pr-group--unpaid .pr-group-head .pr-group-sum { color: rgba(255,255,255,.86); }
.pr-group--unpaid .pr-group-head .pr-group-sum b { color: #fff; }
/* 深色卡头上的按钮必须翻色：默认 ghost 是「灰字 + 灰边」，深底上等于看不见 */
.pr-group--unpaid .pr-group-head .btn { background: #fff; color: #1F2937; border-color: #fff; font-weight: 600; }
.pr-group--unpaid .pr-group-head .btn-ghost { background: rgba(255,255,255,.16); color: #fff; border-color: rgba(255,255,255,.52); }
.pr-group--unpaid .pr-group-head .btn-ghost:hover { background: rgba(255,255,255,.30); }
.pr-group--unpaid .pr-group-head input.pr-group-pick { accent-color: #FDE047; }
.pr-group--done .pr-group-head { background: #f1f5f9; }
/* 卡脚：中性浅灰（不再用紫色呼应卡头） */
.pr-group--unpaid .pr-group-foot { background: #F1F5F9; border-top-color: #E2E8F0; color: #334155; }
.pr-group--done .pr-group-foot { background: #f8fafc; }
.pr-group-body { overflow-x: auto; }
.pr-group-head, .pr-group-foot { min-width: 1040px; }
/* ⚠⚠ 「上下对齐」的关键：卡头 / 卡脚的**列边界**必须与表格的列边界重合。
   表格单元格自带 `padding: 10px 12px`（.table td），且表格外框有 1px 边框；
   所以：① 卡片容器左右各留 1px（抵掉表格边框）② **每个卡头/卡脚子项也补 12px 左右内边距**，
   这样「应付合计」的数字才会与表格里同列金额的右边界落在同一条竖线上。
   （只调容器 padding 是没用的 —— 那只会整体平移，列与列之间仍然错位。） */
.pr-group-head { display: grid; align-items: center; gap: 0;
  padding: 10px 1px; background: #f8fafc; border-bottom: 1px solid var(--gray-200); }
.pr-group-foot { display: grid; align-items: center; gap: 0;
  padding: 8px 1px; background: #fcfcfd; border-top: 1px solid var(--gray-200);
  font-size: 12px; color: var(--gray-500); }
.pr-group-head > *, .pr-group-foot > * { padding-left: 12px; padding-right: 12px; }
.pr-group-head input.pr-group-pick { width: auto; margin: 0; }
.pr-group-title { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.pr-group-name { font-size: 15px; font-weight: 700; color: var(--gray-800);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-group-sum { font-size: 12px; color: var(--gray-500); white-space: nowrap; }
.pr-group-sum b { font-size: 13px; color: var(--gray-800); font-variant-numeric: tabular-nums; }
/* ⚠ flex 子项默认会收缩 ⇒ 按钮文字被压成两行（「查看账 / 户」「整组登记支付（2 笔 · / ¥4,697.50）」）。
   必须 flex:none + nowrap，让按钮保持一行。 */
.pr-group-actions { display: flex; align-items: center; justify-content: flex-end; gap: 6px; flex-wrap: nowrap; }
.pr-group-actions .btn { flex: none; white-space: nowrap; }
.pr-group-foot b { color: var(--gray-800); font-variant-numeric: tabular-nums; }

/* 打款页紧凑表：定宽 + 一律不换行 ⇒ 每行等高、金额列严格对齐 */
.pr-table { min-width: 1040px; }
.pr-table th, .pr-table td { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; vertical-align: middle; }
.pr-table tbody tr:hover { background: #fafbfc; }
.pr-table .pr-sup { font-size: 12px; color: var(--gray-600); }
.pr-table .pr-proj a { font-size: 13px; }
.pr-meta { font-size: 11px; color: var(--gray-400); margin-top: 1px; }
/* 打款页「收款账户」小字行（2026-10-14 buck）：打款时必须能看到钱打到哪个账户，
   不用回【供应商管理】翻。供应商应付（含已支付块）/ 行政支出·公对公 / 等待支付汇总 三处共用同一结构。
   第一行「🏦 户名 · 开户银行」超宽截断（title 给全称）；第二行账号**完整不截断**（要逐位核对），点击即复制。 */
.bank-line { font-size: 11px; line-height: 1.45; margin-top: 3px; color: #475569; min-width: 0; }
.bank-line .bank-ico { margin-right: 3px; }
.bank-line .bank-bank { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.bank-line .bank-acc { display: block; color: #0f172a; font-weight: 600; font-variant-numeric: tabular-nums;
  cursor: pointer; letter-spacing: .3px; }
.bank-line .bank-acc:hover { color: #1d4ed8; text-decoration: underline; }
.bank-line .bank-none { color: #b45309; }
.bank-line-empty { color: #b45309; }
/* 汇总页那种一行式（银行名 + 账号同行） */
.bank-line-compact .bank-bank { display: inline; }
.bank-line-compact .bank-acc { display: inline; margin-left: 6px; }
.pr-table .pr-num { font-variant-numeric: tabular-nums; }
.pr-table .pr-ops { overflow: visible; }
.pr-table .pr-ops .btn + .btn { margin-left: 4px; }
/* 勾选列只有 34px，用表格默认的 12px 内边距会把复选框挤出去（盒宽 34-24=10 < 13） */
.pr-table th:first-child, .pr-table td:first-child { padding-left: 8px; padding-right: 4px; }

/* 【打款】页 · 已完成付款的供应商应付（2026-09-24）
   与上方「还要付钱」的分组卡片用**完全不同的底色**拉开距离：这里是浅绿留痕区，
   上方是石板炭灰 / 深色卡头的操作区。user 原话：「用不同背景色去衬托，这样就不会看上去乱了」。 */
.pr-paid-block { margin-top: 18px; padding: 0; overflow: hidden;
  border: 1px solid #a7f3d0; box-shadow: 0 0 0 1px #a7f3d0, 0 2px 10px rgba(6,95,70,.06); }
.pr-paid-block > .pr-paid-scroll { overflow-x: auto; }
.pr-paid-head { padding: 10px 16px; background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
  border-bottom: 1px solid #a7f3d0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.pr-paid-head b { color: #065f46; font-size: 15px; }
.pr-paid-head .tag { background: #065f46; color: #ecfdf5; }
.pr-paid-sub { color: #047857; font-size: 12px; }
.pr-paid-block .pr-table tbody tr:hover { background: #dcfce7; }
.pr-paid-block .pr-table .pr-sup { color: var(--gray-700); }

/* 【供应商应付】页「已支付」块 · 按项目分组的卡片（2026-09-26）
   ⚠ 改前：7 个项目只有一个近白组头（#f8fafc）+ 4px 细绿边，与淡绿行底（#f0fdf4）亮度几乎相同、
   组间仅 14px，整块连成一片 —— 用户原话「不同项目之间没有明显的分割，很混乱」。
   现在：每个项目一张有边框的卡片，组头换成明显更深的绿、左侧加粗绿脊、底部画分隔线，
   行底改白底，四处叠加把项目边界清楚画出来。仍全部用绿色一系（用户明确不要一红一蓝那种色差）。*/
.pd-proj-wrap { padding: 12px 14px 6px; }
.pd-proj-card { border: 1.5px solid #86efac; border-radius: 10px; overflow: hidden;
  margin-bottom: 16px; background: #fff; box-shadow: 0 1px 3px rgba(15,23,42,.05); }
.pd-proj-card:last-child { margin-bottom: 4px; }
.pd-proj-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 9px 14px; background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
  border-bottom: 1.5px solid #86efac; border-left: 5px solid #16a34a; }
.pd-proj-name { font-size: 14px; font-weight: 700; color: #065f46; min-width: 0; }
.pd-proj-name a { color: #047857; cursor: pointer; text-decoration: none; }
.pd-proj-name a:hover { text-decoration: underline; }
.pd-proj-tag { background: #fff; color: #065f46; border: 1px solid #86efac; }
/* 「流程中」块的项目列：不加粗、不变色，按普通文字显示（仍可点开项目详情）（2026-09-27 buck） */
.pd-plain-link { color: inherit; cursor: pointer; text-decoration: none; }
.pd-plain-link:hover { text-decoration: underline; }
.pd-proj-body { overflow-x: auto; background: #fff; }
/* 卡片内的列表头：跟着卡片走浅绿一系，别再是冷灰蓝，否则一块里出现两种色系显得杂 */
.pd-proj-card .pr-table { background: #fff; }
.pd-proj-card .pr-table th { background: #f0fdf4; color: #047857; border-bottom: 2px solid #86efac; }
.pd-proj-card .pr-table tbody tr:hover { background: #f0fdf4; }

/* 附件预览弹窗（2026-09-26）：缩放条 + Excel 表格 / Word 文档 的页内渲染样式。
   ⚠ 内容是原文档渲染（非截图），放大后保持清晰；全部在同一个模态里，不开新标签。 */
.att-zoom-bar { display: flex; align-items: center; gap: 6px; margin-bottom: 8px; flex-wrap: wrap; }
.att-zoom-val { min-width: 48px; text-align: center; font-size: 12px; font-variant-numeric: tabular-nums; color: #334155; }
.att-doc-scroll { max-height: 72vh; overflow: auto; background: #f1f5f9; border-radius: 6px; padding: 8px; }
/* 「查看凭证 / 查看发票」列里的可悬停预览标签（2026-10-25）
   —— 悬停即出预览浮层（图片 / PDF / Word / Excel），点击打开详情。 */
.reim-hover-chip {
  display: inline-block; max-width: 190px; margin: 1px 3px 1px 0; padding: 1px 7px;
  border: 1px solid #bfdbfe; border-radius: 6px; background: #eff6ff; color: #1d4ed8;
  font-size: 12px; line-height: 1.6; cursor: pointer; vertical-align: middle;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.reim-hover-chip:hover { background: #dbeafe; border-color: #93c5fd; }
.att-xlsx-sheet { background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; margin-bottom: 10px; overflow: auto; }
.att-xlsx-sheet:last-child { margin-bottom: 0; }
.att-xlsx-sheet-name { position: sticky; top: 0; z-index: 1; background: #f1f5f9; border-bottom: 1px solid #e2e8f0; padding: 4px 10px; font-size: 12px; color: #334155; font-weight: 600; }
.att-xlsx-sheet table { border-collapse: collapse; font-size: 13px; }
.att-xlsx-sheet td, .att-xlsx-sheet th { border: 1px solid #e2e8f0; padding: 3px 8px; white-space: nowrap; color: var(--gray-700); }
.att-docx { background: #fff; border: 1px solid #e2e8f0; border-radius: 6px; padding: 18px 22px; font-size: 14px; line-height: 1.75; color: var(--gray-800); word-break: break-word; }
.att-docx img { max-width: 100%; height: auto; }
.att-docx table { border-collapse: collapse; margin: 6px 0; }
.att-docx td, .att-docx th { border: 1px solid #cbd5e1; padding: 4px 8px; }

/* 行内「···」菜单：浮层挂在 <body>（表格的滚动容器会裁掉行内下拉） */
.pr-more-btn { padding: 2px 8px; font-size: 13px; line-height: 1.2; }
.pr-more-btn.open { background: var(--gray-100); border-color: var(--gray-300); }
/* ⚠ position:fixed（视口坐标）而不是 absolute —— 触发按钮由 getBoundingClientRect 取位置，
   页面一旦滚动，absolute 会被解释成「文档坐标」而整体跑偏。配合「任何滚动都收起」见 app.js。 */
.pr-more-pop { position: fixed; z-index: 3000; min-width: 190px; padding: 6px;
  background: #fff; border: 1px solid var(--gray-200); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(15,23,42,.14); }
.pr-more-title { font-size: 11px; color: var(--gray-400); padding: 4px 8px 6px;
  border-bottom: 1px solid var(--gray-100); margin-bottom: 4px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pr-more-item { display: flex; align-items: center; width: 100%; gap: 8px;
  padding: 7px 8px; border: 0; background: transparent; border-radius: 8px;
  font-size: 13px; color: var(--gray-700); text-align: left; cursor: pointer; }
.pr-more-item:hover { background: var(--gray-100); }
.pr-more-n { margin-left: auto; font-size: 11px; color: var(--gray-400); font-variant-numeric: tabular-nums; }
.pr-more-sep { height: 1px; background: var(--gray-100); margin: 4px 0; }
.pr-more-warn { color: #b45309; }
.pr-more-hint { display: block; padding: 6px 8px; font-size: 11px; color: var(--gray-400); }

/* 勾选汇总条：贴在列表最上方，随勾选实时更新（未勾选时整块隐藏） */
.pr-pickbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-bottom: 14px; border: 1px solid #bfdbfe; background: #eff6ff; }
.pr-pickbar-sum { font-size: 14px; color: #1e3a8a; }
.pr-pickbar-sum b { font-size: 15px; color: #1e40af; }

/* ========== 登记支付弹窗（方案 C）：付款前核对卡片 ========== */
/* 老板对着网银付款时，弹窗里要一眼看到三件事：**付给谁、账号多少、多少钱**。
   所以做成两张边界清晰的卡片：① 蓝框核对卡（户名/账号/开户行）② 紫框金额卡（大字号）。 */
.pay-check-card { border: 2px solid #1D4ED8; border-radius: 12px; overflow: hidden; background: #fff; }
.pay-check-head { background: #1D4ED8; color: #fff; font-size: 12px; font-weight: 600; padding: 8px 14px; display: flex; align-items: center; gap: 8px; }
.pay-check-rows { padding: 4px 0; }
.pay-check-row { display: flex; align-items: center; gap: 10px; padding: 7px 14px; }
.pay-check-row + .pay-check-row { border-top: 1px dashed #dbeafe; }
.pay-check-k { flex: none; width: 52px; font-size: 12px; color: #64748b; }
.pay-check-v { flex: 1; min-width: 0; font-size: 17px; font-weight: 700; color: #0f172a; letter-spacing: .5px;
  font-variant-numeric: tabular-nums; word-break: break-all; }
.pay-check-row .btn { flex: none; }
.pay-check-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 14px; background: #EFF6FF; border-top: 1px solid #bfdbfe; }
.pay-check-amt { margin-left: auto; font-size: 12px; color: #1e3a8a; display: inline-flex; align-items: center; gap: 2px; }
.pay-check-amt b { font-size: 17px; color: #1D4ED8; font-variant-numeric: tabular-nums; }
/* 供应商尚未登记银行账户：琥珀警示卡（仍不阻断登记） */
.pay-warn-card { border: 2px solid #f59e0b; border-radius: 12px; overflow: hidden; background: #fffbeb; }
.pay-warn-head { background: #f59e0b; color: #fff; font-size: 12px; font-weight: 600; padding: 8px 14px; }
.pay-warn-body { padding: 10px 14px; font-size: 12px; color: #92400e; line-height: 1.7; }

/* 供应商 + 本次应付合计：**石板炭灰**框卡片，金额 30px（与列表卡片同一套配色语言，方案 A） */
.pay-sum-card { border: 2px solid #334155; border-radius: 12px; overflow: hidden; margin-bottom: 12px; background: #fff; }
.pay-sum-head { background: linear-gradient(135deg, #1F2937 0%, #111827 100%); color: #fff;
  padding: 10px 14px; display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pay-sum-head b { font-size: 16px; color: #fff; }
.pay-sum-head .tag { background: rgba(255,255,255,.24); color: #fff; }
.pay-sum-sub { font-size: 12px; color: rgba(255,255,255,.86); }
.pay-sum-body { padding: 12px 14px; background: #F1F5F9; display: flex; align-items: flex-end; gap: 18px; flex-wrap: wrap; }
.pay-sum-label { font-size: 12px; color: #334155; }
.pay-sum-amt { font-size: 30px; font-weight: 700; color: #111827; line-height: 1.15; font-variant-numeric: tabular-nums; }
/* 金额 + 复制按钮同一行（2026-10-10 buck：户名/账号/开户行都有复制，金额也要有）。
   ⚠ 按钮**不能放进 `.pay-sum-amt` 里面** —— 那个元素的 textContent 必须保持纯金额：
   有的回归脚本按 `textContent === '¥N.NN'` 精确匹配它来量字号（`ui-check-payrun-ui-compact` ⑦c），
   按钮文本混进去会让它一条都匹配不到。所以外面再包一层做 flex 布局。 */
.pay-sum-amtrow { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
/* 金额旁的「复制」：跟数字同一基线、不喧宾夺主 */
.pay-copy-amt { font-size: 12px; padding: 2px 8px; flex: none;
  border-color: #cbd5e1; color: #334155; background: #fff; }
.pay-copy-amt:hover { background: #F1F5F9; border-color: #94a3b8; }
.pay-sum-side { font-size: 12px; color: #6b7280; padding-bottom: 3px; }
/* 多笔明细：卡片内的小表（去掉外框，避免与卡片边框打架） */
.pay-sum-lines { margin-bottom: 12px; border: 1px solid #E2E8F0; border-radius: 10px; overflow: hidden; }
.pay-sum-lines .table { border: 0; }
.pay-sum-lines .table th { background: #F1F5F9; }

@media (max-width: 780px) {
  .pr-group-actions { justify-content: flex-start; flex-wrap: wrap; }
  .pr-pickbar { flex-direction: column; align-items: flex-start; }
}

/* ========== 通知：类型标签 / 「去处理」 / 定位后高亮闪烁（2026-09-24）==========
   背景：以前点通知只会跳到一个大列表，用户不知道「我是因为哪一条才来到这个页面」。
   现在点通知会滚到那一行并闪烁 3 秒左右（.focus-flash），类型标签让人一眼知道这条是什么事。 */
.notif-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.notif-head .notif-title { margin-bottom: 0; }
.notif-chip {
  flex: 0 0 auto; font-size: 11px; font-weight: 600; line-height: 1.7;
  padding: 0 8px; border-radius: 999px; white-space: nowrap;
}
.notif-go {
  flex: 0 0 auto; margin-left: auto; font-size: 12px; font-weight: 600;
  color: var(--primary, #7c3aed); white-space: nowrap; opacity: .82;
}
.notif-item:hover .notif-go,
.notif-row:hover .notif-go { opacity: 1; }

@keyframes focusFlashPulse {
  0%, 100% { outline-color: rgba(245, 158, 11, 0); box-shadow: 0 0 0 0 rgba(245, 158, 11, 0); background-color: transparent; }
  10%, 50%, 90% { outline-color: #f59e0b; box-shadow: 0 0 0 3px rgba(245, 158, 11, .38); background-color: #fef3c7; }
  30%, 70% { outline-color: rgba(245, 158, 11, .5); box-shadow: 0 0 0 1px rgba(245, 158, 11, .22); background-color: #fffbeb; }
}
/* ⚠ 用 outline + box-shadow 双通道：outline 在 table row / div 上都可靠渲染，
   box-shadow 负责卡片类目标（卡片边框是物理 1px，不能靠改 border 高亮）。 */
.focus-flash {
  outline: 3px solid transparent;
  outline-offset: -3px;
  animation: focusFlashPulse 1.7s ease-in-out 2;
  scroll-margin-top: 90px;
  position: relative;
  z-index: 5;
}
@media (prefers-reduced-motion: reduce) {
  .focus-flash { animation: none; outline-color: #f59e0b; background-color: #fef3c7; }
}
@media (max-width: 768px) {
  .notif-go { display: none; }
  .focus-flash { scroll-margin-top: 60px; }
}

/* ===== 行政支出页：三个状态分区（2026-09-29 buck）=====
   ⚠ 原来那条**吸底常驻**的打包条已删除 —— buck 明确不喜欢跟着滚动固定在下方的显示方式；
   「一键勾选 / 打包」现在长在【状态一 · 待打包】的区块头里（紧贴人名下方）。
   这里只保留打包对话框里用的「够不够」结论条。 */
.ae-pack-status { border-radius: 8px; padding: 9px 12px; font-size: 13px; line-height: 1.65; }
.ae-pack-status.ok { background: #f0fdf4; border: 1px solid #a7f3d0; color: #065f46; }
.ae-pack-status.bad { background: #fffbeb; border: 1px solid #fde68a; color: #92400e; }

/* ===== 仪表盘 v2（buck 2026-09-30）=====
   ① 六个格子固定一行；② 配色收敛：灰＝信息、琥珀＝要你处理（只有两种语义）；
   ③ 待审批事项最显眼；④ 通知大框可上下滚动。 */
.stats-grid.stats-grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 1280px) { .stats-grid.stats-grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px)  { .stats-grid.stats-grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* 统计卡只留两种：flat＝中性信息（钱）；alert＝需要注意（未收/未归档） */
.stat-card.flat  { --sc-band: #64748b; }
.stat-card.alert { --sc-band: #f59e0b; }

/* 待审批事项（仪表盘最上面、唯一强调块） */
.dash-todo-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; padding: 12px 16px 16px; }
.dash-todo-item { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  background: #fff; border: 1px solid #fde68a; border-radius: 10px; padding: 8px 12px; }
.dash-todo-item .k { font-size: 13px; font-weight: 600; color: #78350f; }
@media (max-width: 900px) { .dash-todo-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .dash-todo-grid { grid-template-columns: 1fr; } }

/* 通知大框：固定高度 + 可上下滚动（拖滚动条浏览），条目沿用 .notif-item 既有样式 */
.dash-notif-box { max-height: 340px; overflow-y: auto; padding: 6px 8px 10px; border-top: 1px solid var(--gray-100, #f1f5f9); }
.dash-notif-box::-webkit-scrollbar { width: 10px; }
.dash-notif-box::-webkit-scrollbar-thumb { background: #cbd5e1; border-radius: 6px; }
.dash-notif-box::-webkit-scrollbar-thumb:hover { background: #94a3b8; }

/* ===== AI 助手 / 指令台（buck 2026-09-30）=====
   聊天式：消息流 + 底部输入框；预览卡独立成行（确认后才落库）。 */
.ai-wrap { display: flex; flex-direction: column; height: calc(100vh - 200px); min-height: 420px; }
.ai-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; background: #fff; border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: var(--radius, 10px); margin-bottom: 10px; }
.ai-log { flex: 1; overflow-y: auto; background: #fff; border: 1px solid var(--gray-200, #e2e8f0);
  border-radius: var(--radius, 10px); padding: 14px; }
.ai-msg { display: flex; gap: 8px; margin-bottom: 12px; }
.ai-msg.user { justify-content: flex-end; }
.ai-avatar { width: 26px; height: 26px; border-radius: 50%; background: #e2e8f0; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 14px; }
.ai-bubble { max-width: 76%; padding: 9px 12px; border-radius: 10px; font-size: 13px; line-height: 1.75;
  white-space: pre-wrap; word-break: break-word; }
.ai-msg.bot .ai-bubble { background: #f1f5f9; color: #0f172a; border: 1px solid #e2e8f0; }
.ai-msg.user .ai-bubble { background: var(--primary, #6366f1); color: #fff; }
.ai-opts { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.ai-input-row { display: flex; gap: 8px; margin-top: 10px; }
.ai-input-row input { flex: 1; }
/* 预览卡：确认前不落库 */
.ai-preview { border: 1px solid #cbd5e1; border-radius: 10px; overflow: hidden; background: #fff; }
.ai-preview-head { background: #f8fafc; padding: 8px 12px; font-size: 12px; font-weight: 600;
  color: #475569; border-bottom: 1px solid #e2e8f0; }
.ai-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 12px; }
.ai-grid label { display: block; font-size: 11px; font-weight: 600; color: #64748b; margin-bottom: 3px; }
.ai-grid input, .ai-grid select { width: 100%; }
.ai-preview-foot { padding: 10px 12px; border-top: 1px solid #e2e8f0; background: #f8fafc;
  display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
@media (max-width: 720px) {
  .ai-grid { grid-template-columns: 1fr; }
  .ai-bubble { max-width: 88%; }
  .ai-wrap { height: calc(100vh - 240px); }
}

/* AI 助手导航项上的「待补全速记」角标（buck 2026-09-30）
   仪表盘是主管专属 ⇒ 员工靠这个角标 + 通知中心被提醒「还有几笔等着补」。 */
.nav-item .nav-count { margin-left: auto; flex: none; min-width: 18px; padding: 0 5px;
  border-radius: 9px; background: #a78bfa; color: #fff; font-size: 11px; line-height: 18px;
  text-align: center; }

/* 移动端体验（buck 2026-09-30，「在微信里打开页面记账」需要手机端顺手）
   ⚠ iOS Safari 上输入框 font-size < 16px ⇒ 一聚焦就自动放大整个页面，非常难看且难退回。
   所以窄屏统一把表单控件抬到 16px。 */
@media (max-width: 768px) {
  input:not([type="checkbox"]):not([type="radio"]), select, textarea { font-size: 16px; }
}

/* ===== 打款页 · 等待支付汇总（2026-10-08 buck；同日第二版：每块独立底色+框线）===== */
/* 汇总页 = 若干**独立色块**（不是一张大卡里排分隔线）。每块由 .sum-b-<key> 提供三个变量：
   --sum-accent(框线/色条) / --sum-head(卡头底色) / --sum-bg(卡体底色)。 */
.sum-wrap { display: flex; flex-direction: column; gap: 14px; }
.sum-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 2px 2px 0; }
.sum-toptitle { font-size: 16px; color: #1e293b; }
.sum-toptotal { font-size: 14px; font-weight: 700; color: #3730a3; background: #eef2ff; border: 1px solid #c7d2fe; border-radius: 999px; padding: 2px 10px; }

.sum-block { border: 2px solid var(--sum-accent); border-left-width: 6px; border-radius: 10px;
  background: var(--sum-bg); overflow: hidden; }
.sum-bhead { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; padding: 10px 14px;
  background: var(--sum-head); border-bottom: 1px solid var(--sum-accent); }
.sum-bicon { font-size: 16px; }
.sum-btitle { font-size: 15px; color: var(--sum-accent); }
.sum-bcount { font-size: 12px; font-weight: 700; color: #fff; background: var(--sum-accent);
  border-radius: 999px; padding: 1px 9px; }
.sum-btotal { font-size: 14px; color: #0f172a; }
.sum-bsub { font-size: 12.5px; color: #64748b; }
.sum-bbody { background: rgba(255,255,255,.72); }
.sum-empty { padding: 13px 16px; font-size: 13px; color: #94a3b8; }
/* 「上会费暂不出账」说明条（2026-10-14）：不计入合计，但要如实报出来 */
.sum-hold-note { margin-top: 8px; padding: 8px 13px; background: #fffbeb; border: 1px solid #fde68a;
  border-left: 4px solid #f59e0b; border-radius: 8px; font-size: 12.5px; line-height: 1.7; color: #92400e; }
.sum-hold-note b { color: #78350f; }

/* five blocks: 各自一种颜色 */
.sum-b-stuck   { --sum-accent:#d97706; --sum-head:#fffbeb; --sum-bg:#fffbeb; }
.sum-b-sup     { --sum-accent:#dc2626; --sum-head:#fef2f2; --sum-bg:#fff7f7; }
.sum-b-reim    { --sum-accent:#16a34a; --sum-head:#f0fdf4; --sum-bg:#f7fef9; }
.sum-b-tripfee { --sum-accent:#7c3aed; --sum-head:#f5f3ff; --sum-bg:#fbfaff; }
.sum-b-ae      { --sum-accent:#0891b2; --sum-head:#ecfeff; --sum-bg:#f7feff; }

/* 条目行 */
.sum-row { display: flex; align-items: center; gap: 10px; padding: 9px 14px;
  border-bottom: 1px dashed #e2e8f0; cursor: pointer; background: transparent; }
.sum-row:last-child { border-bottom: none; }
.sum-row:hover { background: #f1f5f9; }
.sum-tag { flex: none; font-size: 11px; font-weight: 600; border-radius: 4px; padding: 2px 7px; }
.sum-main { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.4; }
.sum-main > b { font-size: 13.5px; color: #0f172a; }
.sum-amt { flex: none; font-weight: 700; font-size: 13.5px; color: #0f172a; }
.sum-acts { flex: none; display: flex; gap: 6px; }
.sum-detail { background: #f8fafc; border-top: 1px dashed #e2e8f0; padding: 2px 0; }
.sum-dline { display: flex; align-items: center; gap: 10px; padding: 5px 14px 5px 30px;
  font-size: 12.5px; color: #334155; border-bottom: 1px dashed #e2e8f0; }
.sum-dline:last-child { border-bottom: none; }
.sum-dline > span:nth-child(2) { flex: 1; min-width: 0; }
.sum-damt { flex: none; font-weight: 600; }

/* 员工报销：一个报销人一个框，默认折叠（点框头展开） */
.sum-person { border-bottom: 1px solid #dcfce7; }
.sum-person:last-child { border-bottom: none; }
.sum-phead { display: flex; align-items: center; gap: 9px; padding: 10px 14px; cursor: pointer; }
.sum-phead:hover { background: #f0fdf4; }
.sum-caret { flex: none; width: 12px; color: #16a34a; font-size: 12px; }
.sum-pav { flex: none; width: 24px; height: 24px; border-radius: 50%; background: #16a34a; color: #fff;
  font-size: 12.5px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.sum-pname { font-size: 14px; color: #0f172a; }
.sum-pcount { font-size: 12px; font-weight: 600; color: #065f46; background: #dcfce7; border-radius: 999px; padding: 1px 9px; }
.sum-ptotal { font-size: 14px; color: #0f172a; }
.sum-pbody { background: rgba(255,255,255,.6); border-top: 1px dashed #bbf7d0; }

/* ===== 打款页 · 公对公转账：待支付 / 已支付 两个独立区块 ===== */
.cmp-sec { margin-top: 12px; border: 1px solid var(--gray-200); border-radius: var(--radius); overflow: hidden; }
.cmp-sec-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; padding: 9px 13px; font-size: 13.5px; }
.cmp-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; }
.cmp-num { font-size: 12px; color: #475569; background: #ffffffcc; border-radius: 999px; padding: 1px 8px; }
.cmp-sum { font-weight: 700; }
/* 待支付：琥珀（需要动手）；已支付：绿（已成事实） */
.cmp-wait { border-left: 5px solid #f59e0b; }
.cmp-wait .cmp-sec-head { background: #fffbeb; color: #92400e; }
.cmp-wait .cmp-dot { background: #f59e0b; }
.cmp-wait tbody tr.cmp-wait-row { background: #fffdf5; }
.cmp-done { border-left: 5px solid #16a34a; }
.cmp-done .cmp-sec-head { background: #f0fdf4; color: #065f46; }
.cmp-done .cmp-dot { background: #16a34a; }
.cmp-done tbody tr.cmp-paid-row { background: #fbfefc; }
.cmp-done tbody tr.cmp-paid-row td { color: #64748b; }

/* 项目详情页标签上的「待我处理」红点（2026-10-08：项目经理抱怨审批只能靠通知找） */
.pd-op-warn { display: inline-block; min-width: 20px; padding: 1px 6px; border-radius: 999px;
  background: #dc2626; color: #fff; font-size: 12px; font-style: normal; font-weight: 700; text-align: center; }
