:root {
  --bg: #f5f6f8;
  --card: #ffffff;
  --text: #1f2329;
  --muted: #8a919c;
  --line: #e5e7eb;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --danger: #dc2626;
  --ok: #16a34a;
  --radius: 12px;
  --shadow: 0 1px 3px rgba(16, 24, 40, .08);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--text); line-height: 1.5;
  padding-bottom: 48px;
}
.app { max-width: 720px; margin: 0 auto; padding: 16px 12px; }
.hidden { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.err { color: var(--danger); margin-top: 8px; }

/* 卡片 */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px; margin-bottom: 12px;
}
.card-title { font-weight: 600; margin-bottom: 12px; font-size: 15px; }
.card-title.flex { display: flex; align-items: center; gap: 8px; }
.card-title.flex .btn { margin-left: auto; }
.subtitle { font-size: 13px; font-weight: 600; color: var(--muted); margin: 16px 0 8px; }

/* 登录 */
.login-card { max-width: 360px; margin: 15vh auto 0; text-align: center; }
.login-card h1 { font-size: 22px; margin-bottom: 4px; }
#login-form { display: flex; flex-direction: column; gap: 10px; margin-top: 14px; }
#login-form input { padding: 12px; border: 1px solid var(--line); border-radius: 8px; font-size: 15px; }

/* 顶栏 */
.topbar { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; flex-wrap: wrap; }
.brand { font-weight: 700; font-size: 17px; margin-right: auto; }
.month-nav { display: flex; align-items: center; gap: 6px; }
.month-nav span { min-width: 88px; text-align: center; font-weight: 600; }

/* 汇总 */
.summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 12px; }
.sum { text-align: center; padding: 12px 4px; }
.sum .num { font-size: 17px; font-weight: 700; color: var(--primary); }
.sum .lbl { font-size: 12px; color: var(--muted); }
/* 借款登记（按钮形状） */
.sum-btn {
  cursor: pointer; background: var(--primary); color: #fff; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600; padding: 10px 4px; transition: all .15s;
  border: none; min-height: 52px;
}
.sum-btn:hover { background: var(--primary-dark); box-shadow: 0 2px 8px rgba(37, 99, 235, .35); }
.sum-btn:active { transform: scale(.97); }

