/* =============================================================
 * 个人工作台 · 完整视觉重做 v4
 * 设计语言：白底深色强调 / 紫主+橙辅+绿点 / 16px 字体阶 / 软阴影
 * 不改任何业务 ID / class，业务代码零侵入。
 * ============================================================= */

/* ★ 全局兜底：[hidden] 必须真的隐藏。
   本项目是作者样式表，只要任何类给了 display（如 .grid2{display:grid}、
   .modal{display:flex}），就会**盖过浏览器内置的 [hidden]{display:none}**，
   于是 JS 里 el.hidden=true 完全不生效——「改了 JS 却看不到效果」的经典坑
   （派车信息表单曾因此永远铺满 614px 高）。这条规则一次性根治，
   下方那些逐选择器的 *[hidden] 补丁可保留（冗余无害），新增元素不必再补。 */
[hidden] { display: none !important; }

:root {
  /* ---- 主色：深紫蓝（专业 + 不死板）---- */
  --pri: #5b5ff7;        /* 主色按钮、tab 高亮 */
  --pri2: #7c5cf9;       /* 渐变终点色（曾漏定义，导致 active 渐变整条失效=白字白底）*/
  --pri-d: #4548d9;
  --pri-l: #eef0ff;      /* 浅底，hover/focus */
  --pri-t: rgba(91,95,247,.12);

  /* ---- 辅色 ---- */
  --acc: #ff7849;        /* 警示/紧迫：橙色 */
  --acc-l: #fff3ec;
  --ok: #11b981;         /* 成功/正常：翠绿 */
  --ok-l: #e7f9f3;
  --warn: #f59e0b;       /* 黄：即将到期 */
  --warn-l: #fef3c7;
  --err: #ec4b4b;        /* 红：逾期/危险 */
  --err-l: #ffe8e8;
  --info: #38bdf8;       /* 青蓝：信息 */
  --info-l: #e0f4fe;

  /* ---- 中性 ---- */
  --bg: #f4f6fb;         /* 页面背景 */
  --bg2: #fafbfd;        /* 卡片内部背景 */
  --line: #dfe5ee;       /* 主分割（更深）*/
  --line2: #eaeff5;      /* 次分割（更深，对比 +18%）*/
  --txt: #1c2430;        /* 主文字 */
  --txt2: #3f4a5c;       /* 次文字（更深，对比 +25%）*/
  --txt3: #6b7787;       /* 辅文字（更深，对比 +35%）*/
  --white: #fff;

  /* ---- 形状/阴影 ---- */
  --r: 16px;             /* 卡片圆角（更大更现代） */
  --r-sm: 10px;
  --r-xs: 6px;
  --r-lg: 22px;
  --sh:     0 1px 2px rgba(16,24,40,.04), 0 4px 12px rgba(16,24,40,.04);
  --sh2:    0 8px 24px rgba(16,24,40,.08);
  --sh-h:   0 10px 28px rgba(91,95,247,.18);
  --sh-acc: 0 10px 28px rgba(255,120,73,.18);
  --sh-ok:  0 10px 28px rgba(17,185,129,.18);

  /* ---- 尺寸 ---- */
  --topbar-h: 72px;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--txt);
  font-size: 14.5px;
  line-height: 1.55;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
               "Hiragino Sans GB", "Microsoft YaHei", Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  display: flex; flex-direction: column; min-height: 100vh;
}

button { font-family: inherit; }

h1,h2,h3,h4 { margin: 0; color: var(--txt); letter-spacing: -.01em; }
h1 { font-size: 26px; line-height: 1.25; font-weight: 700; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 600; }
h4 { font-size: 14.5px; font-weight: 600; }

input, select, textarea { font-family: inherit; font-size: 14.5px; color: var(--txt); }

a { color: var(--pri); }

/* ============================ TOPBAR ============================ */

.topbar {
  position: sticky; top: 0; z-index: 50;
  height: var(--topbar-h);
  display: flex; align-items: center;
  padding: 0 28px;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(180%) blur(16px);
  -webkit-backdrop-filter: saturate(180%) blur(16px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 2px 12px rgba(28,36,48,.06);
}
.brand { display: flex; align-items: center; gap: 12px; min-width: 200px; }
.lb-short { display: none; }
.logo {
  width: 38px; height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, var(--pri) 0%, #8b5cf6 60%, #ec4899 100%);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 800; font-size: 15px;
  box-shadow: 0 4px 14px rgba(91,95,247,.36);
  letter-spacing: -.02em;
}
.brand-txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand-txt b { font-size: 15px; font-weight: 700; color: var(--txt); }
.brand-txt small { font-size: 11.5px; color: var(--txt3); margin-top: 1px; }

/* tabs: 大圆角药丸，active 填充主色 + 加图标 + 加宽 */
.tabs {
  display: flex; gap: 6px;
  margin-left: 28px;
  padding: 6px;
  background: #eaeff5;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.06);
  backdrop-filter: saturate(180%) blur(8px);
}
.tab {
  position: relative;
  border: 0; background: transparent; cursor: pointer;
  padding: 10px 28px; min-width: 140px; min-height: 44px;
  font-size: 15px; font-weight: 700;
  color: var(--txt2); border-radius: 13px;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  display: flex; align-items: center; justify-content: center; gap: 9px;
  letter-spacing: 0;
}
.tab .t-icon {
  width: 18px; height: 18px;
  opacity: 0.85;
  transition: opacity .2s, transform .2s;
  flex-shrink: 0;
}
.tab:hover {
  color: var(--txt);
  background: rgba(255,255,255,0.85);
  transform: translateY(-1px);
}
.tab:hover .t-icon { opacity: 1; }
.tab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--pri) 0%, var(--pri2) 100%);
  box-shadow: 0 8px 22px rgba(91,95,247,0.55),
              0 0 0 1px rgba(91,95,247,0.25) inset;
  transform: translateY(-1px);
}
.tab.active .t-icon {
  opacity: 1;
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.22)) brightness(1.15);
  transform: scale(1.06);
}
.tab.active::after {
  content: '';
  position: absolute;
  bottom: -8px; left: 50%; transform: translateX(-50%);
  width: 36px; height: 4px; border-radius: 3px;
  background: linear-gradient(90deg, var(--pri), var(--pri2));
  box-shadow: 0 0 18px rgba(91,95,247,0.7);
}

.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; }
.badge {
  font-size: 11.5px; font-weight: 600;
  padding: 4px 10px; border-radius: 999px;
  background: var(--ok-l); color: var(--ok);
}
.badge.warn { background: var(--warn-l); color: #b87a00; }
.badge.err  { background: var(--err-l); color: var(--err); }

/* ============================ BUTTONS ============================ */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  border: 0; cursor: pointer;
  padding: 10px 18px; min-height: 40px;
  font-size: 14px; font-weight: 600;
  border-radius: var(--r-sm);
  background: var(--white); color: var(--txt);
  border: 1px solid var(--line);
  transition: all .15s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--sh2); border-color: #d3dae5; }
.btn:active { transform: translateY(0); }
.btn.sm { padding: 6px 12px; min-height: 32px; font-size: 13px; }
.btn.xs { padding: 3px 8px; min-height: 24px; font-size: 11px; border-radius: 6px; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--txt2); }
.btn.ghost:hover { background: var(--line2); color: var(--txt); box-shadow: none; transform: none; }
.btn.danger { color: var(--err); }
.btn.danger:hover { background: var(--err-l); border-color: transparent; box-shadow: none; transform: none; }
.btn.primary {
  color: #fff;
  background: linear-gradient(135deg, var(--pri) 0%, #6e72ff 100%);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(91,95,247,.30);
}
.btn.primary:hover { box-shadow: var(--sh-h); transform: translateY(-1px); }
.btn.acc {
  color: #fff;
  background: linear-gradient(135deg, #ff8a5a 0%, var(--acc) 100%);
  border-color: transparent;
  box-shadow: 0 6px 18px rgba(255,120,73,.30);
}
.btn.acc:hover { box-shadow: var(--sh-acc); }

/* ============================ LAYOUT ============================ */

.layout { display: flex; flex: 1 1 auto; min-height: 0; }

/* 侧栏：仅工作 tab 用，已被 html[data-tab=work] CSS 控制（默认隐藏） */
.sidebar {
  width: 268px; flex: none;
  background: var(--white);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  padding: 18px 14px 14px;
  overflow: auto;
}
.menu-toggle { display: none; }
.sidebar-mask { display: none; }
/* ===== 移动端（≤768px）：侧栏变抽屉，汉堡按钮开关 ===== */
@media (max-width: 768px) {
  .menu-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 42px; height: 42px; margin-right: 2px;
    border: 0; background: transparent; color: var(--txt); cursor: pointer; border-radius: 10px;
  }
  .menu-toggle:active { background: var(--bg2); }
  .topbar { gap: 6px; }
  .sidebar {
    position: fixed; top: var(--topbar-h); left: 0; bottom: 0;
    width: 84%; max-width: 320px; z-index: 90;
    transform: translateX(-100%);
    transition: transform .26s cubic-bezier(.2,.8,.3,1);
    box-shadow: 0 16px 40px rgba(16,24,40,.30);
    padding-top: 14px;
  }
  .layout.sidebar-open .sidebar { transform: translateX(0); }
  .sidebar-mask {
    display: block; position: fixed; inset: var(--topbar-h) 0 0 0; z-index: 80;
    background: rgba(16,24,40,.40); opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
  }
  .layout.sidebar-open .sidebar-mask { opacity: 1; pointer-events: auto; }
  .main { width: 100%; }
}
html[data-tab="home"] .sidebar,
html[data-tab="life"] .sidebar { display: none !important; }

.side-head h3 { font-size: 11px; font-weight: 700; color: var(--txt3); letter-spacing: .08em; text-transform: uppercase; padding: 0 8px 10px; margin: 0; }
/* 去壳后侧栏顶部的「新建报销单」大按钮 */
.side-newdoc {
  width: 100%; display: flex; align-items: center; justify-content: center;
  gap: 6px; margin: 0 0 12px; padding: 11px 12px;
  font-size: 14px; font-weight: 700; border-radius: var(--r-sm);
}
.side-nav { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 6px; }
.side-nav-btn {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 10px; border-radius: var(--r-sm);
  cursor: pointer;
  transition: all .15s;
  border: 1px solid transparent;
  position: relative;
}
.side-nav-btn:hover { background: var(--bg); border-color: var(--line); }
.side-nav-btn.active {
  background: #dde1ff;
  border-color: rgba(91,95,247,.4);
  box-shadow: 0 4px 10px rgba(91,95,247,.18);
}
.side-nav-btn.active::before {
  content: ''; position: absolute; left: -14px; top: 10%; bottom: 10%;
  width: 4px; border-radius: 0 3px 3px 0;
  background: linear-gradient(180deg, var(--pri), #8b5cf6);
}
.side-nav-btn.active .sn-main b { color: var(--pri-d); }
.sn-ic {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, var(--pri-l) 0%, #e9e7ff 100%);
  color: var(--pri); flex: none;
}
.side-nav-btn[data-side="todos"] .sn-ic { background: linear-gradient(135deg, var(--acc-l) 0%, #ffe4d6 100%); color: var(--acc); }
.sn-ic svg { width: 20px; height: 20px; }
.sn-main { flex: 1; min-width: 0; line-height: 1.25; }
.sn-main b { font-size: 14.5px; font-weight: 700; color: var(--txt); }
.sn-main small {
  display: block; font-size: 11.5px; color: var(--txt2); margin-top: 1px;
  /* 加号放大后这一列被挤窄，小字必须单行省略 —— 否则会掉一个「单」字到第二行 */
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sn-cnt {
  font-size: 11px; font-weight: 700;
  min-width: 22px; height: 22px;
  border-radius: 999px; padding: 0 7px;
  background: var(--line2); color: var(--txt2);
  display: inline-flex; align-items: center; justify-content: center;
}
.side-nav-btn.active .sn-cnt { background: var(--pri); color: #fff; }
.side-nav-btn[data-side="todos"].active .sn-cnt { background: var(--acc); }
/* 新建入口：就是侧栏每个功能模块最右侧那个加号。
   主区顶部原来的「+ 新建报销单」按钮已去掉，新建统一从这里进，
   所以加号做得大一点、带底色，一眼能看出是个按钮。 */
.sn-add {
  width: 36px; height: 36px; border-radius: 11px;
  background: linear-gradient(135deg, var(--pri-l) 0%, #dfe4ff 100%);
  color: var(--pri);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 23px; font-weight: 700; line-height: 1;
  padding-bottom: 1px;                 /* 加号字形偏下，抬 1px 视觉居中 */
  flex: none;
  box-shadow: inset 0 0 0 1px rgba(79,110,247,.30), 0 1px 2px rgba(79,110,247,.12);
  cursor: pointer;
  transition: background .15s, color .15s, transform .15s, box-shadow .15s;
}
/* 当前选中的模块整行是淡蓝底，浅色加号会被「吃掉」——选中态改成白底浮起来 */
.side-nav-btn.active .sn-add {
  background: #fff;
  box-shadow: 0 2px 6px rgba(79,110,247,.22), inset 0 0 0 1px rgba(79,110,247,.35);
}
.side-nav-btn[data-side="todos"] .sn-add {
  background: linear-gradient(135deg, #fff1e9 0%, #ffe0cf 100%);
  color: var(--acc);
  box-shadow: inset 0 0 0 1px rgba(255,125,74,.32), 0 1px 2px rgba(255,125,74,.12);
}
.side-nav-btn[data-side="todos"].active .sn-add {
  background: #fff;
  box-shadow: 0 2px 6px rgba(255,125,74,.22), inset 0 0 0 1px rgba(255,125,74,.38);
}
/* 悬停统一压在最底下：选择器比上面的 .active 规则更具体，保证悬停一定变实心 */
.side-nav-btn .sn-add:hover {
  background: var(--pri); color: #fff; transform: scale(1.06);
  box-shadow: 0 3px 8px rgba(79,110,247,.40);
}
.side-nav-btn[data-side="todos"] .sn-add:hover {
  background: var(--acc); color: #fff;
  box-shadow: 0 3px 8px rgba(255,125,74,.40);
}
.side-nav-btn[data-side] .sn-add:active { transform: scale(.97); }
.side-foot { margin-top: auto; padding-top: 14px; }

/* ---- 侧栏报销单列表（去壳后直接平铺，不再收起）----
   原来挂在「差旅报销单」导航项下面、点开才显示；2026-09-22 去壳后
   「+ 新建报销单」大按钮置顶，列表常驻其下。 */
.side-doc-list {
  display: flex; flex-direction: column; gap: 2px;
  padding: 2px 0 8px; margin: 0;
  max-height: calc(100vh - 320px); overflow-y: auto;   /* 单据多时侧栏不至于无限长 */
}
.sdl-item {
  display: flex; flex-direction: column; gap: 1px;
  padding: 6px 9px 7px; border-radius: 7px; cursor: pointer;
  font-size: 12.5px; color: var(--txt2);
  transition: background .14s, color .14s;
}
.sdl-item:hover { background: var(--bg2); color: var(--txt); }
.sdl-item.active { background: rgba(91,95,247,.13); color: var(--pri-d); }
.sdl-item.active .sdl-name { font-weight: 600; }
.sdl-l1 { display: flex; align-items: center; gap: 7px; white-space: nowrap; overflow: hidden; }
.sdl-l2 {
  display: flex; align-items: center; gap: 4px;
  font-size: 11px; color: var(--txt3); line-height: 1.5;
  padding-left: 12px;                       /* 与上行圆点+间距对齐 */
  white-space: nowrap; overflow: hidden;
}
/* 「时间 · 地点 · 制表人」：地点是弹性段，太长先省略；时间和制表人固定不截断 */
.sdl-l2 .sdl-when, .sdl-l2 .sdl-who { flex: none; }
.sdl-l2 .sdl-where { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sdl-l2 .sdl-sep { flex: none; opacity: .5; }
.sdl-item.active .sdl-l2 { color: var(--pri); opacity: .8; }
.sdl-l2 .dash { opacity: .55; }
.sdl-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: currentColor; opacity: .45; flex: none;
}
.sdl-name { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.sdl-n { flex: none; font-size: 11px; opacity: .65; font-variant-numeric: tabular-nums; }
/* 展开态：给功能块一点视觉反馈，用户能看出"这里可以点开" */
.side-nav-btn.expanded { background: var(--white); border-color: var(--pri); }
.tip { font-size: 11.5px; color: var(--txt3); line-height: 1.6; }

/* MAIN 区域 */
.main {
  flex: 1; overflow: auto;
  padding: 22px 32px 64px;
  min-width: 0;
}
html[data-tab="home"] .main { padding: 24px 40px 80px; }
html[data-tab="life"] .main { padding: 24px 32px 80px; }

.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ⚠️ 必须保留这两条！这是报销单编辑区「①②③④⑤ 步骤条」真正生效的地方。
   曾因这里缺了 .pane 规则，5 个面板全部以 display:block 平铺在页面上
   （pane-basic 1180px + attach 2541px + amounts 623px + preview 1071px + export 607px 首尾相接），
   .active 类完全不起作用：点步骤条只有高亮变了、画面纹丝不动 → 用户反馈「按钮无反应」。 */
.pane { display: none; }
.pane.active { display: block; }

/* ============================ GLOBAL TODAY ============================ */

.global-today {
  position: sticky; top: var(--topbar-h); z-index: 40;
  margin: 0; padding: 10px 28px;
  background: linear-gradient(180deg, rgba(17,185,129,.06) 0%, rgba(17,185,129,0) 100%);
  border-bottom: 1px solid var(--line);
  display: none;
}
.global-today.has { display: block; }
.gt-row { display: flex; align-items: center; gap: 12px; max-width: 1280px; margin: 0 auto; flex-wrap: wrap; }
.gt-row > .gt-label {
  font-size: 12px; font-weight: 700; color: var(--ok); letter-spacing: .04em;
  padding: 4px 10px; border-radius: 999px; background: var(--ok-l);
  flex: none;
}
.global-today.has-items.gt-warn > .gt-row > .gt-label { background: var(--warn-l); color: #b87a00; }
.global-today.gt-err > .gt-row > .gt-label { background: var(--err-l); color: var(--err); }
.gt-item {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: var(--white); border: 1px solid var(--line);
  font-size: 13px;
}
.gt-item.gt-overdue { border-color: var(--err); background: var(--err-l); color: var(--err); font-weight: 600; }
.gt-item .gt-quick {
  border: 0; background: transparent; cursor: pointer;
  color: inherit; font-weight: 700;
  padding: 0; margin-left: 4px;
}
.gt-calm { color: var(--txt2); font-size: 13px; display: inline-flex; align-items: center; gap: 6px; }
.gt-calm .ck-mark { color: var(--ok); font-weight: 700; }

/* ============================ HOME PAGE ============================ */

.home-wrap { max-width: 1280px; margin: 0 auto; padding: 6px 4px 28px; }

.home-hero {
  position: relative;
  display: flex; align-items: center; gap: 20px;
  padding: 28px 32px;
  margin-bottom: 24px;
  background:
    radial-gradient(circle at 90% 0%, rgba(91,95,247,.16), transparent 60%),
    radial-gradient(circle at 100% 100%, rgba(255,120,73,.10), transparent 60%),
    linear-gradient(135deg, #ffffff 0%, #fafbff 100%);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh);
  overflow: hidden;
}
.home-hero::after {
  content: '';
  position: absolute; right: -40px; top: -40px;
  width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(91,95,247,.10) 0%, transparent 70%);
  border-radius: 50%;
  pointer-events: none;
}
.home-avatar {
  width: 64px; height: 64px; border-radius: 50%;
  background: linear-gradient(135deg, var(--pri) 0%, #8b5cf6 100%);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 22px rgba(91,95,247,.36);
  flex: none;
}
.home-avatar svg { width: 32px; height: 32px; color: #fff; }
.home-hero h1 { font-size: 26px; font-weight: 700; }
.home-hero p { margin: 4px 0 0; color: var(--txt2); font-size: 14px; }
.home-hero .hero-actions { margin-left: auto; display: flex; gap: 10px; position: relative; z-index: 1; }

/* stat-row 卡片 */
.stat-row {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px; margin-bottom: 24px;
}
.stat-card {
  display: flex; align-items: center; gap: 16px;
  padding: 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
  transition: transform .2s, box-shadow .2s;
  cursor: pointer;
}
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--sh2); border-color: #d3dae5; }
.stat-card.accent-1:hover { border-color: rgba(91,95,247,.4); }
.stat-card.accent-2:hover { border-color: rgba(255,120,73,.4); }
.stat-card.accent-3:hover { border-color: rgba(17,185,129,.4); }
.stat-ring {
  position: relative; width: 72px; height: 72px;
  display: flex; align-items: center; justify-content: center;
  flex: none;
}
.stat-big {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; font-weight: 700; color: var(--txt);
  font-variant-numeric: tabular-nums;
}
.stat-meta { min-width: 0; }
.stat-unit { font-size: 14px; font-weight: 600; color: var(--txt); margin-bottom: 4px; }
.stat-sub { font-size: 12.5px; color: var(--txt2); }
.stat-hint {
  margin-top: 8px;
  font-size: 12px; color: var(--txt3);
  padding: 6px 10px;
  background: var(--bg);
  border-radius: 8px;
  border: 1px dashed var(--line);
}
.stat-card.accent-1 .stat-hint { color: var(--pri-d); background: var(--pri-l); border-color: rgba(91,95,247,.2); }
.stat-card.accent-2 .stat-hint { color: #c2410c; background: var(--acc-l); border-color: rgba(255,120,73,.2); }
.stat-card.accent-3 .stat-hint { color: #047857; background: var(--ok-l); border-color: rgba(17,185,129,.2); }
.stat-hint a { color: inherit; font-weight: 700; text-decoration: none; }
.stat-hint a:hover { text-decoration: underline; }

/* 完成趋势卡（白底+自带 SVG） */
.home-trend { padding: 20px 24px; }
.trend-hd { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.trend-hd h4 { font-size: 14.5px; font-weight: 700; }
.trend-hd small { font-size: 12px; color: var(--txt3); }
.trend-svg { width: 100%; height: 160px; display: block; }
.trend-empty { padding: 40px 20px; text-align: center; color: var(--txt3); font-size: 13px; }
.trend-grid { stroke: var(--line); stroke-dasharray: 4 4; }
.trend-axis { stroke: var(--txt3); font-size: 11px; fill: var(--txt3); }

/* 双卡 底部并排 */
.home-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 18px;
}
@media (max-width: 980px) { .home-grid { grid-template-columns: 1fr; } }

/* ============================ CARDS ============================ */

.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--sh);
  margin-bottom: 14px;
  overflow: hidden;
  transition: box-shadow .2s;
}
.card:hover { box-shadow: var(--sh2); }
.card-hd {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line2);
  background: linear-gradient(180deg, var(--bg2), var(--white));
}
.card-hd h4 { font-size: 15px; font-weight: 700; color: var(--txt); }
.card-hd .hint { margin-left: auto; font-size: 12.5px; color: var(--txt2); }
.card-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.card-bd { padding: 12px 16px; }

/* ============================ DISPATCH CARD ============================ */
.dispatch-card { border-color: #c7d6ff; }
/* 未勾选「公司派车」时淡化派车卡：纯公共交通出行不必被派车字段干扰，
   但不隐藏 —— 导入派车短信的入口要一直在（混合出差 / 临时改用车的场景）。 */
.dispatch-card.deemph { border-color: var(--line); background: var(--bg2); }
.dispatch-card.deemph .card-hd { background: var(--bg2); }
.dispatch-card.deemph > * { opacity: .62; }
.dispatch-card.deemph:hover > * { opacity: 1; }
.dispatch-card .card-hd { background: linear-gradient(180deg, #eef3ff, var(--white)); }
.dispatch-card .card-bd { padding-top: 10px; padding-bottom: 10px; }
.dispatch-empty { color: var(--txt2); font-size: 13px; padding: 1px 2px; }
.dispatch-empty p { margin: 0; }

/* 一行摘要：默认形态，替代原先铺满一屏的详细表单 */
.dispatch-summary {
  display: flex; flex-wrap: wrap; align-items: baseline;
  gap: 3px 16px; font-size: 13.5px; line-height: 1.7; padding: 1px 2px;
}
.dispatch-summary .ds-item { display: inline-flex; align-items: baseline; gap: 5px; max-width: 100%; }
.dispatch-summary .ds-k { color: var(--txt2); font-size: 12px; flex: none; }
.dispatch-summary .ds-v { color: var(--txt); font-weight: 600; }
/* 车号 / 驾驶员是写进审批单的关键项，给点强调 */
.dispatch-summary .ds-item:nth-child(4) .ds-v,
.dispatch-summary .ds-item:nth-child(5) .ds-v { color: #1d4ed8; }

/* 详细表单：点「修改」才展开 */
.dispatch-form { margin-top: 12px; padding-top: 14px; border-top: 1px dashed var(--line); }

.sms-import-box {
  margin-top: 12px; padding: 14px; border: 1px dashed var(--pri);
  border-radius: 12px; background: #f7f9ff;
}
.sms-import-box textarea {
  width: 100%; resize: vertical; font-size: 14px; line-height: 1.6;
  border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
  background: #fff; outline: none; font-family: inherit;
}
.sms-import-box textarea:focus { border-color: var(--pri); box-shadow: 0 0 0 4px var(--pri-t); }
.sms-actions { display: flex; gap: 10px; margin-top: 10px; }

/* ============================ WORK PAGE ============================ */

.work-wrap { max-width: 1280px; margin: 0 auto; }

.subtabs {
  display: inline-flex; gap: 4px;
  padding: 5px;
  background: #eaeff5;
  border: 1px solid var(--line);
  border-radius: 14px;
  margin-bottom: 20px;
  box-shadow: 0 1px 2px rgba(16,24,40,0.04);
}
.stab {
  position: relative;
  border: 0; background: transparent; cursor: pointer;
  padding: 10px 24px; min-width: 150px; min-height: 42px;
  font-size: 14.5px; font-weight: 700;
  color: var(--txt2); border-radius: 12px;
  transition: all .2s cubic-bezier(.4,0,.2,1);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.stab .s-icon { width: 16px; height: 16px; opacity: 0.85; transition: .2s; flex-shrink: 0; }
.stab:hover { color: var(--txt); background: rgba(255,255,255,0.85); transform: translateY(-1px); }
.stab:hover .s-icon { opacity: 1; }
.stab.active {
  color: #fff;
  background: linear-gradient(135deg, var(--pri) 0%, var(--pri2) 100%);
  box-shadow: 0 6px 18px rgba(91,95,247,0.5),
              0 0 0 1px rgba(91,95,247,0.22) inset;
  transform: translateY(-1px);
}
.stab.active .s-icon { opacity: 1; filter: brightness(1.15); }
.stab.active::after {
  content: '';
  position: absolute;
  bottom: -23px; left: 50%; transform: translateX(-50%);
  width: 32px; height: 4px; border-radius: 3px;
  background: linear-gradient(90deg, var(--pri), var(--pri2));
  box-shadow: 0 0 14px rgba(91,95,247,0.6);
}
.work-view[hidden] { display: none; }
.wv-head {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: 16px; margin-bottom: 20px; flex-wrap: wrap;
}
.wv-head h3 { font-size: 22px; font-weight: 700; }
.wv-head .muted { margin: 4px 0 0; color: var(--txt2); font-size: 14px; font-weight: 500; }

/* doc-list 主区卡片 */
.doc-list-main {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}
.doc-list-main li {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px 20px;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  overflow: hidden;
}
.doc-list-main li:hover {
  transform: translateY(-2px);
  box-shadow: var(--sh2);
  border-color: rgba(91,95,247,.3);
}
.doc-list-main li.active {
  background: linear-gradient(135deg, #dde1ff 0%, #f0f2ff 100%);
  border-color: rgba(91,95,247,.55);
  box-shadow: 0 0 0 4px rgba(91,95,247,.18), 0 8px 20px rgba(91,95,247,.18);
}
.doc-list-main li.active::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: linear-gradient(180deg, var(--pri), #8b5cf6);
}
.doc-list-main li .doc-title-row {
  display: flex; align-items: center; gap: 8px;
  font-size: 14.5px; font-weight: 600; color: var(--txt);
  margin-bottom: 8px;
}
.doc-list-main li .doc-title-row .dt-title {
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.doc-list-main li .ds {
  font-size: 13px; color: var(--txt2); line-height: 1.7;
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center;
  font-weight: 500;
}
.chip2 {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 12px; padding: 3px 9px;
  border-radius: 999px;
  background: var(--line2); color: var(--txt); font-weight: 600;
}
.chip2.todo { background: var(--warn-l); color: #b87a00; }
.cd-badge {
  flex: none;
  font-size: 11px; font-weight: 700;
  padding: 3px 9px; border-radius: 999px;
  letter-spacing: .02em; white-space: nowrap;
}
.cd-badge.cd-future { background: var(--info-l); color: #0284c7; }
.cd-badge.cd-today  { background: var(--acc); color: #fff; }
.cd-badge.cd-past   { background: var(--line2); color: var(--txt2); }

/* ============================ EMPTY STATE ============================ */

.empty-state {
  padding: 80px 24px; text-align: center;
  background: var(--white);
  border: 2px dashed var(--line);
  border-radius: var(--r-lg);
  color: var(--txt2);
}
.empty-state .es-icon {
  width: 88px; height: 88px; border-radius: 22px;
  margin: 0 auto 20px;
  background: linear-gradient(135deg, var(--pri-l), #e9e7ff);
  display: flex; align-items: center; justify-content: center;
}
.empty-state .es-icon svg { width: 44px; height: 44px; color: var(--pri); }
/* 空态大按钮：原来的装饰图标直接变成可点的新建入口 */
.es-newdoc {
  width: 96px; height: 96px; border-radius: 24px;
  margin: 0 auto 20px; border: none; cursor: pointer;
  background: linear-gradient(135deg, var(--pri-l), #e9e7ff);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  color: var(--pri); font-size: 12.5px;
  box-shadow: 0 6px 18px rgba(91,95,247,.16);
  transition: transform .14s, box-shadow .14s;
}
.es-newdoc svg { width: 40px; height: 40px; }
.es-newdoc:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(91,95,247,.24); }
.es-newdoc b { color: var(--pri-d); }
.empty-state h2 { margin: 0 0 8px; font-size: 18px; color: var(--txt); font-weight: 700; }
.empty-state p  { margin: 0 0 18px; color: var(--txt2); font-size: 14px; }

/* ============================ DOC EDITOR ============================ */

#docEditor[hidden] { display: none; }
.doc-head {
  display: flex; gap: 16px; align-items: center;
  padding: 18px 22px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  margin-bottom: 16px;
  box-shadow: var(--sh);
}
.doc-title {
  flex: 1; border: 0; outline: 0;
  font-size: 18px; font-weight: 600;
  background: transparent; color: var(--txt);
  min-width: 0;
  padding: 6px 0;
}
.doc-title::placeholder { color: var(--txt3); }
.doc-head-actions { display: flex; align-items: center; gap: 10px; }
.chip {
  font-size: 12px; padding: 4px 12px; border-radius: 999px;
  background: var(--ok-l); color: var(--ok); font-weight: 600;
}
.chip.warn { background: var(--warn-l); color: #b87a00; }
.chip.err  { background: var(--err-l); color: var(--err); }

/* ============================ FORM FIELDS ============================ */

.grid2 {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 8px;
}
.grid2 .span2 { grid-column: span 2; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } .grid2 .span2 { grid-column: auto; } }

.field { display: flex; flex-direction: column; gap: 3px; }
.field > span {
  font-size: 12.5px; font-weight: 600; color: var(--txt);
  padding-left: 2px;
}
/* 同行字段：标签与输入框在一行，如「出差事由：XXX项目」 */
.field.inline { flex-direction: row; align-items: center; gap: 8px; }
.field.inline > span {
  flex: none; white-space: nowrap; padding-left: 0; font-size: 13px;
}
.field.inline > input,
.field.inline > select,
.field.inline > .radio-row { flex: 1; min-width: 0; }
.field.inline .radio-row { gap: 10px; }

/* 「出差事由 / 所在部门 / 出差方式」同一行：
   出差事由吃掉剩余宽度；所在部门块宽与「制表人」一致（172px，用户要求两处一样长）；
   出差方式宽度由两个单选项内容自然撑开。 */
.grid2 .row-trip { display: flex; align-items: center; gap: 14px; min-width: 0; }
.grid2 .row-trip > .f-project { flex: 1 1 auto; min-width: 0; }
.grid2 .row-trip > .f-dept { flex: 0 0 auto; width: 172px; }
.grid2 .row-trip > .f-mode { flex: 0 0 auto; }

/* 「出差人员 / 出差地点 / 制表人」同一行。
   宽度分配：出差人员吃掉剩余全部；出差地点比制表人多 5 个汉字的**输入空间**；制表人够放「制表人：XXX」。
   块宽换算（标签 13px/字、label 内 gap 8px、input 左右 padding 各 10px）：
     制表人   172px → 可输入 ≈ 172-39-8-20 = 105px ≈ 7.5 个汉字
     出差地点 255px → 可输入 ≈ 255-52-8-20 = 175px ≈ 12.5 个汉字   ← 正好多 5 字
   制表人原来独占半个网格（约 480px），空得离谱。 */
.grid2 .row-mm { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.grid2 .row-mm > .f-members { flex: 1 1 auto; min-width: 0; }
.grid2 .row-mm > .f-place { flex: 0 0 auto; width: 255px; }
.grid2 .row-mm > .f-maker { flex: 0 0 auto; width: 172px; }
/* 「去程起讫点 / 回程起讫点」同一行（报销凭证「起讫地点」栏的两行内容）。
   去程要装「贵阳至遵义市、习水县、开阳县」这种长串，给大头；回程短得多，给 255px 与出差地点同宽。 */
.grid2 .row-route { display: flex; align-items: flex-start; gap: 14px; min-width: 0; }
.grid2 .row-route > .f-route-out { flex: 1 1 auto; min-width: 0; }
.grid2 .row-route > .f-route-back { flex: 0 0 auto; width: 255px; }
.grid2 .row-route > .f-route-reset { flex: none; align-self: center; margin-top: 10px; }

/* 窄屏兜底：row-mm 固定部分 172+255+14×2 = 455px、row-trip 固定部分 172+出差方式(约220)+14×2 ≈ 420px，
   各自还要留给可伸缩字段至少约 150px → 内容区需 ≥605px。
   本页内容区 ≈ 视口 − 396px（左栏 239 + main padding 64 + 卡片 padding），故视口低于约 1000px 时才换行。
   常见 1024/1366 屏都不会触发，两行各三个字段始终在同一行。 */
@media (max-width: 1000px) {
  .grid2 .row-trip { flex-wrap: wrap; }
  .grid2 .row-trip > .f-project { flex: 1 1 100%; }
  .grid2 .row-trip > .f-dept { flex: 1 1 auto; width: auto; }
  .grid2 .row-mm { flex-wrap: wrap; }
  .grid2 .row-mm > .f-members { flex: 1 1 100%; }
  .grid2 .row-mm > .f-place { flex: 1 1 auto; width: auto; }
  .grid2 .row-route { flex-wrap: wrap; }
  .grid2 .row-route > .f-route-back { flex: 1 1 100%; width: 100%; }
}
@media (max-width: 640px) {
  .grid2 .row-trip > .f-dept,
  .grid2 .row-trip > .f-mode,
  .grid2 .row-mm > .f-place,
  .grid2 .row-mm > .f-maker,
  .grid2 .row-route > .f-route-out { flex: 1 1 100%; width: 100%; }
}
.field input, .field select, .field textarea {
  width: 100%;
  padding: 7px 10px; min-height: 34px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  transition: all .15s;
  font-size: 14.5px;
}
.field input:hover, .field select:hover { background: var(--white); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--pri);
  background: var(--white);
  box-shadow: 0 0 0 4px var(--pri-t);
}
.field input::placeholder, .field textarea::placeholder { color: var(--txt3); }
.field input[type=date] { font-variant-numeric: tabular-nums; }

/* ============================ DATES ROW / OCR ============================ */

.date-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 8px; align-items: end; }
@media (max-width: 720px) { .date-row { grid-template-columns: 1fr; } }
.days-box {
  background: #dde1ff; color: var(--pri-d);
  font-weight: 700; font-size: 18px;
  border-radius: 10px; padding: 12px;
  text-align: center;
  border: 1px solid rgba(91,95,247,.28);
}
.days-box b { font-variant-numeric: tabular-nums; }

.ocr-panel {
  margin-top: 16px; padding: 14px;
  background: var(--bg2); border: 1px dashed var(--line);
  border-radius: 12px;
}
.ocr-hd { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.ocr-hd > span { font-size: 12.5px; color: var(--txt2); font-weight: 600; }
.ocr-src { display: flex; gap: 12px; flex-wrap: wrap; }
.ocr-list { display: grid; grid-template-columns: repeat(auto-fill, 132px); gap: 12px; }
.ocr-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 8px; border: 1px solid var(--line); border-radius: 12px; background: var(--white); }
.ocr-thumb { width: 96px; height: 96px; object-fit: cover; border-radius: 8px; background: var(--bg); display: block; cursor: default; }
.ocr-meta { text-align: center; font-size: 11px; color: var(--txt2); line-height: 1.3; max-width: 100%; }
.ocr-meta .g { color: var(--txt); font-weight: 600; }
.ocr-meta .t { display: none; }
.ocr-dates { display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; }
.ocr-item .btn.sm { padding: 3px 8px; font-size: 11px; }
.ocr-chip {
  background: var(--white); border: 1px solid var(--line);
  padding: 5px 11px; border-radius: 999px;
  font-size: 12px; cursor: pointer;
  transition: all .15s;
}
.ocr-chip:hover { border-color: var(--pri); color: var(--pri); }

.ocr-progress {
  margin-top: 14px; display: flex; align-items: center; gap: 12px;
}
.bar { flex: 1; height: 8px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar i { display: block; height: 100%; width: 0%; background: linear-gradient(90deg, var(--pri), #8b5cf6); transition: width .3s; }
/* OCR 加载识别核心阶段没有真实进度（worker 内 importScripts 无回调）：
   用往复滑动条表达「程序活着」，代替之前假死的 0%（2026-09-24） */
.bar i.indet { width: 32% !important; transition: none; animation: barIndet 1.1s ease-in-out infinite alternate; }
@keyframes barIndet { from { margin-left: 0; } to { margin-left: 68%; } }

/* checkbox + radio 自绘 */
.ck, .radio { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font-size: 13px; }
.ck input, .radio input { position: absolute; opacity: 0; pointer-events: none; }
.ck i, .radio i {
  width: 16px; height: 16px; border-radius: 4px;
  border: 1.5px solid var(--txt3); background: var(--white);
  display: inline-flex; align-items: center; justify-content: center;
  transition: all .15s;
}
.radio i { border-radius: 50%; }
.ck input:checked + i { background: var(--pri); border-color: var(--pri); }
.ck input:checked + i::after {
  content: ''; width: 8px; height: 4px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(0, -1px);
}
.radio input:checked + i { border-color: var(--pri); }
.radio input:checked + i::after {
  content: ''; width: 8px; height: 8px;
  border-radius: 50%; background: var(--pri);
}
.radio-row { display: flex; gap: 10px; flex-wrap: wrap; }
.hint { font-size: 12.5px; color: var(--txt2); font-weight: 500; }
.mt8 { margin-top: 8px; }

/* ============================ MEMBER TABLE ============================ */

.tbl { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 14px; }
.tbl th, .tbl td {
  text-align: left; padding: 10px 12px;
  border-bottom: 1px solid var(--line2);
}
.tbl th { font-weight: 600; color: var(--txt2); font-size: 12.5px; background: var(--bg2); }
.tbl td input { padding: 7px 9px; min-height: 34px; font-size: 13.5px; }
.tbl td input[type=number] { width: 90px; }
.tbl td.right { text-align: right; font-weight: 600; color: var(--txt2); }
.tbl td.mono { font-variant-numeric: tabular-nums; font-weight: 600; }
.tbl tfoot td { border-top: 2px solid var(--line); border-bottom: 0; background: var(--bg2); }

/* ============================ ATTACH PANE ============================ */

.attach-toolbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  margin-bottom: 16px; box-shadow: var(--sh);
}
.mode-note { font-size: 13px; color: var(--txt2); font-weight: 500; line-height: 1.7; }
.attach-tools { display: flex; gap: 10px; }

/* ============================ 智能归置收件箱 ============================ */

.inbox-card {
  background: linear-gradient(180deg, #f1f3ff 0%, var(--white) 100%);
  border: 1px solid rgba(91,95,247,.28);
  border-radius: var(--r);
  padding: 16px 18px 18px;
  margin-bottom: 16px;
  box-shadow: var(--sh);
}
.inbox-hd { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 12px; }
.inbox-title { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.inbox-title b { font-size: 15px; font-weight: 700; color: var(--txt); }
.inbox-sub { font-size: 12.5px; color: var(--txt2); font-weight: 500; line-height: 1.5; }

.inbox-drop {
  display: flex; align-items: center; justify-content: center; gap: 14px;
  min-height: 84px; padding: 16px;
  border: 1.5px dashed #aeb6e8; border-radius: 14px;
  background: rgba(255,255,255,.6);
  color: var(--txt2); cursor: pointer; user-select: none;
  transition: all .15s ease;
}
.inbox-drop:hover {
  border-color: var(--pri);
  background: var(--pri-l);
  color: var(--pri-d);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(91,95,247,.16);
}
.inbox-drop.over {
  border-color: var(--pri);
  background: var(--pri-l);
  color: var(--pri-d);
  transform: scale(1.005);
}
.inbox-ic {
  width: 30px; height: 30px; flex: none;
  color: var(--pri); opacity: .9;
}
.inbox-txt { font-size: 14px; font-weight: 600; }

.inbox-summary {
  margin-top: 12px; padding: 10px 12px;
  background: var(--ok-l); border: 1px solid rgba(17,185,129,.25);
  border-radius: 10px;
  font-size: 12.5px; color: #047857; font-weight: 500; line-height: 1.7;
}
.inbox-summary[hidden] { display: none; }
.is-chip {
  display: inline-flex; align-items: center;
  margin: 2px 6px 2px 0;
  padding: 3px 10px; border-radius: 999px;
  background: #fff; color: var(--txt);
  border: 1px solid var(--line);
  font-size: 12px; font-weight: 600;
}

/* 隐藏但仍可被 .click() 触发的 file input */
.dz-file {
  position: absolute; width: 1px; height: 1px;
  opacity: 0; overflow: hidden; pointer-events: none;
}

/* ============================ 附件分组 ============================ */

.group {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 14px 16px;
  margin-bottom: 14px;
  box-shadow: var(--sh);
}
.group-hd {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 12px;
}
.gno {
  width: 24px; height: 24px; border-radius: 8px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--pri); color: #fff;
  font-size: 12.5px; font-weight: 700; flex: none;
}
.gno.merge { background: var(--acc); }
.gt { font-size: 15px; font-weight: 700; color: var(--txt); }
.gmode {
  font-size: 11.5px; padding: 3px 9px; border-radius: 999px;
  background: var(--line2); color: var(--txt2); font-weight: 600;
}
.gmode.m { background: var(--acc-l); color: var(--acc); }
.gcount { margin-left: auto; font-size: 12.5px; color: var(--txt2); font-weight: 600; }

/* ---- 不报销类别（市内交通，2026-09-18 口径）----
   分组保留可见（防止 OCR 误判把真票据无声吞掉），但整块灰化 + 虚线框，
   一眼看出「放这儿不报销」。金额、凭证、A4 层面的剔除在 store.js 里做。 */
.group.no-reimb { background: var(--bg2); border-style: dashed; box-shadow: none; }
.group.no-reimb .gno { background: var(--txt3); }
.group.no-reimb .gt { color: var(--txt2); }
.group.no-reimb .gmode { background: #f1f3f7; color: var(--txt3); }
.group.no-reimb .dropzone { border-color: #d7dce5; }
.gtag {
  font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 6px;
  background: var(--acc-l); color: var(--acc); flex: none;
}
.gtag.no { background: #fdecec; color: var(--err); }
.no-reimb-tag {
  display: inline-block; margin-left: 4px; padding: 0 5px; border-radius: 5px;
  font-size: 10.5px; font-weight: 700; background: #fdecec; color: var(--err);
}

.group-bd { position: relative; }

/* 上传拖拽区：明显的虚线框 + 悬停反馈，一眼可知可点 */
.dropzone {
  display: flex; align-items: center; justify-content: center;
  gap: 8px; text-align: center;
  padding: 18px 16px; min-height: 64px;
  border: 1.5px dashed #c3ccda; border-radius: 12px;
  background: var(--bg2);
  color: var(--txt2); font-size: 13.5px; font-weight: 600;
  cursor: pointer; user-select: none;
  transition: all .15s ease;
}
.dropzone:hover {
  border-color: var(--pri);
  background: var(--pri-l);
  color: var(--pri-d);
  box-shadow: 0 4px 12px rgba(91,95,247,.14);
}
.dropzone.over {
  border-color: var(--pri);
  background: var(--pri-l);
  color: var(--pri-d);
  transform: scale(1.01);
}

/* 缩略图 */
.thumb-row {
  display: flex; flex-wrap: wrap; gap: 10px;
  margin-top: 12px;
}
.thumb {
  position: relative;
  width: 96px;
  border-radius: 12px; overflow: hidden;
  border: 1px solid var(--line);
  background: var(--bg);
  flex: none;
}
.thumb-img { position: relative; width: 96px; height: 96px; overflow: hidden; display: block; }
.thumb img {
  width: 100%; height: 100%; object-fit: cover; display: block;
  cursor: zoom-in;
}
.thumb .ocr-tag {
  position: absolute; left: 4px; bottom: 4px;
  font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(17,185,129,.92); color: #fff;
}
.thumb .amt {
  position: absolute; right: 4px; top: 4px;
  font-size: 10.5px; font-weight: 700;
  padding: 2px 7px; border-radius: 999px;
  background: rgba(28,36,48,.72); color: #fff;
}
/* 金额取自发票大写栏且无误：绿色「大」标 */
.thumb .amt-cap {
  position: absolute; right: 4px; top: 30px;
  font-size: 9.5px; font-weight: 700; line-height: 1.4;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(17,185,129,.92); color: #fff;
}
/* 大写金额与识别数字不一致：红字「⚠待核」警示，需人工核实 */
.thumb .amt-warn {
  position: absolute; left: 4px; top: 4px;
  font-size: 9.5px; font-weight: 700; line-height: 1.4;
  padding: 1px 6px; border-radius: 999px;
  background: rgba(236,75,75,.95); color: #fff;
  box-shadow: 0 1px 4px rgba(236,75,75,.5);
}
.thumb.ocr-fail { border-color: var(--err); }
.thumb.ocr-fail .ocr-tag { background: var(--err); }
/* 不报销分组的缩略图：转灰 + 居中「不报销」角标（不显示金额，免得看着像能报） */
.thumb.no-reimb .thumb-img img { filter: grayscale(1) opacity(.5); }
.thumb .amt-warn.noreimb {
  left: 50%; top: 50%; transform: translate(-50%, -50%);
  font-size: 10.5px; padding: 3px 9px; letter-spacing: .5px;
  background: rgba(110,118,132,.92); box-shadow: none;
}
/* 订单详情页（飞猪/携程/12306 的下单记录）：橙标 —— 不是报销凭证，已归入「支付记录」待人工确认。
   错开 top: 20px，避免与左上角的「⚠待核」红标叠在一起。 */
.thumb .amt-warn.order-page {
  left: 4px; top: 20px;
  background: rgba(232,146,26,.95); box-shadow: 0 1px 4px rgba(232,146,26,.5);
}
.thumb .mv {
  position: absolute; top: 4px; left: 4px;
  display: flex; flex-direction: column; gap: 3px;
  opacity: 0; transition: opacity .15s;
}
.thumb:hover .mv { opacity: 1; }
.thumb .mv button {
  width: 22px; height: 22px; border: 0; border-radius: 6px;
  background: rgba(28,36,48,.6); color: #fff; cursor: pointer;
  font-size: 13px; line-height: 1;
}
.thumb .mv button:hover { background: var(--pri); }
.thumb .ocr-info {
  position: absolute; right: 4px; top: 30px;
  width: 22px; height: 22px; border: 0; border-radius: 6px;
  background: rgba(28,36,48,.6); color: #fff; cursor: pointer;
  font-size: 11px; font-weight: 700; line-height: 1;
  opacity: 0; transition: opacity .15s;
}
.thumb:hover .ocr-info { opacity: 1; }
.thumb .ocr-info:hover { background: var(--pri); }
.thumb .cap {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 3px 6px;
  font-size: 10.5px; color: #fff;
  background: linear-gradient(180deg, rgba(0,0,0,0), rgba(0,0,0,.55));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* 底部操作条：改分类 + 删除并排，物理上互不重叠 */
.thumb-bar {
  display: flex; align-items: center; gap: 4px;
  padding: 4px; background: var(--white);
  border-top: 1px solid var(--line);
}
.thumb-bar .cls {
  flex: 1; min-width: 0;
  height: 24px; padding: 0 4px;
  font-size: 10px; line-height: 1.1; color: var(--txt);
  border: 1px solid var(--line); border-radius: 6px;
  background: #fff; cursor: pointer;
  appearance: none; -webkit-appearance: none;
}
.thumb-bar .rm {
  width: 24px; height: 24px; flex: none;
  border: 0; border-radius: 6px;
  background: rgba(236,75,75,.9); color: #fff; cursor: pointer;
  font-size: 15px; line-height: 1;
}
.thumb-bar .rm:hover { background: var(--err); }

/* ============================ AMOUNT PANE ============================ */

.amt-summary {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px;
  margin-bottom: 16px;
}
@media (max-width: 720px) { .amt-summary { grid-template-columns: repeat(2, 1fr); } }
.amt-cell {
  padding: 16px 18px;
  background: linear-gradient(135deg, var(--bg2), var(--white));
  border: 1px solid var(--line);
  border-radius: 12px;
}
.amt-cell .lbl { font-size: 12px; color: var(--txt3); font-weight: 600; }
.amt-cell .num { font-size: 22px; font-weight: 700; color: var(--txt); font-variant-numeric: tabular-nums; margin-top: 4px; }
.amt-cell.t .num { color: var(--pri); }
.amt-cell.m .num { color: var(--acc); }
.amt-cell.s .num { color: var(--ok); }
.amt-table { font-size: 13px; }

/* 金额核对摘要（#amtSummary）：发票合计 / 补助合计 / 费用合计 */
.amt-total {
  display: flex; align-items: baseline; justify-content: space-between;
  padding: 10px 14px; border-radius: 10px; background: var(--bg2);
  border: 1px solid var(--line);
}
.amt-total + .amt-total { margin-top: 8px; }
.amt-total > span { font-size: 13px; color: var(--txt3); font-weight: 600; }
.amt-total > b {
  font-size: 20px; font-weight: 700; color: var(--txt);
  font-variant-numeric: tabular-nums;
}
.amt-total.amt-sub { background: transparent; border-style: dashed; }
.amt-total.amt-sub > b { font-size: 17px; color: var(--acc); margin-left: auto; }
.amt-sub .btn.xs { margin-left: 8px; flex: none; }
.amt-total.amt-fee {
  background: linear-gradient(135deg, var(--pri), var(--pri2, var(--pri)));
  border-color: transparent; margin-top: 10px;
}
.amt-total.amt-fee > span { color: rgba(255,255,255,.9); }
.amt-total.amt-fee > b { color: #fff; font-size: 22px; }
.amt-bars { margin: 12px 0 2px; display: flex; flex-direction: column; gap: 7px; }
.amt-bar-row { display: grid; grid-template-columns: 92px 1fr 84px 42px; align-items: center; gap: 8px; }
.ab-name { font-size: 12px; color: var(--txt2); }
/* 市内交通行：明确标「不报销 / 已剔除」，条形走斜纹灰，不参与占比 */
.amt-bar-row.no-reimb { opacity: .8; }
.amt-bar-row.no-reimb .ab-name em {
  font-style: normal; margin-left: 5px; padding: 1px 6px; border-radius: 5px;
  font-size: 10.5px; font-weight: 700; background: #fdecec; color: var(--err);
}
.amt-bar-row.no-reimb .ab-track i {
  width: 100% !important;
  background: repeating-linear-gradient(45deg, #dfe3ea 0 5px, #eef1f6 5px 10px);
}
.amt-bar-row.no-reimb .ab-val { color: var(--txt3); }
.amt-bar-row.no-reimb .ab-pct { color: var(--err); font-weight: 700; }
.ab-track { height: 8px; background: var(--line); border-radius: 6px; overflow: hidden; }
.ab-track i { display: block; height: 100%; background: var(--pri); border-radius: 6px; }
.ab-val { font-size: 12px; color: var(--txt); font-variant-numeric: tabular-nums; text-align: right; }
.ab-pct { font-size: 11px; color: var(--txt3); text-align: right; }
.amt-note { font-size: 11.5px; color: var(--txt3); line-height: 1.6; margin-top: 10px; }
/* 计入/不计入张数说明、市内交通去向说明：紧跟在费用合计下面，单独一条，别混进口径说明里 */
.amt-count-note { margin-top: 8px; padding: 8px 10px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line); }
.amt-count-note b { color: var(--txt); font-weight: 700; }
.amt-city-note { margin-top: 6px; padding: 8px 10px; border-radius: 8px; background: rgba(240,160,32,.10); border: 1px solid rgba(240,160,32,.35); color: #8a5a06; }
.amt-city-note b { color: #6f4704; }

/* ③ 金额核对表：计入合计标记 */
.amt-tbl td.c-c { text-align: center; white-space: nowrap; }
.cnt-flag {
  display: inline-block; font-size: 11px; font-weight: 600; line-height: 1.5;
  padding: 2px 8px; border-radius: 999px;
}
.cnt-flag.on { background: rgba(34,160,107,.12); color: #1a8a5a; border: 1px solid rgba(34,160,107,.3); }
.cnt-flag.off { background: var(--bg2); color: var(--txt3); border: 1px dashed var(--line); }
/* 不计入的行整体压暗：一眼看出它不是"漏算了"，而是"故意不算" */
.amt-tbl tr.not-counted td { opacity: .58; }
.amt-tbl tr.not-counted .c-e { text-decoration: line-through; text-decoration-color: var(--txt3); }

/* ====================== ⑤ 导出前自检 ====================== */
.exp-check { display: flex; flex-direction: column; gap: 8px; }
.ec-head {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  padding: 9px 12px; border-radius: 9px; border: 1px solid var(--line); background: var(--bg2);
}
.ec-head b { font-size: 13.5px; font-weight: 700; }
.ec-head span { font-size: 12px; color: var(--txt3); }
.ec-head.ok  { background: rgba(34,160,107,.10); border-color: rgba(34,160,107,.32); }
.ec-head.ok b { color: #1a8a5a; }
.ec-head.warn { background: rgba(240,160,32,.10); border-color: rgba(240,160,32,.34); }
.ec-head.warn b { color: #8a5a06; }
.ec-head.bad { background: rgba(225,85,84,.10); border-color: rgba(225,85,84,.34); }
.ec-head.bad b { color: #c0392b; }
.ec-item {
  display: flex; align-items: center; gap: 9px;
  padding: 7px 12px; border-radius: 8px; background: var(--bg2); border: 1px solid var(--line);
}
.ec-dot { width: 8px; height: 8px; border-radius: 50%; flex: none; background: var(--txt3); }
.ec-item.err .ec-dot { background: #e15554; }
.ec-item.warn .ec-dot { background: #f0a020; }
.ec-t { flex: 1; min-width: 0; font-size: 12.5px; color: var(--txt); line-height: 1.5; }
.ec-item .btn.xs { flex: none; }
.ec-info { font-size: 12px; color: var(--txt3); padding-top: 2px; }
.ec-info b { color: var(--txt); font-weight: 700; }
.ec-empty { font-size: 12.5px; color: var(--txt3); }

/* ============================ PREVIEW PANE ============================ */

.preview-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 18px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r);
  margin-bottom: 16px; box-shadow: var(--sh);
}
.preview-bar .opts { display: flex; gap: 16px; flex-wrap: wrap; flex: 1; min-width: 0; }
.preview-bar .pv-actions { display: flex; gap: 8px; margin-right: 12px; flex: none; }
.pv-note {
  font-size: 12.5px; line-height: 1.75; color: var(--txt2);
  background: #f7f8ff; border: 1px solid #e3e6fb; border-radius: var(--r);
  padding: 11px 16px; margin-bottom: 14px;
}
.page-grid { display: grid; grid-template-columns: repeat(auto-fill, 170px); justify-content: start; gap: 16px; padding-top: 4px; }
.page-card {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  padding: 12px 10px; border-radius: 12px; border: 1px solid var(--line);
  background: var(--white); cursor: pointer; transition: background .15s, border-color .15s, box-shadow .15s;
}
.page-card:hover { background: var(--bg2); border-color: var(--pri); box-shadow: var(--sh2); }
.page-card img.pv { width: 140px; height: 198px; object-fit: contain; border-radius: 6px; background: var(--bg); display: block; }
.page-card .pf { font-size: 12px; color: var(--txt2); text-align: center; line-height: 1.4; }
.page-card .pf b { display: block; color: var(--txt); font-weight: 600; margin-bottom: 2px; }

/* 官方表格页（审批单 / 报销凭证 / 补助清单）：蓝色描边区分「这不是附件，是公司表格」，
   底部给「去修改」入口——数字不对时用户不必自己找改的地方 */
.page-card.official { border-color: #c7d2fe; background: #f8f9ff; }
.page-card.official:hover { border-color: var(--pri); }
/* 官方表格缩略图已裁掉 A4 空白，是横长条，别再按 140×198 竖框压它 */
.page-card.official img.pv { height: auto; background: transparent; }
.page-card .pe {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  font-size: 11px; color: var(--txt2);
}
.page-card .pe .btn.xs { padding: 2px 8px; min-height: 22px; font-size: 11px; }
/* 「去修改」跳转后的目标高亮：只切面板用户感知不到，闪一下才算真的"跳过去"了。
   用 outline 而不是 box-shadow，避免覆盖 .card 自带的阴影、也不占布局 */
.flash-target { animation: flashTarget 1.7s ease-out; }
@keyframes flashTarget {
  0%   { outline: 3px solid rgba(91,95,247,.60); outline-offset: 2px; }
  70%  { outline: 3px solid rgba(91,95,247,.28); outline-offset: 2px; }
  100% { outline: 3px solid rgba(91,95,247,0); outline-offset: 2px; }
}

/* 预览空态/进行中提示：替代过去的「一片空白」——空白会让人以为按钮坏了 */
.pv-hint {
  grid-column: 1 / -1; padding: 26px 22px; border: 1px dashed var(--line);
  border-radius: 12px; background: var(--white); color: var(--txt2);
  font-size: 13px; line-height: 1.7;
}

/* ============================ EXPORT PANE ============================ */

.export-box { display: grid; grid-template-columns: 1fr; gap: 14px; padding: 18px 22px; }
.exp-item {
  display: flex; align-items: center; gap: 16px;
  padding: 18px 20px;
  background: linear-gradient(135deg, var(--bg2), var(--white));
  border: 1px solid var(--line);
  border-radius: 14px;
}
.exp-ic {
  width: 56px; height: 56px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 14px; color: #fff; flex: none;
  letter-spacing: .02em;
}
.exp-ic.pdf { background: linear-gradient(135deg, #f43f5e, #e11d48); }
.exp-ic.xls { background: linear-gradient(135deg, #22c55e, #16a34a); }
.exp-ic.zip { background: linear-gradient(135deg, var(--pri), #8b5cf6); }
.exp-ic.off { background: linear-gradient(135deg, #f59e0b, #d97706); }
.exp-txt { flex: 1; min-width: 0; }
.exp-txt b { font-size: 15px; font-weight: 700; }
.exp-txt p { margin: 4px 0 0; color: var(--txt2); font-size: 13px; }

/* ============================ LIFE PAGE ============================ */

.life-wrap { max-width: 1100px; margin: 0 auto; }
.life-hero {
  position: relative;
  padding: 32px 36px;
  margin-bottom: 24px;
  border-radius: var(--r-lg);
  background:
    radial-gradient(circle at 90% 30%, rgba(255,120,73,.16), transparent 60%),
    radial-gradient(circle at 0% 100%, rgba(91,95,247,.10), transparent 50%),
    linear-gradient(135deg, #ffffff, #fff8f3);
  border: 1px solid var(--line);
  box-shadow: var(--sh);
  overflow: hidden;
}
.life-hero::before {
  content: '';
  position: absolute; right: -60px; top: -60px;
  width: 240px; height: 240px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,120,73,.16), transparent 70%);
  pointer-events: none;
}
.life-hero h2 { font-size: 28px; font-weight: 700; }
.life-hero .lead { margin: 8px 0 0; color: var(--txt2); font-size: 15px; max-width: 720px; }
.life-hero .hero-actions { margin-top: 18px; display: flex; gap: 10px; flex-wrap: wrap; }
.life-hero .hero-pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.7); backdrop-filter: blur(8px);
  font-size: 13px; color: var(--txt2); font-weight: 600;
  border: 1px solid var(--line);
}
.life-hero .hero-pill b { color: var(--acc); font-size: 16px; font-variant-numeric: tabular-nums; }
.life-hero .hero-pill.ok b { color: var(--ok); }

.life-sub {
  margin: 18px 0 12px;
  display: flex; align-items: center; gap: 10px;
  font-size: 18px; font-weight: 700;
}
.life-sub::before {
  content: ''; width: 4px; height: 18px;
  background: linear-gradient(180deg, var(--pri), #8b5cf6);
  border-radius: 999px;
}
.life-sub span { color: var(--pri); font-variant-numeric: tabular-nums; font-size: 16px; }

/* cert 彩色卡 */
.cert-grid {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
}
.cert-card {
  position: relative;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 18px;
  transition: all .2s;
  overflow: hidden;
  cursor: default;
}
.cert-card::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px;
  background: var(--line); transition: all .2s;
}
.cert-card:hover { transform: translateY(-2px); box-shadow: var(--sh2); }
.cert-card.cert-ok::before    { background: var(--ok); }
.cert-card.cert-warn::before  { background: var(--warn); }
.cert-card.cert-err::before   { background: var(--err); }
.cert-card.cert-pass::before  { background: var(--txt3); }
.cert-card .cert-ic {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg); color: var(--txt2);
  margin-bottom: 12px;
}
.cert-card.cert-ok  .cert-ic { background: var(--ok-l); color: var(--ok); }
.cert-card.cert-warn .cert-ic{ background: var(--warn-l); color: #b87a00; }
.cert-card.cert-err .cert-ic { background: var(--err-l); color: var(--err); }
.cert-card .cert-ic svg { width: 20px; height: 20px; }
.cert-card .cert-name {
  font-size: 15.5px; font-weight: 700; color: var(--txt);
  margin-bottom: 6px;
  display: flex; align-items: center; gap: 8px;
}
.cert-card .cert-type-tag {
  font-size: 10.5px; padding: 2px 7px; border-radius: 999px;
  background: var(--line2); color: var(--txt2); font-weight: 600;
  letter-spacing: .02em;
}
.cert-card .cert-date { font-size: 13px; color: var(--txt2); }
.cert-card .cert-date b { font-variant-numeric: tabular-nums; }
.cert-card .cert-tag {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11.5px; padding: 3px 9px;
  border-radius: 999px; font-weight: 700;
  margin-top: 10px;
}
.cert-card.cert-ok   .cert-tag { background: var(--ok-l);  color: var(--ok); }
.cert-card.cert-warn .cert-tag { background: var(--warn-l);color: #b87a00; }
.cert-card.cert-err  .cert-tag { background: var(--err-l); color: var(--err); }
.cert-card.cert-pass .cert-tag { background: var(--line2); color: var(--txt2); }
.cert-card .cert-note {
  font-size: 12.5px; color: var(--txt3); margin-top: 10px;
  padding-top: 10px; border-top: 1px dashed var(--line);
}
.cert-card .cert-del {
  position: absolute; right: 12px; top: 12px;
  width: 24px; height: 24px; border-radius: 6px;
  border: 0; background: transparent; cursor: pointer;
  color: var(--txt3); font-size: 16px;
  opacity: 0; transition: all .15s;
}
.cert-card:hover .cert-del { opacity: 1; }
.cert-card .cert-del:hover { background: var(--err-l); color: var(--err); }

/* cert 卡片渲染用的旧 class 名（与新 cert-* 状态类共存）*/
.cert-card .cc-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.cert-card .cc-type { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: var(--line2); color: var(--txt2); font-weight: 700; }
.cert-card .cc-name { font-size: 16px; font-weight: 700; color: var(--txt); }
.cert-card .cc-exp { font-size: 13px; color: var(--txt2); margin-top: 4px; }
.cert-card .cc-left { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; padding: 4px 10px; border-radius: 999px; font-weight: 700; margin-top: 10px; }
.cert-card.due-ok   .cc-left { background: var(--ok-l);  color: var(--ok); }
.cert-card.due-soon .cc-left { background: var(--warn-l);color: #b87a00; }
.cert-card.due-over .cc-left { background: var(--err); color: #fff; }
.cert-card .cc-note { font-size: 12.5px; color: var(--txt3); margin-top: 10px; padding-top: 10px; border-top: 1px dashed var(--line); }
.cert-card .del-x {
  position: absolute; right: 12px; top: 12px;
  width: 28px; height: 28px; border-radius: 6px; border: 0; background: transparent;
  cursor: pointer; color: var(--txt3); font-size: 16px; opacity: 0; transition: all .15s;
}
.cert-card:hover .del-x { opacity: 1; }
.cert-card .del-x:hover { background: var(--err-l); color: var(--err); }
.cert-card.due-over .cc-type { background: var(--err-l); color: var(--err); }
.cert-card.due-soon .cc-type { background: var(--warn-l); color: #b87a00; }

.ocr-empty { padding: 30px; text-align: center; color: var(--txt3); border: 1.5px dashed var(--line); border-radius: var(--r); background: var(--bg2); font-size: 13px; }

/* todo-list 生活页的旧 class（按 JS 实际输出）*/
.todo-row .ttext { flex: 1; font-size: 14.5px; color: var(--txt); min-width: 0; }
.todo-row.done .ttext { text-decoration: line-through; color: var(--txt3); }
.todo-row .tdate { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--line2); color: var(--txt2); }
.todo-row .tdate.over { background: var(--err); color: #fff; }
.todo-row .tdate.today { background: var(--acc); color: #fff; }
.todo-row .tdate.soon  { background: var(--warn-l); color: #b87a00; }
.todo-list { display: flex; flex-direction: column; gap: 8px; }
.todo-row {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all .15s;
}
.todo-row:hover { transform: translateX(2px); border-color: #d3dae5; box-shadow: var(--sh); }
.todo-row.overdue { border-color: rgba(236,75,75,.3); background: linear-gradient(135deg, var(--err-l), var(--white)); }
.todo-row.done { opacity: .55; background: var(--bg2); }
.todo-row .check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--txt3); background: var(--white);
  cursor: pointer; flex: none;
  display: flex; align-items: center; justify-content: center;
  transition: all .15s; position: relative; padding: 0;
}
.todo-row .check:hover { border-color: var(--pri); background: var(--pri-l); }
.todo-row.overdue .check { border-color: var(--err); }
.todo-row .check.on { border-color: var(--pri); background: var(--pri); }
.todo-row .check.on::after {
  content: ''; width: 10px; height: 5px;
  border-left: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(-45deg) translate(0, -1px);
}
.todo-row .ttl { flex: 1; font-size: 14.5px; color: var(--txt); min-width: 0; }
.todo-row.done .ttl { text-decoration: line-through; color: var(--txt3); }
.todo-row .meta { display: flex; gap: 6px; align-items: center; flex: none; }
.prio-pill {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px;
}
.prio-pill.P0 { background: var(--err-l); color: var(--err); }
.prio-pill.P1 { background: var(--pri-l); color: var(--pri); }
.prio-pill.P2 { background: var(--line2); color: var(--txt2); }
.due-tag {
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: var(--line2); color: var(--txt2);
}
.due-tag.overdue { background: var(--err); color: #fff; }
.due-tag.today   { background: var(--acc); color: #fff; }
.due-tag.soon    { background: var(--warn-l); color: #b87a00; }

.todo-row .del-x {
  flex: none; width: 28px; height: 28px;
  border: 0; background: transparent; cursor: pointer; color: var(--txt3);
  border-radius: 6px; opacity: 0; transition: all .15s; font-size: 16px;
}
.todo-row:hover .del-x { opacity: 1; }
.todo-row .del-x:hover { background: var(--err-l); color: var(--err); }

/* ============================ MINI LIST (home) ============================ */

.mini-list { display: flex; flex-direction: column; gap: 8px; }
.mini-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px;
  background: var(--bg);
  border-radius: 10px;
  transition: all .15s;
}
.mini-row:hover { background: var(--pri-l); transform: translateX(2px); }
.mini-row .check {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--txt3); background: var(--white);
  cursor: pointer; flex: none; padding: 0;
}
.mini-row .check:hover { border-color: var(--pri); }
.mini-row .check.on { border-color: var(--pri); background: var(--pri); position: relative; }
.mini-row .check.on::after {
  content: ''; position: absolute; left: 4px; top: 1px;
  width: 6px; height: 10px;
  border-right: 2px solid #fff; border-bottom: 2px solid #fff;
  transform: rotate(45deg);
}
.mini-main { flex: 1; min-width: 0; }
.mini-main b { font-size: 13.5px; color: var(--txt); }
.mini-tag { font-size: 11.5px; color: var(--txt2); padding: 2px 8px; border-radius: 6px; background: var(--white); }

.quick-add { display: flex; gap: 8px; margin-top: 12px; }
.quick-add input {
  flex: 1; padding: 10px 14px; min-height: 42px;
  background: var(--bg); border: 1px solid var(--line);
  border-radius: 10px; outline: none;
  transition: all .15s; font-size: 14.5px;
}
.quick-add input:focus { background: var(--white); border-color: var(--pri); box-shadow: 0 0 0 4px var(--pri-t); }

.home-card .card-hd .more { margin-left: auto; color: var(--pri); font-size: 13px; text-decoration: none; font-weight: 600; }
.home-card .card-hd .more:hover { text-decoration: underline; }

/* 工作页待办主视图 */
.side-quick-card { border: 0; box-shadow: none; padding: 0; margin-bottom: 12px; }
.todo-input-row { display: flex; gap: 10px; padding: 12px 16px; }
.todo-main-input {
  flex: 1; padding: 14px 18px; min-height: 48px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: 12px; outline: none;
  font-size: 15px; transition: all .15s;
}
.todo-main-input:focus { border-color: var(--pri); box-shadow: 0 0 0 4px var(--pri-t); }

.todo-list-main { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.todo-side-list .ts-empty {
  padding: 40px 20px; text-align: center; color: var(--txt3);
  border: 1.5px dashed var(--line); border-radius: var(--r);
  background: var(--bg2);
}
.todo-side-list .ts-row {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
  transition: all .15s;
}
.todo-side-list .ts-row:hover { transform: translateX(2px); box-shadow: var(--sh); border-color: #d3dae5; }
.todo-side-list .ts-row.over { border-color: rgba(236,75,75,.4); background: linear-gradient(135deg, var(--err-l), var(--white)); }
.ts-check {
  width: 20px; height: 20px; border-radius: 50%;
  border: 1.5px solid var(--txt3); background: var(--white);
  cursor: pointer; flex: none; padding: 0;
}
.ts-check:hover { border-color: var(--pri); }
.ts-main { flex: 1; display: flex; gap: 10px; align-items: center; min-width: 0; }
.ts-prio { font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; }
.ts-prio.p0 { background: var(--err-l); color: var(--err); }
.ts-prio.p1 { background: var(--pri-l); color: var(--pri); }
.ts-prio.p2 { background: var(--line2); color: var(--txt2); }
.ts-title { flex: 1; font-size: 14.5px; color: var(--txt); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ts-rep { font-size: 12px; color: var(--pri); }
.ts-tag { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: var(--line2); color: var(--txt2); flex: none; }
.ts-tag.over { background: var(--err); color: #fff; }
.ts-tag.today { background: var(--pri); color: #fff; }
.ts-tag.soon { background: var(--warn-l); color: #b87a00; }
.ts-del {
  width: 28px; height: 28px; border: 0; background: transparent;
  cursor: pointer; color: var(--txt3); font-size: 16px;
  border-radius: 6px; opacity: 0; transition: all .15s;
}
.ts-row:hover .ts-del { opacity: 1; }
.ts-del:hover { background: var(--err-l); color: var(--err); }

.work-more { margin-top: 16px; color: var(--txt3); }

/* ============================ TOAST ============================ */
.toast-wrap { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast {
  background: var(--txt); color: #fff;
  padding: 10px 16px; border-radius: 10px;
  font-size: 13px; font-weight: 500;
  box-shadow: var(--sh2);
  animation: ti .2s ease;
}
.toast.ok  { background: var(--ok); }
.toast.warn{ background: var(--warn); color: #fff; }
.toast.err { background: var(--err); }
@keyframes ti { from { opacity: 0; transform: translateY(10px); } }

/* ============================ MODAL / VIEWER ============================ */
.modal { position: fixed; inset: 0; background: rgba(16,24,40,.55); z-index: 200; display: flex; align-items: center; justify-content: center; padding: 24px; }
.modal[hidden] { display: none; }  /* 覆盖 .modal 的 display:flex，确保 hidden 真正隐藏 */

.viewer-box { position: relative; width: min(900px, 92vw); max-height: 90vh; background: var(--white); border-radius: 14px; box-shadow: 0 20px 60px rgba(16,24,40,.35); display: flex; flex-direction: column; overflow: hidden; }
.viewer-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: var(--bg); }
.viewer-hd b { font-size: 15px; font-weight: 700; color: var(--txt); flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-back { padding: 5px 12px; border-radius: 8px; border: 1px solid var(--line); background: var(--white); color: var(--txt2); font-size: 13px; cursor: pointer; }
.viewer-back:hover { background: var(--bg2); }
.viewer-body { flex: 1; overflow: auto; padding: 16px; }
.viewer-grid { display: grid; grid-template-columns: repeat(auto-fill, 96px); justify-content: center; gap: 12px; }
.viewer-thumb { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 10px 6px; border-radius: 10px; cursor: pointer; transition: background .15s, border-color .15s; border: 1px solid transparent; }
.viewer-thumb:hover { background: var(--bg2); border-color: var(--line); }
.viewer-thumb.active { background: rgba(91,95,247,.12); border-color: var(--pri); }
.viewer-thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 6px; background: var(--bg); display: block; }
.viewer-thumb span { font-size: 11px; color: var(--txt2); text-align: center; line-height: 1.3; max-width: 100%; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; word-break: break-all; }
.viewer-single { display: flex; align-items: center; justify-content: center; min-height: 220px; }
.viewer-single img { display: block; max-width: 100%; max-height: 70vh; border-radius: 8px; background: var(--white); object-fit: contain; }
.viewer-single img[hidden] { display: none; }
.viewer-err-msg { display: none; color: var(--txt); background: var(--bg2); padding: 18px 24px; border-radius: 8px; text-align: center; }
.viewer-single.has-err .viewer-err-msg { display: block; }
/* 大图左右翻页（2026-09-18）：箭头悬浮在图两侧，无图可翻时用 hidden 隐藏 */
.viewer-single { position: relative; width: 100%; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 42px; height: 60px; border: 0; border-radius: 10px; background: rgba(17,24,39,.5); color: #fff; font-size: 28px; line-height: 1; cursor: pointer; z-index: 2; display: flex; align-items: center; justify-content: center; user-select: none; }
.viewer-nav:hover { background: rgba(17,24,39,.75); }
.viewer-nav.prev { left: 8px; }
.viewer-nav.next { right: 8px; }
.viewer-nav[hidden] { display: none; }
/* 网格里没有预览图的附件（如纯 PDF 记录）用占位图标，不显示破图 */
.viewer-noimg { width: 72px; height: 72px; border-radius: 6px; background: var(--bg); display: flex; align-items: center; justify-content: center; font-size: 30px; }
.viewer-close { width: 32px; height: 32px; border-radius: 50%; border: 0; background: var(--white); color: var(--txt); font-size: 18px; cursor: pointer; box-shadow: var(--sh2); flex: none; }
.viewer-close:hover { background: #f3f4f6; }

/* ============================ RESPONSIVE ============================ */
@media (max-width: 1080px) {
  .stat-row { grid-template-columns: 1fr; }
  .tabs { margin-left: 16px; }
}
@media (max-width: 768px) {
  .topbar { padding: 0 14px; height: 64px; }
  :root { --topbar-h: 64px; }
  .brand-txt small { display: none; }
  .tabs {
    margin-left: 8px;
    padding: 4px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .tabs::-webkit-scrollbar { display: none; }
  .tab {
    padding: 7px 14px; font-size: 13px;
    min-width: 100px; min-height: 36px;
  }
  .tab .t-icon { width: 15px; height: 15px; }
  .tab.active::after { display: none; }
  .topbar-right .btn { padding: 8px 10px; font-size: 12.5px; }
  .topbar-right { gap: 6px; }
  /* 窄屏顶栏放不下：OCR 状态条在手机上无诊断价值，隐藏防溢出（曾竖排溢出遮住按钮） */
  .topbar .badge { display: none; }
  .main { padding: 16px !important; }
  .home-hero { padding: 22px; flex-direction: column; text-align: center; }
  .home-hero .hero-actions { margin-left: 0; flex-wrap: wrap; justify-content: center; }
  .home-hero h1 { font-size: 22px; }
  .life-hero { padding: 24px; }
  .doc-head { flex-direction: column; align-items: stretch; }
  .field input, .field select, .field textarea { font-size: 16px; }
  .grid2 { grid-template-columns: 1fr; }
  .grid2 .span2 { grid-column: auto; }
  .amt-summary { grid-template-columns: repeat(2, 1fr); }
  /* sub-tabs mobile：横向滚动条被隐藏用户不知道能滑 → 改为自动换行，5 个 tab 全部可见 */
  .subtabs {
    display: flex; flex-wrap: wrap;
    width: 100%; max-width: none;
    overflow: visible;
  }
  .stab { flex: 1 1 auto; min-width: 0; padding: 9px 10px; font-size: 12.5px; white-space: nowrap; }
  .stab.active::after { display: none; }
  /* 「出差方式…附件顺序…」说明条：flex 默认收缩到 min-content（中文=一字宽）→
     窄屏被挤成一字一行竖排（2026-09-24 老大截图）。让说明独占一行、按钮换行排。 */
  .attach-toolbar { flex-wrap: wrap; gap: 8px; }
  .mode-note { flex: 1 1 100%; min-width: 0; }
}

/* =============================================================
 * 出差闭环核实弹窗（vmodal）
 * ============================================================= */
.vmodal-mask {
  position: fixed; inset: 0; z-index: 999;
  background: rgba(20, 26, 38, .42);
  backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  animation: vfade .18s ease;
}
@keyframes vfade { from { opacity: 0; } to { opacity: 1; } }
.vmodal {
  width: min(560px, 100%);
  max-height: calc(100vh - 60px);
  background: var(--white);
  border-radius: var(--r);
  box-shadow: var(--sh2);
  display: flex; flex-direction: column;
  overflow: hidden;
  animation: vpop .2s cubic-bezier(.2,.8,.3,1.2);
}
@keyframes vpop { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: none; opacity: 1; } }
.vmodal-hd {
  display: flex; align-items: flex-start; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid var(--line2);
}
.vmodal-hd > div:first-child b { font-size: 17px; color: var(--txt); }
.vsub { margin-top: 3px; font-size: 12.5px; color: var(--txt3); }
.vtag { padding: 1px 8px; border-radius: 20px; font-size: 12px; font-weight: 600; }
.vtag.err { background: var(--err-l); color: var(--err); }
.vtag.warn { background: var(--warn-l); color: #b4730a; }
.vclose {
  border: none; background: var(--bg); color: var(--txt3);
  width: 30px; height: 30px; border-radius: 50%; font-size: 20px; line-height: 1;
  cursor: pointer; flex: none; transition: .15s;
}
.vclose:hover { background: var(--line2); color: var(--txt); }
.vmodal-bd { padding: 14px 20px; overflow-y: auto; }
.vrow {
  display: flex; gap: 12px; padding: 12px;
  border-radius: var(--r-sm); margin-bottom: 10px;
  border: 1px solid var(--line2);
}
.vrow.v-err { background: var(--err-l); border-color: #f6c9c9; }
.vrow.v-warn { background: var(--warn-l); border-color: #f6e0b0; }
.vico {
  flex: none; width: 24px; height: 24px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 14px; color: #fff;
}
.v-err .vico { background: var(--err); }
.v-warn .vico { background: var(--warn); }
.vbody { min-width: 0; }
.vtitle { font-weight: 600; color: var(--txt); font-size: 14.5px; }
.vdetail { margin-top: 3px; font-size: 13px; color: var(--txt2); line-height: 1.5; }
.vchips { margin-top: 8px; display: flex; flex-wrap: wrap; gap: 6px; }
.vchip {
  font-size: 12px; color: var(--txt2);
  background: rgba(255,255,255,.7); border: 1px solid var(--line);
  padding: 2px 9px; border-radius: 20px;
}
.vmodal-ft {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 20px; border-top: 1px solid var(--line2);
}
.vsp { flex: 1; }
.vmodal-ft .btn { flex: none; }
.btn.pri { background: var(--pri); color: #fff; border: 1px solid var(--pri); }
.btn.pri:hover { background: var(--pri-d); }
.btn.ghost { background: transparent; color: var(--txt2); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--bg); }


/* ================= 电子签名（⑤ 电子签名） ================= */
.sign-roles { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 9px; }
.srole {
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: var(--bg2); padding: 8px 10px; display: flex; gap: 9px; align-items: center;
}
.srole.on { border-color: var(--pri); background: var(--pri-l); }
.srole-thumb {
  flex: none; width: 74px; height: 34px; border-radius: var(--r-xs);
  border: 1px dashed var(--line); background: #fff;
  display: flex; align-items: center; justify-content: center; overflow: hidden;
}
.srole-thumb img { max-width: 100%; max-height: 100%; object-fit: contain; display: block; }
.srole-thumb span { font-size: 11px; color: var(--txt3); }
.srole-b { min-width: 0; flex: 1; }
.srole-n { font-size: 13px; font-weight: 600; color: var(--txt); }
.srole-s { font-size: 11.5px; color: var(--txt3); margin-top: 1px; }
.srole-x {
  flex: none; border: none; background: transparent; color: var(--txt3);
  cursor: pointer; font-size: 15px; line-height: 1; padding: 2px 4px; border-radius: var(--r-xs);
}
.srole-x:hover { background: var(--err-l); color: var(--err); }

.sign-target { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.sign-target span { font-size: 13px; color: var(--txt2); }
.sign-target select {
  border: 1px solid var(--line); border-radius: var(--r-xs); background: #fff;
  padding: 4px 8px; font-size: 13px; color: var(--txt); min-width: 132px;
}
.sign-pad {
  display: block; width: 100%; height: 195px;
  border: 1px solid var(--line); border-radius: var(--r-sm);
  background: #fff;
  /* 手写板要禁掉页面滚动：手机上不设 touch-action 会一画就滚页面 */
  touch-action: none;
  background-image:
    linear-gradient(to bottom, transparent 0, transparent calc(100% - 1px), var(--line2) 100%);
  background-size: 100% 33.34%;
}
.sign-actions { display: flex; align-items: center; gap: 8px; margin-top: 9px; flex-wrap: wrap; }
.sign-actions .btn { cursor: pointer; }
.sign-actions label.btn { display: inline-flex; align-items: center; }

.sign-slots { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 7px; }
.ssl {
  display: flex; align-items: center; gap: 8px; padding: 7px 9px;
  border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--bg2); font-size: 13px;
}
.ssl.on { border-color: var(--pri); background: var(--pri-l); }
.ssl-t { flex: 1; min-width: 0; color: var(--txt); }
.ssl-r { font-size: 11.5px; color: var(--txt3); }
.ssl-no { opacity: .55; }
.ck { display: inline-flex; align-items: center; gap: 5px; cursor: pointer; }

/* ---- 发票植入经办章（20260926a） ---- */
.invstamp-toggle { display: flex; align-items: center; gap: 8px; cursor: pointer; font-size: 13px; color: var(--txt, #2a3142); }
.invstamp-toggle input[type=checkbox] { width: 16px; height: 16px; accent-color: #3b82f6; cursor: pointer; }

/* ==========================================================================
   20261022m —— 手机端精简与适配
   老大实机反馈：① 一大堆描述性文案可以不要，界面更简洁
                 ② 窄屏下三列卡片把文字挤成 2~3 字一行、顶栏按钮被右边缘截断

   设计原则：描述性文案是「第一次用才需要看」的，天天看就是噪音。
   窄屏（≤900px）一律隐藏；桌面端保留（大屏不缺这点空间，且首次上手仍需要）。
   ========================================================================== */
@media (max-width: 900px) {
  /* ① 描述性 / 说明性文案：窄屏不显示 */
  .hint,                  /* 表单下方灰字说明（含 routeHint） */
  .inbox-sub,             /* 收件箱副标题 */
  .inbox-hint,            /* 「误分类时导出此日志发我…」——开发调试用，手机上没意义 */
  .mode-note,             /* 「附件顺序：派车单 → 仪表盘拍照 → …」长串 */
  .exp-txt p,             /* 导出卡片下的说明段落 */
  .opt {                  /* 「（选填 · 由报销人填写；…）」 */
    display: none !important;
  }

  /* ② 导出卡片：图标 + 文字一行，按钮独占下一行整宽
        （原来 图标|文字|按钮 三列在窄屏把文字挤成 2~3 字一行） */
  .exp-item { flex-wrap: wrap; row-gap: 12px; align-items: flex-start; padding: 16px; }
  .exp-ic { width: 40px; height: 40px; border-radius: 11px; font-size: 12px; }
  .exp-txt { flex: 1 1 calc(100% - 56px); min-width: 0; }
  .exp-item > .btn { flex: 1 1 100%; margin-left: 0; }

  /* ③ 顶栏：放开品牌最小宽 + 收起长标签(导出备份→备份)，解决右侧按钮贴边 */
  .topbar { padding: 0 10px; }
  .brand { min-width: 0; gap: 8px; }
  .topbar-right { gap: 6px; }
  .topbar-right .btn { padding: 6px 9px; font-size: 12px; white-space: nowrap; }
  #envBadge { display: none; }
  .brand-txt b { font-size: 14px; }
  .lb-full { display: none; }
  .lb-short { display: inline; }

  /* ④ 按钮组允许换行，别溢出屏幕（「清空全部」曾被截断） */
  .attach-toolbar { flex-wrap: wrap; gap: 8px; }
  .attach-tools { flex-wrap: wrap; gap: 8px; }
  .inbox-actions { flex-wrap: wrap; gap: 8px; }
}

@media (max-width: 430px) {
  .topbar-right .btn { padding: 5px 7px; font-size: 11.5px; }
  .menu-toggle { width: 38px; height: 38px; margin-right: 0; }
  .brand { gap: 6px; }
  .exp-item { padding: 14px; }
}