/* 按钮 */
.btn {
  border: none; border-radius: 8px; padding: 10px 16px; font-size: 14px; cursor: pointer;
  background: #eef0f3; color: var(--text); transition: filter .15s;
}
.btn:hover { filter: brightness(.96); }
.btn.primary { background: var(--primary); color: #fff; }
.btn.primary:hover { background: var(--primary-dark); }
.btn.primary:disabled { background: #a5c1f5; cursor: not-allowed; }
.btn.ghost { background: transparent; padding: 8px 10px; }
.btn.small { padding: 6px 12px; font-size: 13px; }
.btn.danger { background: #fdecec; color: var(--danger); }

/* 表单 */
.add-form { display: grid; grid-template-columns: 1fr 2fr 1fr auto; gap: 8px; }
.add-form input, .inv-no input {
  padding: 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; min-width: 0;
}
@media (max-width: 560px) {
  .add-form { grid-template-columns: 1fr 1fr; }
  .add-form input[type="date"], .add-form input[type="number"] { grid-column: span 1; }
  .add-form button { grid-column: 1 / -1; }
}

/* 记录卡片 */
.record {
  border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; background: #fff;
}
.record-head { display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.rec-date { color: var(--muted); font-size: 13px; white-space: nowrap; }
.rec-item { font-weight: 600; flex: 1; min-width: 140px; }
.rec-amount { font-weight: 700; color: var(--primary); white-space: nowrap; }
.record-meta { display: flex; gap: 12px; align-items: center; margin-top: 8px; flex-wrap: wrap; }
.inv-no { display: flex; align-items: center; gap: 6px; }
.inv-no input { width: 220px; padding: 6px 8px; font-size: 13px; }
.inv-no .tag { color: var(--ok); font-size: 12px; }
.record-actions { display: flex; gap: 6px; margin-left: auto; }

/* 截图 */
.shots { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding: 4px; border-radius: 8px; }
.shots.drag { outline: 2px dashed var(--primary); background: #eff6ff; }
.shot { position: relative; }
.shot img { width: 72px; height: 96px; object-fit: cover; border-radius: 6px; border: 1px solid var(--line); }
.shot .del { position: absolute; top: -6px; right: -6px; background: var(--danger); color: #fff;
  border-radius: 50%; width: 18px; height: 18px; font-size: 11px; line-height: 18px; text-align: center; cursor: pointer; }

/* 发票 */
.dropzone {
  border: 2px dashed #c9d2de; border-radius: 10px; padding: 22px 12px; text-align: center;
  color: var(--muted); cursor: pointer; transition: all .15s;
}
.dropzone.drag { border-color: var(--primary); background: #eff6ff; color: var(--primary); }
.queue { margin-top: 10px; }
.q-item { display: flex; align-items: center; gap: 8px; padding: 8px; border: 1px solid var(--line);
  border-radius: 8px; margin-bottom: 6px; flex-wrap: wrap; }
.q-item .name { font-size: 13px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.q-item input { flex: 1; min-width: 200px; padding: 6px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 13px; }
.q-item .ocr { font-size: 12px; color: var(--ok); white-space: nowrap; }
.inv-list .inv-item { display: flex; align-items: center; gap: 8px; padding: 8px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.inv-item .no { font-weight: 600; font-size: 13px; font-family: Consolas, monospace; }
.inv-item .fname { color: var(--muted); font-size: 12px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.inv-item .actions { margin-left: auto; display: flex; gap: 6px; }

/* 生成区 */
#gen-status { font-size: 14px; margin-bottom: 10px; }
.downloads { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.dl {
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; font-size: 13px;
  padding: 8px 14px; border-radius: 8px; background: #eff6ff; color: var(--primary); border: 1px solid #dbe7ff;
}
.dl:hover { background: #e0edff; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }

/* 提示横幅 */
.banner {
  background: #fff7e6; border: 1px solid #ffd591; color: #874d00; border-radius: 10px;
  padding: 10px 14px; display: flex; align-items: center; gap: 10px; justify-content: space-between; margin-bottom: 12px; font-size: 14px;
}

/* toast */
.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  background: rgba(30, 34, 40, .92); color: #fff; padding: 10px 18px; border-radius: 8px;
  font-size: 14px; z-index: 99; max-width: 86vw;
}
.foot { text-align: center; margin-top: 20px; }

/* 工作台任务 */
.task-list { display: flex; flex-direction: column; gap: 10px; }
.task-item {
  display: flex; align-items: center; gap: 12px;
  border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: #fff;
}
.task-icon { font-size: 26px; }
.task-body { flex: 1; min-width: 0; }
.task-name { font-weight: 600; font-size: 15px; }

/* 添加报销：上传入口 */
.add-uploads { display: flex; gap: 8px; flex-wrap: wrap; grid-column: 1 / -1; }
.dropzone {
  flex: 1 1 200px; border: 1.5px dashed #c9d2de; border-radius: 10px; padding: 10px;
  display: flex; flex-direction: column; gap: 6px; align-items: flex-start;
  background: #fbfcfe; transition: all .15s;
}
.dropzone.dz-over { border-color: var(--primary); background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.dz-hint { font-size: 12px; line-height: 1.4; }
.file-btn {
  border: 1.5px dashed #c9d2de; border-radius: 8px; padding: 8px 12px; font-size: 13px;
  color: var(--muted); cursor: pointer; background: #fbfcfe; transition: all .15s;
}
.file-btn:hover { border-color: var(--primary); color: var(--primary); background: #eff6ff; }
.add-file-names { grid-column: 1 / -1; word-break: break-all; min-height: 0; display: flex; flex-wrap: wrap; gap: 2px; }
.add-queue-count { grid-column: 1 / -1; }
.fq-chip {
  display: inline-flex; align-items: center; gap: 4px; margin: 2px 6px 2px 0;
  padding: 2px 4px 2px 8px; background: #eef2f7; border: 1px solid #dbe2ea;
  border-radius: 999px; font-size: 12px; max-width: 100%;
}
.fq-chip b { cursor: pointer; color: var(--danger); font-weight: 700; padding: 0 4px; line-height: 1; }
.fq-chip b:hover { color: #b91c1c; }
#add-form button[type="submit"] { grid-column: 1 / -1; }

/* 借款登记 */
.loan-list { margin-top: 10px; }
.loan-item {
  display: flex; align-items: center; gap: 10px; padding: 8px 0;
  border-bottom: 1px solid var(--line); flex-wrap: wrap;
}
.loan-item:last-child { border-bottom: none; }
.loan-date { color: var(--muted); font-size: 13px; }
.loan-amount { font-weight: 700; min-width: 90px; }
.loan-note { flex: 1; min-width: 80px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* 记录行内发票标签 */
.inv-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.inv-chip {
  display: inline-flex; align-items: center; gap: 6px; font-size: 12px;
  background: #eff6ff; border: 1px solid #dbe7ff; color: #1d4ed8;
  padding: 3px 10px; border-radius: 999px; font-family: Consolas, monospace;
}
.inv-chip b { cursor: pointer; color: var(--danger); font-weight: 700; padding: 0 2px; }
.inv-chip b:hover { color: #b91c1c; }

/* 报销记录：跨月归属标注（如「8月发生」） */
.rec-badge {
  display: inline-flex; align-items: center; font-size: 11px; line-height: 1;
  background: #fff4e5; border: 1px solid #f3d29a; color: #b45309;
  padding: 3px 8px; border-radius: 999px; white-space: nowrap; font-weight: 600;
}

/* 页面内弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .45); z-index: 100;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.modal {
  background: #fff; border-radius: 14px; box-shadow: 0 10px 40px rgba(0,0,0,.2);
  max-width: 400px; width: 100%; padding: 18px;
}
.modal-title { font-weight: 600; font-size: 16px; margin-bottom: 10px; }
.modal-body { font-size: 14px; color: var(--text); white-space: pre-line; margin-bottom: 6px; }
.modal-input {
  width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; margin: 8px 0 4px;
}
.modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 14px; }

/* 考核：通用表格 */
.atable { border-collapse: collapse; width: 100%; font-size: 13px; min-width: 480px; }
.atable th, .atable td {
  border: 1px solid var(--line); padding: 7px 10px; text-align: center; white-space: nowrap;
}
.atable th { background: #f0f4ff; color: var(--primary-dark); font-weight: 600; position: sticky; top: 0; }
.atable tbody tr:nth-child(even) { background: #fafbfc; }
.atable tbody tr:hover { background: #eff6ff; }
.atable td.neg { color: var(--danger); font-weight: 600; }
.atable td.pos { color: var(--success); }
.atable td.roster-cell { text-align: left; white-space: nowrap; }

/* 预览（横向滚动） */
.assess-preview { margin-top: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; max-height: 420px; overflow-y: auto; }

/* 考核名单 */
.roster { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.roster-item { display: flex; align-items: center; gap: 6px; background: #f3f5f8; border: 1px solid var(--line); border-radius: 8px; padding: 4px 8px; font-size: 13px; }
.roster-id { color: var(--muted); font-size: 12px; }
.roster-name { font-weight: 500; }

/* 抖音考核名单编辑区 */
.dy-roster { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.dy-roster-item { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.dy-roster-item .dy-name { width: 120px; }
.dy-roster-item .dy-deduct { width: 100px; }
.dy-roster-item .dy-reward { width: 100px; }
.dy-roster-item input { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; }

/* 拉取明细 */
.source-info { margin-top: 8px; padding: 8px 12px; background: #f6f9ff; border: 1px solid var(--line); border-radius: 8px; }
.source-info ul { margin: 4px 0 0; padding-left: 18px; line-height: 1.7; }

/* 两路独立拉取区块 */
.fetch-block { margin-top: 10px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; background: #fcfcfd; }
.fetch-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.fetch-title { font-weight: 600; font-size: 14px; }
.fetch-state {
  margin-left: auto; font-size: 12px; padding: 2px 10px; border-radius: 999px;
  background: #f0f0f1; color: #888; white-space: nowrap;
}
.fetch-state.ok  { background: #e7f6ec; color: #1a7f3c; }
.fetch-state.err { background: #fdeaea; color: #b3261e; }
.warn-box {
  margin-top: 8px; padding: 8px 10px; font-size: 12px; line-height: 1.6;
  background: #fff8e6; border: 1px solid #f0d9a0; border-radius: 8px; color: #7a5a10;
}

/* 编辑记忆提示条 */
.mem-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  margin: 6px 0 10px; padding: 7px 10px; font-size: 12px; line-height: 1.5;
  background: #eef6ff; border: 1px solid #bcdcff; border-radius: 8px; color: #1d4e89;
}
.mem-bar .btn { white-space: nowrap; }
.mem-actions { display: flex; gap: 6px; }

/* 查看修改弹窗 */
.modal-wide { max-width: 560px; }
.modal-list { max-height: 60vh; overflow-y: auto; margin: 6px 0; padding-right: 4px; }
.edt-sec { font-weight: 600; margin: 12px 0 6px; color: var(--primary); font-size: 13px; }
.edt-sec:first-child { margin-top: 0; }
.edt-item { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; margin-bottom: 8px; background: #fafbfc; }
.edt-name { font-weight: 600; margin-bottom: 4px; }
.edt-line { font-size: 13px; line-height: 1.7; color: #333; }

/* 扣罚表选择弹窗 */
.modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 60;
  display: flex; align-items: center; justify-content: center; padding: 16px;
}
.modal {
  background: #fff; border-radius: 12px; padding: 16px; width: 100%; max-width: 420px;
  box-shadow: 0 12px 32px rgba(0,0,0,.18);
}
.modal-select { width: 100%; margin-top: 8px; padding: 8px; font-size: 14px; border: 1px solid var(--line); border-radius: 8px; }

/* Tab 切换 */
.tab-bar { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.tab-btn { padding: 6px 14px; border: 1px solid var(--line); border-radius: 8px; background: #f6f7f9; color: var(--muted); font-size: 13px; cursor: pointer; }
.tab-btn:hover { background: #eef2f7; }
.tab-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); font-weight: 500; }
.tab-panel { min-height: 20px; }

/* 文本框 */
textarea {
  width: 100%; padding: 10px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 13px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; line-height: 1.5;
  resize: vertical;
}
input[type="month"] { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; }

/* 行内排布 */
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.add-form { display: flex; flex-wrap: wrap; gap: 8px; }
.add-form input { padding: 9px 10px; border: 1px solid var(--line); border-radius: 8px; font-size: 14px; flex: 1 1 140px; }

/* ---------- 考核名单信息管理库 ---------- */
.lib-table { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; max-height: 340px; overflow-y: auto; }
.lib-row {
  display: grid; grid-template-columns: 100px 1fr 84px 84px auto; gap: 6px; align-items: center;
  background: #f8fafc; border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; font-size: 13px;
}
.lib-row input[type="text"], .lib-row input:not([type]) { padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; font-size: 13px; min-width: 0; }
.lib-chk { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; color: var(--text); white-space: nowrap; }
.lib-actions { display: flex; align-items: center; gap: 6px; justify-content: flex-end; }

/* ---------- 可编辑预览 ---------- */
.atable input { padding: 5px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; width: 100%; min-width: 70px; box-sizing: border-box; }
.pv-cell { text-align: center; cursor: pointer; user-select: none; font-weight: 600; min-width: 44px; }
.pv-cell:hover { outline: 2px solid var(--primary); outline-offset: -2px; }
.atable .sum-row { background: #eef2ff; font-weight: 600; }
.atable .sum-row td { border-top: 2px solid var(--primary); }

/* ---------- 飞书抖音新增区域经理提示卡 ---------- */
.warn-title { color: var(--danger); }
.dy-new-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 4px; }
.dy-new-item {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  background: #fff7f7; border: 1px solid #f3c2c2; border-radius: 8px; padding: 8px 10px;
}
.dy-new-name { font-weight: 600; font-size: 14px; }
.dy-new-tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; white-space: nowrap; }
.tag-new { background: #fdecec; color: var(--danger); }
.tag-warn { background: #fff7e6; color: #ad6800; }
.dy-new-item .btn { margin-left: auto; }
.dy-new-head { display: flex; align-items: center; gap: 8px; width: 100%; }
.dy-new-chk { display: flex; align-items: center; gap: 12px; width: 100%; flex-wrap: wrap; }
.dy-new-btns { display: flex; gap: 8px; width: 100%; }
.dy-new-btns .btn { flex: 1 1 0; margin-left: 0; }

/* 已忽略（不再提醒）区 */
/* 已忽略的人员：合并进同一列表、排在最后，并淡化显示 */
.lib-row-ignored { opacity: .62; background: #f1f3f5; border-style: dashed; }
.lib-row-ignored input:disabled { background: #e9edf0; color: #98a4b0; -webkit-text-fill-color: #98a4b0; }
.lib-row-ignored .lib-ignored-tag { margin-left: 4px; }
.lib-ignored-tag { font-size: 12px; padding: 2px 8px; border-radius: 999px; background: #e3e6ea; color: #7a8694; white-space: nowrap; }

/* ============================================================
   移动端优化（≤640px）：顶栏吸顶、汇总 2×2、信息库行两行堆叠、
   表单竖排、预览表更紧凑、tab 横滑、弹窗全屏友好、输入 16px 防 iOS 缩放
   ============================================================ */
@media (max-width: 640px) {
  body { padding-bottom: 56px; -webkit-tap-highlight-color: transparent; }
  .app { max-width: 100%; padding: 8px 10px; }
  .card { padding: 14px 12px; border-radius: 10px; }
  .card-title { font-size: 14px; margin-bottom: 10px; }

  /* 顶栏吸顶、紧凑、可换行 */
  .topbar { position: sticky; top: 0; z-index: 30; background: var(--bg); padding: 6px 0; margin-bottom: 10px; gap: 6px; }
  .brand { font-size: 15px; }
  .btn { padding: 9px 12px; font-size: 13px; }
  .btn.small { padding: 7px 10px; font-size: 13px; }
  .month-nav span { min-width: 72px; font-size: 13px; }
  .month-nav .btn { padding: 6px 10px; }

  /* 输入 16px，避免 iOS 聚焦时整页缩放 */
  input, textarea, select { font-size: 16px; }
  .atable input { font-size: 12px; } /* 表格内编辑框保持紧凑 */

  /* 汇总 2×2 */
  .summary { grid-template-columns: 1fr 1fr; gap: 8px; }
  .sum .num { font-size: 16px; }
  .sum-btn { min-height: 48px; }

  /* 表单：竖排、按钮占满 */
  .add-form { gap: 6px; }
  .add-form button { flex: 1 1 100%; }
  .row { gap: 6px; }

  /* 信息管理库行：两行堆叠 */
  .lib-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "name name"
      "no   del"
      "wx   dy";
    gap: 6px;
    align-items: center;
  }
  .lib-row > :nth-child(1) { grid-area: no; }
  .lib-row > :nth-child(2) { grid-area: name; }
  .lib-row > :nth-child(3) { grid-area: wx; }
  .lib-row > :nth-child(4) { grid-area: dy; }
  .lib-row > :nth-child(5) { grid-area: del; justify-self: end; }
  .lib-row input { font-size: 14px; padding: 8px 8px; }
  .lib-row .lib-chk { font-size: 13px; white-space: nowrap; }

  /* 信息库添加表单竖排 */
  #view-roster-library .add-form { flex-direction: column; align-items: stretch; }
  #view-roster-library .add-form .lib-chk { justify-content: flex-start; }
  #view-roster-library .add-form button { width: 100%; }

  /* 预览表格更紧凑、可横滑 */
  .assess-preview { max-height: 62vh; }
  .atable { font-size: 12px; min-width: 420px; }
  .atable th, .atable td { padding: 6px 7px; }
  .atable input { min-width: 52px; padding: 4px 5px; }
  .pv-cell { min-width: 36px; }
  .atable td.roster-cell { max-width: 120px; overflow: hidden; text-overflow: ellipsis; }

  /* Tab 横向滚动 */
  .tab-bar { flex-wrap: nowrap; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
  .tab-btn { flex: 0 0 auto; white-space: nowrap; }

  /* 弹窗全屏友好 */
  .modal { max-width: 92vw; max-height: 84vh; overflow-y: auto; padding: 16px; }
  .modal-actions { display: flex; gap: 8px; }
  .modal-actions .btn { flex: 1; justify-content: center; }

  /* 两路拉取区块：按钮占满，状态标签换行显示 */
  .fetch-block { padding: 9px; }
  .fetch-head { flex-wrap: wrap; }
  .fetch-block .row .btn { width: 100%; }
  .fetch-block .row .muted { width: 100%; }
  .fetch-block .add-form input { width: 100%; }
  .fetch-block .add-form #btn-douyin-pick { width: 100%; }

  /* 扣罚表选择弹窗：底部弹出更顺手 */
  .modal-mask { align-items: flex-end; padding: 0; }
  .modal { max-width: 100%; border-radius: 14px 14px 0 0; max-height: 70vh; overflow-y: auto; }
  .modal-select { font-size: 16px; padding: 10px; }

  /* 抖音新增提示卡项：按钮占满 */
  .dy-new-item { flex-wrap: wrap; gap: 6px 8px; }
  .dy-new-item .btn { margin-left: 0; width: 100%; }
  .dy-new-chk { gap: 14px; }
  .dy-new-chk .lib-chk { font-size: 14px; }
  .dy-new-btns .btn { padding: 10px 12px; }

  /* 文件按钮占满 */
  .file-btn { flex: 1 1 100%; text-align: center; }

  /* 记录操作按钮占满一行 */
  .record-actions { width: 100%; margin-left: 0; }
  .record-actions .btn { flex: 1; }

  /* 截图缩略图稍小 */
  .shot img { width: 60px; height: 80px; }
}


/* 记录行内发票拖入区 */
.inv-drop { display: flex; align-items: center; justify-content: center; min-height: 40px; margin-top: 8px;
  border: 2px dashed #c9d2de; border-radius: 8px; color: var(--muted); font-size: 13px; transition: all .15s; }
.inv-drop.drag { border-color: var(--primary); background: #eff6ff; color: var(--primary); }

/* 未识别号码的发票标签 */
.inv-chip.warn { background: #fff7ed; border-color: #fdba74; color: #b45309; }

/* 报销文件预览 */
.gen-pv-row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.gen-pv-row .pv-btn { font-weight: 500; }
.pv-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.gen-pv {
  margin-top: 12px; border: 1px solid var(--line); border-radius: 10px;
  padding: 12px; background: #fbfcfe; max-height: 460px; overflow: auto;
}
.pv-head { font-size: 13px; color: var(--muted); margin-bottom: 10px; }
.pv-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.pv-tbl th, .pv-tbl td { border: 1px solid var(--line); padding: 6px 8px; text-align: center; vertical-align: middle; background: #fff; }
.pv-tbl th { background: #f1f5f9; font-weight: 600; white-space: nowrap; }
.pv-tbl td.l { text-align: left; }
.pv-tbl td.r { text-align: right; white-space: nowrap; }
.pv-tbl td.no { text-align: left; line-height: 1.9; }
.pv-block { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 10px; background: #fff; }
.pv-block:last-child { margin-bottom: 0; }
.pv-block-head { display: flex; align-items: center; gap: 8px; font-size: 13px; flex-wrap: wrap; margin-bottom: 8px; }
.pv-block-head .d { color: var(--muted); }
.pv-block-head .it { font-weight: 600; }
.pv-block-head .amt { margin-left: auto; font-weight: 600; }
.pv-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.pv-thumbs img {
  width: 88px; height: 88px; object-fit: cover; border-radius: 6px;
  border: 1px solid var(--line); cursor: zoom-in; background: #fff;
}
.pv-inv-group { border-bottom: 1px dashed var(--line); padding: 8px 0; font-size: 13px; }
.pv-inv-group:last-child { border-bottom: none; }
.pv-inv-group .item { font-weight: 600; margin-bottom: 2px; }
.pv-no {
  display: inline-block; font-family: Consolas, Menlo, monospace; font-size: 12px;
  background: #eef2ff; border: 1px solid #dbe7ff; color: var(--primary);
  border-radius: 6px; padding: 1px 6px; margin: 2px 4px 2px 0; word-break: break-all;
}
.pv-count { color: var(--muted); font-size: 12px; margin-left: 4px; }
.pv-unassign { margin-top: 12px; border-top: 1px solid var(--line); padding-top: 10px; }
.pv-orphan { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pv-orphan .fname { max-width: 200px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pv-sel { padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; font-size: 12px; max-width: 240px; background: #fff; color: var(--text); }
.pv-empty { color: var(--muted); font-size: 13px; }

/* ============ 报销工作台 ============ */
.row-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.wb-root { margin-top: 4px; }
.wb-bar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.wb-tabs { display: flex; gap: 2px; background: #f1f3f7; border-radius: 10px; padding: 3px; }
.wb-tab {
  border: 0; background: transparent; color: #5b6472; font: inherit; font-size: 13px;
  padding: 6px 12px; border-radius: 8px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.wb-tab:hover { color: var(--text); }
.wb-tab.active { background: #fff; color: var(--primary); font-weight: 600; box-shadow: 0 1px 2px rgba(16,24,40,.08); }
.wb-bar > #btn-generate { margin-left: auto; }

/* 体检行 */
.wb-audit { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.wb-chip {
  border: 1px solid var(--line); background: #fff; color: #475569; font: inherit; font-size: 12px;
  padding: 3px 10px; border-radius: 999px; cursor: pointer; transition: all .15s;
}
.wb-chip:hover { border-color: #c7d2e0; color: var(--text); }
.wb-chip.warn { background: #fffbeb; border-color: #fcd9a4; color: #b45309; }
.wb-chip.err { background: #fef2f2; border-color: #fbcaca; color: #b91c1c; }
.wb-chip.ok { background: #f0fdf4; border-color: #bbf7d0; color: #15803d; cursor: default; }

/* 定位条（三视图共享） */
.wb-anchor {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  background: #eff6ff; border: 1px solid #bfdbfe; color: #1e40af;
  border-radius: 8px; padding: 6px 10px; margin-bottom: 10px; font-size: 12.5px;
}
.wb-saved { font-size: 12px; color: var(--ok); opacity: 0; transition: opacity .2s; margin-left: 8px; }
.wb-saved.on { opacity: 1; }

.wb-body { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.wb-empty { padding: 26px 14px; text-align: center; color: var(--muted); font-size: 13px; }
.wb-tip { font-size: 12px; color: var(--muted); padding: 9px 12px; background: #fafbfd; border-top: 1px solid var(--line); margin: 0; }

/* 明细表 */
.wb-dhead, .wb-drow { display: grid; grid-template-columns: 116px minmax(0,1fr) 92px 1.15fr 138px; gap: 8px; align-items: center; padding: 7px 10px; }
.wb-dhead { background: #f7f8fa; font-size: 11.5px; color: var(--muted); border-bottom: 1px solid var(--line); }
.wb-drow { border-bottom: 1px solid #f1f3f7; transition: background .12s; position: relative; }
.wb-drow:last-child { border-bottom: 0; }
.wb-drow:hover { background: #fafbfd; }
.wb-drow.on { background: #f5f9ff; }
.wb-drow.on::before, .wb-group.anchor::before {
  content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--primary);
}
.wb-drow input {
  width: 100%; border: 1px solid transparent; background: transparent; border-radius: 6px;
  padding: 4px 6px; font: inherit; font-size: 13px; color: var(--text);
}
.wb-drow input:hover { border-color: var(--line); background: #fff; }
.wb-drow input:focus { outline: none; border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.wb-drow input[type="number"] { text-align: right; font-variant-numeric: tabular-nums; font-family: ui-monospace, Consolas, monospace; }
.wb-drow input.saving { border-color: #fcd9a4; background: #fffbeb; }
.wb-chip-num, .c-nos { font-variant-numeric: tabular-nums; }
.c-nos { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; }
.wb-no {
  font-family: ui-monospace, Consolas, monospace; font-size: 11.5px; color: #15803d;
  background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 5px; padding: 1px 5px;
}
.wb-nono { font-size: 12px; color: #b45309; }
.wb-goto { font-size: 11.5px; color: var(--primary); cursor: pointer; margin-left: 2px; white-space: nowrap; }
.c-act { display: flex; gap: 5px; align-items: center; justify-content: flex-end; }
.wb-bdg {
  font-size: 11.5px; font-weight: 500; color: #475569; background: #f1f5f9;
  border-radius: 5px; padding: 1px 6px; cursor: pointer; white-space: nowrap;
}
.wb-bdg:hover { background: #e2e8f0; }
.wb-bdg.warn { background: #fffbeb; color: #b45309; }
.wb-mini {
  font: inherit; font-size: 11.5px; border: 1px solid var(--line); background: #fff; color: #475569;
  border-radius: 5px; padding: 2px 8px; cursor: pointer; white-space: nowrap;
}
.wb-mini:hover { border-color: #c7d2e0; color: var(--text); }
.wb-mini.danger { color: var(--danger); border-color: #fbcaca; }
.wb-mini.danger:hover { background: #fef2f2; }

/* 分组（截图 / 发票视图） */
.wb-group { border-bottom: 1px solid #f1f3f7; position: relative; }
.wb-group:last-child { border-bottom: 0; }
.wb-ghead {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px; background: #fafbfd;
  cursor: pointer; flex-wrap: wrap;
}
.wb-ghead:hover { background: #f5f7fa; }
.wb-ghead.on { background: #eef4ff; }
.wb-ghead .g-pin { width: 4px; height: 14px; border-radius: 2px; background: #dbe2ea; flex: 0 0 4px; }
.wb-ghead.on .g-pin { background: var(--primary); }
.wb-ghead .g-date { font-size: 12.5px; color: var(--muted); }
.wb-ghead .g-item { font-size: 13px; font-weight: 600; }
.wb-ghead .g-amt { font-size: 12.5px; color: var(--text); font-variant-numeric: tabular-nums; }
.wb-ghead .g-tail { margin-left: auto; font-size: 11.5px; color: var(--muted); }
.wb-ghead .g-tail.warn { color: #b45309; }

.wb-drop {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; cursor: pointer;
  margin: 0 10px 10px; padding: 9px; border: 1px dashed #d8dee8; border-radius: 8px; background: #fcfdff;
  transition: all .15s; min-height: 44px;
}
.wb-drop.over { border-color: var(--primary); background: #eff6ff; box-shadow: 0 0 0 3px rgba(37,99,235,.1); }
.wb-drop img, .wb-drop b, .wb-drop .wb-inv, .wb-drop select { cursor: pointer; }
.wb-drop-hint { font-size: 12px; color: var(--muted); }
.wb-drop-hint.add { color: var(--primary); }
.wb-drow.over { background: #eff6ff; box-shadow: inset 0 0 0 2px rgba(37,99,235,.35); }
.wb-thumb { position: relative; width: 62px; height: 62px; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); }
.wb-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; cursor: zoom-in; }
.wb-thumb b {
  position: absolute; top: 0; right: 0; width: 18px; height: 18px; line-height: 16px; text-align: center;
  background: rgba(15,23,42,.62); color: #fff; font-size: 13px; border-radius: 0 0 0 6px; cursor: pointer;
}
.wb-inv {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px;
  background: #f0fdf4; border: 1px solid #bbf7d0; color: #15803d; border-radius: 6px; padding: 3px 7px;
  font-family: ui-monospace, Consolas, monospace; max-width: 100%;
}
.wb-inv.warn { background: #fffbeb; border-color: #fcd9a4; color: #b45309; font-family: inherit; }
.wb-inv-t { cursor: text; overflow: hidden; text-overflow: ellipsis; }
.wb-inv-t:hover { text-decoration: underline dotted; }
.wb-inv b { cursor: pointer; color: var(--danger); font-weight: 700; padding: 0 1px; }
.wb-inv-input {
  font: inherit; font-size: 12px; font-family: ui-monospace, Consolas, monospace;
  border: 1px solid var(--primary); border-radius: 5px; padding: 2px 6px; width: 186px; max-width: 60vw;
}
.wb-inv-loading { font-size: 12px; color: var(--muted); }
.wb-orphan { padding: 10px; background: #fffdf7; border-top: 1px solid #fde9c8; }
.wb-otitle { font-size: 12px; color: #b45309; margin-bottom: 7px; }
.wb-orow { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 5px 0; }
.wb-ofn { font-size: 12px; color: var(--muted); flex: 1; min-width: 90px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.wb-orow select { font: inherit; font-size: 12px; padding: 4px 6px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }

/* 重识别面板（内嵌在报销文件卡内） */
.wb-rescan { border: 1px solid #e3e8ef; border-radius: 10px; padding: 12px; margin: 10px 0 12px; background: #fbfdff; }
.wb-rescan-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 8px; }
.wb-chk { font-size: 12.5px; color: #334155; display: flex; gap: 5px; align-items: center; }
.wb-rescan-stats { font-size: 13px; color: #334155; margin: 2px 0 8px; }
.wb-rescan-log { max-height: 360px; overflow: auto; background: #fff; border: 1px solid #e3e8ef; border-radius: 8px; }
.wb-rescan-tip { margin: 8px 0 0; line-height: 1.7; }

/* 添加报销弹窗 */
.add-modal-card { max-width: 560px; width: 100%; }
.add-modal-head { display: flex; align-items: center; margin-bottom: 10px; }
.add-modal-head .t { font-weight: 600; font-size: 15px; }
.add-modal-head .btn { margin-left: auto; }

@media (max-width: 720px) {
  .wb-dhead { display: none; }
  .wb-drow { grid-template-columns: minmax(0,1fr) 92px; row-gap: 6px; padding: 9px 10px; }
  .wb-drow .c-date { grid-column: 1; }
  .wb-drow .c-amt { grid-column: 2; }
  .wb-drow .c-item { grid-column: 1; }
  .wb-drow .c-nos { grid-column: 1 / -1; }
  .wb-drow .c-act { grid-column: 1 / -1; justify-content: flex-start; }
  .wb-bar > #btn-generate { margin-left: 0; width: 100%; }
  .wb-inv-input { width: 150px; }
}

/* ============ 文件查看器（发票 PDF / 付款截图） ============ */
body.fv-lock { overflow: hidden; }
.wb-inv-eye {
  cursor: pointer; font-weight: 500; font-family: inherit; font-size: 11.5px;
  color: #0f766e; padding: 0 2px; text-decoration: underline dotted; text-underline-offset: 2px;
}
.wb-inv.warn .wb-inv-eye { color: #b45309; }
.wb-inv-eye:hover { color: var(--primary); }
.wb-no.click { cursor: pointer; }
.wb-no.click:hover { border-color: var(--primary); color: var(--primary); background: #eff6ff; }
.wb-thumb img { cursor: zoom-in; }

.fv-root { position: fixed; inset: 0; z-index: 90; display: flex; align-items: center; justify-content: center; padding: 20px; }
.fv-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, .6); }
.fv-panel {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  width: min(1060px, 100%); height: min(88vh, 920px);
  background: #fff; border-radius: 14px; box-shadow: 0 24px 64px rgba(15, 23, 42, .38);
}
.fv-head {
  display: flex; align-items: center; gap: 10px; justify-content: space-between;
  padding: 9px 12px; border-bottom: 1px solid var(--line); background: #fbfcfe; flex: none;
}
.fv-hl { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.fv-title { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 44vw; }
.fv-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 44vw; }
.fv-tools { display: flex; align-items: center; gap: 6px; flex: none; }
.fv-btn {
  font: inherit; font-size: 12px; padding: 5px 10px; border: 1px solid var(--line);
  background: #fff; color: #475569; border-radius: 7px; cursor: pointer; transition: all .15s; white-space: nowrap;
}
.fv-btn:hover { border-color: var(--primary); color: var(--primary); }
.fv-btn.primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.fv-btn.primary:hover { background: var(--primary-dark); color: #fff; }
.fv-btn.mini { padding: 2px 7px; font-size: 11.5px; }
.fv-btn[disabled] { opacity: .45; cursor: default; border-color: var(--line); color: #94a3b8; }
.fv-x { padding: 5px 9px; }
.fv-sep { width: 1px; height: 18px; background: var(--line); margin: 0 2px; }
.fv-body {
  flex: 1; overflow: auto; background: #eef1f5; padding: 18px;
  display: flex; align-items: flex-start; justify-content: center;
}
.fv-stage { display: flex; flex-direction: column; align-items: center; gap: 12px; min-width: 100%; }
.fv-canvas { background: #fff; border-radius: 4px; box-shadow: 0 2px 12px rgba(15, 23, 42, .18); display: block; }
.fv-img { max-width: 100%; background: #fff; border-radius: 4px; box-shadow: 0 2px 12px rgba(15, 23, 42, .18); display: block; }
.fv-frame { width: 100%; height: 100%; min-height: 60vh; border: 0; background: #fff; }
.fv-load { color: var(--muted); font-size: 13px; padding: 48px 0; }
.fv-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 9px 12px; border-top: 1px solid var(--line); background: #fbfcfe; flex: none;
}
.fv-pager { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); }
.fv-pg { font-variant-numeric: tabular-nums; }
.fv-hint { color: #94a3b8; }
.fv-numwrap { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fv-lb { font-size: 12px; color: var(--muted); }
.fv-warn { font-size: 11.5px; color: #b45309; background: #fffbeb; border: 1px solid #fcd9a4; border-radius: 5px; padding: 1px 6px; }
.fv-no {
  font: inherit; font-size: 13px; font-family: ui-monospace, Consolas, monospace;
  font-variant-numeric: tabular-nums; letter-spacing: .3px;
  padding: 6px 10px; width: 220px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--text);
}
.fv-no:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }

@media (max-width: 720px) {
  .fv-root { padding: 0; }
  .fv-panel { width: 100%; height: 100%; border-radius: 0; }
  .fv-title, .fv-sub { max-width: 52vw; }
  .fv-body { padding: 10px; }
  .fv-no { width: 160px; }
  .fv-tools .fv-btn:not(.fv-x):not([data-fv="prev"]):not([data-fv="next"]) { display: none; }
  .fv-tools .fv-sep { display: none; }
}

/* ============================================================================
   区域经理考核 · 重构版样式（2026-09-15）
   ========================================================================= */

/* —— 顶部控制条（月份 · 状态 · 主操作）—— */
.card.as-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  position: sticky; top: 0; z-index: 6;
  background: #fff; border-bottom: 2px solid var(--line);
  box-shadow: 0 2px 8px rgba(16, 24, 40, .05);
  padding: 10px 14px; margin-bottom: 12px;
}
.as-bar-left { display: flex; align-items: center; gap: 6px; }
.as-month {
  padding: 6px 9px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 14px; font-weight: 600; color: var(--text); background: #fff; font-family: inherit;
}
.as-month:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.as-bar-mid { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-left: auto; }
.as-bar-note { font-size: 12px; color: var(--muted); }
.as-bar-right { display: flex; align-items: center; gap: 8px; }

/* —— 状态灯 —— */
.as-dot {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 12px; padding: 3px 9px; border-radius: 999px;
  background: #f1f3f6; color: #6b7280; white-space: nowrap;
}
.as-dot::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: #c3c9d2; flex: 0 0 auto; }
.as-dot.ok { background: #e7f6ec; color: #12703a; }
.as-dot.ok::before { background: #16a34a; box-shadow: 0 0 0 3px rgba(22, 163, 74, .15); }
.as-dot.run { background: #eef4ff; color: #1d4ed8; }
.as-dot.run::before { background: #2563eb; animation: asPulse 1s ease-in-out infinite; }
.as-dot.err { background: #fdeaea; color: #b3261e; }
.as-dot.err::before { background: #dc2626; }
@keyframes asPulse { 0%, 100% { opacity: 1 } 50% { opacity: .3 } }

/* —— 步骤头 —— */
.as-step { }
.as-step-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.as-num {
  width: 22px; height: 22px; border-radius: 50%; flex: 0 0 auto;
  background: var(--primary); color: #fff; font-size: 12px; font-weight: 700;
  display: inline-flex; align-items: center; justify-content: center;
}
.as-step-title { font-weight: 600; font-size: 15px; }
.as-step-hint { font-size: 12px; color: var(--muted); }
.as-step-head .btn { margin-left: auto; }
.as-pill { font-size: 12px; padding: 2px 9px; border-radius: 999px; background: #eef2f7; color: #4b5563; white-space: nowrap; }
.as-pill.ok { background: #e7f6ec; color: #12703a; }
.as-pill.warn { background: #fff3e0; color: #b45309; }

/* —— 数据源表单 —— */
.as-settings { border-top: 1px dashed var(--line); padding-top: 12px; margin-top: 2px; }
.as-field { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.as-field-label { flex: 0 0 78px; font-size: 13px; color: #374151; }
.as-field input {
  flex: 1 1 320px; min-width: 0; padding: 8px 10px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 13px; font-family: inherit;
}
.as-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.as-test {
  margin: 0 0 10px 86px; padding: 8px 10px; border-radius: 8px;
  font-size: 12.5px; line-height: 1.7; background: #f6f9ff; border: 1px solid var(--line);
}
.as-test.ok { background: #f0fdf4; border-color: #bbf7d0; color: #14532d; }
.as-test.err { background: #fef2f2; border-color: #fecaca; color: #991b1b; }
.as-test code { background: rgba(0, 0, 0, .05); padding: 1px 5px; border-radius: 4px; font-size: 12px; }

/* —— 拉取两格 —— */
.as-fetch-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.as-fetch { border: 1px solid var(--line); border-radius: 10px; padding: 10px; background: #fcfdff; }
.as-fetch-top { display: flex; align-items: center; gap: 8px; margin-bottom: 5px; flex-wrap: wrap; }
.as-fetch-name { font-weight: 600; font-size: 13.5px; }
.as-fetch-top .as-dot { margin-left: auto; }
.as-fetch-detail { font-size: 12.5px; color: #4b5563; line-height: 1.65; word-break: break-all; min-height: 20px; }
.as-fetch-extra { display: flex; gap: 6px; margin-top: 8px; }
.as-fetch-extra input {
  flex: 1 1 auto; min-width: 0; padding: 6px 8px;
  border: 1px solid var(--line); border-radius: 8px; font-size: 12.5px; font-family: inherit;
}

/* —— 错误就地展开 —— */
.as-error { margin-top: 10px; border: 1px solid #fecaca; border-radius: 10px; overflow: hidden; background: #fff; }
.as-error-head { display: flex; align-items: center; gap: 8px; padding: 9px 12px; background: #fef2f2; color: #991b1b; font-size: 13.5px; }
.as-error-acts { margin-left: auto; display: flex; gap: 6px; }
.as-error-body {
  padding: 10px 12px; font-size: 12.5px; line-height: 1.75; color: #334155;
  word-break: break-word; max-height: 280px; overflow: auto;
}
.as-error-body ul { padding-left: 18px; }
.as-error-body li { margin: 2px 0; }

/* —— 提示卡 —— */
.as-notice { margin-top: 10px; border: 1px solid #fde68a; background: #fffbeb; border-radius: 10px; padding: 10px 12px; }
.as-notice-head { font-size: 13.5px; color: #92400e; margin-bottom: 6px; }

/* —— 名单抽屉 —— */
.dr-mask {
  position: fixed; inset: 0; background: rgba(17, 24, 39, .45); z-index: 60;
  display: flex; justify-content: flex-end;
}
.dr-panel {
  width: min(580px, 94vw); height: 100%; background: #fff;
  display: flex; flex-direction: column; box-shadow: -8px 0 26px rgba(16, 24, 40, .2);
  animation: drIn .18s ease-out;
}
@keyframes drIn { from { transform: translateX(26px); opacity: .55 } to { transform: none; opacity: 1 } }
.dr-head { display: flex; align-items: flex-start; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dr-title { font-weight: 700; font-size: 16px; }
.dr-head .btn { margin-left: auto; }
.dr-body { flex: 1; overflow: auto; padding: 14px 16px; -webkit-overflow-scrolling: touch; }
.dr-body .lib-table { max-height: none; }
.dr-foot { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-top: 1px solid var(--line); background: #fafbfc; }

/* —— 响应式 —— */
@media (max-width: 720px) {
  .as-fetch-grid { grid-template-columns: 1fr; }
  .as-bar { position: static; padding: 10px; }
  .as-bar-mid { order: 3; width: 100%; margin-left: 0; }
  .as-bar-right { width: 100%; }
  .as-bar-right .btn { flex: 1 1 auto; }
  .as-field-label { flex: 0 0 100%; }
  .as-field input { flex: 1 1 100%; }
  .as-test { margin-left: 0; }
  .as-step-head .btn { margin-left: 0; width: 100%; }
  .dr-panel { width: 100%; }
}

/* —— 日期表归属提示（被忽略的历史表明细）—— */
.warn-detail { margin-top: 6px; }
.warn-detail > summary {
  cursor: pointer; font-weight: 600; color: #8a6410;
  list-style: none; display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 0; user-select: none;
}
.warn-detail > summary::-webkit-details-marker { display: none; }
.warn-detail > summary::before { content: '\25B8'; font-size: 10px; transition: transform .15s; }
.warn-detail[open] > summary::before { transform: rotate(90deg); }
.warn-detail > summary:hover { text-decoration: underline; }
.warn-detail-row { font-size: 12px; line-height: 1.7; color: #8a6410; opacity: .92; padding-left: 10px; }

/* —— 日期表归属提示：明细高度上限 —— */
.warn-detail { max-height: 260px; overflow: auto; padding-right: 4px; }
.warn-detail > summary { position: sticky; top: 0; background: #fff8e6; }

/* ---------- ② 抖音考核表 · 空态卡（说明为什么空 + 一键补齐） ---------- */
.dy-empty {
  margin: 10px 0 4px;
  border: 1px solid #fde68a;
  background: #fffbeb;
  border-radius: 10px;
  padding: 12px 14px;
}
.dy-empty-t { font-size: 14px; font-weight: 700; color: #92400e; margin-bottom: 6px; }
.dy-empty-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 6px 12px;
  margin: 8px 0 2px;
  font-size: 13px;
}
.dy-empty-grid span {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  padding: 5px 9px;
  background: #fff;
  border: 1px solid #fde68a;
  border-radius: 6px;
  color: #555;
}
.dy-empty-grid b { color: #92400e; }

/* 待办事项看板（主页） */
.kanban { display: flex; gap: 10px; overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: 4px; }
.kanban-col { flex: 1 1 0; min-width: 196px; background: #f7f8fa; border: 1px solid var(--line); border-radius: 10px; padding: 8px; }
.kc-head { font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 8px; display: flex; align-items: center; gap: 6px; }
.kc-count { background: #e5e7eb; color: var(--text); border-radius: 10px; padding: 0 7px; font-size: 12px; font-weight: 500; }
.kc-body { display: flex; flex-direction: column; gap: 8px; min-height: 44px; }
.todo-card-item { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 9px 10px; box-shadow: var(--shadow); }
.tci-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.tci-pri { font-size: 11px; font-weight: 600; padding: 1px 7px; border-radius: 6px; }
.pri-高 { background: #fdecec; color: var(--danger); }
.pri-中 { background: #fff4e0; color: #b76e00; }
.pri-低 { background: #e8f5ee; color: var(--ok); }
.tci-del { background: transparent; border: none; color: var(--muted); font-size: 14px; line-height: 1; cursor: pointer; padding: 0 2px; }
.tci-del:hover { color: var(--danger); }
.tci-title { font-size: 14px; font-weight: 600; line-height: 1.4; word-break: break-word; }
.tci-note { margin-top: 3px; word-break: break-word; }
.tci-due { margin-top: 3px; }
.tci-actions { display: flex; gap: 6px; margin-top: 8px; }
.tci-move, .tci-edit { flex: 1; background: #f0f2f5; border: 1px solid var(--line); border-radius: 7px; padding: 5px 0; font-size: 13px; cursor: pointer; color: var(--text); }
.tci-move:hover, .tci-edit:hover { background: #e6e9ee; }
.fld-lbl { display: block; font-size: 13px; color: var(--muted); margin-top: 10px; }
