/* v13.css —— 批量任务组件层（迭代 2026-08-18）
   纸片头（composer 内层叠）/ 覆盖右栏的双态浮窗（列表 720 版心 · 阅读=左书签 216 + 右文章 760）/ 配置弹窗（定高 560 防跳屏）。
   浮窗容器复用 .drawer 基类（layout.css inset/transform/z；mobile.css z46；theme-dark 阴影自动适用）。
   暗色差异按惯例在 theme-dark.css 尾部（本文件仅亮色）。交互在 js/batch.js；UI 基准=迭代目录三轮验收稿。 */

/* ============ 纸片头（batch-peek） ============ */
/* composer 为 pointer-events:none 的渐变层——纸片头需显式恢复可点。
   亮色=无边框平面灰纸片（生产二轮 2026-08-18 对齐用户参考图：灰片压在白输入条背后，色差分明）；
   暗色观感保持首版（theme-dark §14 显式回写 soft-2 底+line 描边+深阴影）。 */
.batch-peek {
  pointer-events: auto;
  position: relative; z-index: 1;
  margin: 0 14px -13px;                 /* 负 margin 层叠：下沿 13px 塞进输入条背后（露头一截纸） */
  display: flex; align-items: center; gap: 8px;
  background: var(--line);
  border: 1px solid transparent; border-bottom: none;
  border-radius: var(--r-lg) var(--r-lg) 0 0;
  padding: 8px 16px 21px;
  cursor: pointer;
  transition: transform var(--t-fast) var(--ease), background var(--t-fast);
}
.batch-peek:hover { background: var(--line-hover); transform: translateY(-2px); }
.batch-peek:focus-visible { outline: none; box-shadow: var(--focus-ring); }
/* 输入条显式建层压过纸片头下沿（生产二轮修复：peek 有定位上下文（z1）而输入条原是 static——
   定位元素画在 static 之上，重叠带反被 peek 盖住，发送按钮上缘遭截断） */
.composer-inner .input-bar { position: relative; z-index: 2; }
.bp-ico { position: relative; width: 15px; height: 15px; color: var(--ink-2); flex: none; }
.bp-ico svg { display: block; }
.bp-dot { position: absolute; right: -3px; top: -3px; width: 6px; height: 6px; border-radius: var(--r-circle); background: var(--red); display: none; }
.batch-peek.has-unread .bp-dot { display: block; }
.bp-name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink-2); flex: none; }
.bp-sum { margin-left: auto; font-size: var(--fs-xs); display: flex; gap: 10px; white-space: nowrap; overflow: hidden; min-width: 0; }
.bp-sum .ok { color: var(--green-d); font-weight: var(--fw-semibold); }
.bp-sum .pend { color: var(--ink-3); }
.bp-sum .fail { color: var(--red); font-weight: var(--fw-semibold); }
.bp-sum .hint { color: var(--ink-3); }

/* ============ 浮窗骨架（.drawer 基类 + batch 内部布局） ============ */
.batch-drawer .bt-head {
  flex: none; position: relative;
  display: flex; align-items: center;
  height: var(--topbar-h); padding: 0 20px;
  border-bottom: 1px solid var(--line);
}
/* 头部内层对齐 720 版心：标题左缘=内容左缘、主按钮右缘=内容右缘；× 绝对定位不占位（挤偏版心是三轮踩过的坑） */
.bt-head-inner { flex: 1; min-width: 0; max-width: 720px; margin: 0 auto; display: flex; align-items: center; gap: 12px; }
.bt-title { font-size: var(--fs-lg); font-weight: var(--fw-extrabold); }
.bt-quota { font-size: var(--fs-xs); color: var(--ink-3); margin-top: 2px; }
.bt-cfg { margin-left: auto; flex: none; background: var(--green-solid); color: #fff; border: none; border-radius: var(--r-pill); padding: 7px 16px; font-size: var(--fs-sm); font-weight: var(--fw-bold); font-family: inherit; cursor: pointer; }
.bt-cfg:hover { background: var(--green-solid-h); }
.bt-x { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: none; background: var(--bg); color: var(--ink-3); font-size: var(--fs-lg); cursor: pointer; border-radius: var(--r-sm); }
.bt-x:hover { background: var(--soft); color: var(--ink); }
.bt-body { flex: 1; min-height: 0; display: flex; flex-direction: column; }

/* 空态 / 加载失败 */
.bt-empty { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 0 30px; text-align: center; }
.bt-empty .cir { width: 52px; height: 52px; border-radius: var(--r-circle); border: 1.5px dashed var(--ink-3); display: flex; align-items: center; justify-content: center; color: var(--ink-3); margin-bottom: 4px; }
.bt-empty h4 { font-size: var(--fs-md); color: var(--ink-2); font-weight: var(--fw-semibold); }
.bt-empty p { font-size: var(--fs-sm); color: var(--ink-3); line-height: var(--lh-relaxed); }

/* 日期 tab（两态共用一条；720 版心） */
.bt-tabs { flex: none; display: flex; gap: 2px; width: 100%; max-width: 720px; margin: 0 auto; padding: 8px 0 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.bt-tabs::-webkit-scrollbar { display: none; }
.bt-tab { position: relative; border: none; background: transparent; font-family: inherit; font-size: var(--fs-sm); color: var(--ink-3); padding: 8px 12px 10px; cursor: pointer; white-space: nowrap; flex: none; }
.bt-tab .new-tag { font-size: var(--fs-2xs); color: var(--green-d); background: var(--green-soft); border-radius: var(--r-pill); padding: 1px 6px; margin-left: 4px; font-weight: var(--fw-bold); }
.bt-tab.on { color: var(--green-d); font-weight: var(--fw-bold); }
.bt-tab.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: 0; height: 2px; border-radius: 2px; background: var(--green); }

/* ============ 列表态（720 版心；日期 → 标的手风琴 → 类型+状态） ============ */
.bt-list { flex: 1; min-height: 0; overflow-y: auto; }
.bt-symwrap { max-width: 720px; margin: 0 auto; padding: 12px 0 8px; }
.bt-sym { border: 1px solid var(--line); border-radius: var(--r-md); margin-bottom: 10px; overflow: hidden; background: var(--bg); }
.bt-srow { display: flex; align-items: center; gap: 9px; padding: 11px 14px; cursor: pointer; transition: background var(--t-fast); }
.bt-srow:hover { background: var(--soft-2); }
/* 长名省略（坑⑦：flex 行内不定长文本必须 min-width:0 + 单行省略） */
.bt-sname { font-size: var(--fs-md); font-weight: var(--fw-semibold); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bt-sagg { margin-left: auto; flex: none; font-size: var(--fs-xs); color: var(--ink-3); display: flex; align-items: center; gap: 8px; }
.bt-agg b { color: var(--green-d); }
.bt-caret { color: var(--ink-3); transition: transform var(--t-base); flex: none; }
.bt-sym.open .bt-caret { transform: rotate(180deg); }
.bt-sym.ntd-all { opacity: .6; }
.bt-tlist { display: none; border-top: 1px solid var(--line-2); background: var(--soft-2); }
.bt-sym.open .bt-tlist { display: block; }
.bt-trow { display: flex; align-items: center; gap: 9px; padding: 9px 14px 9px 38px; border-bottom: 1px solid var(--line-2); font-size: var(--fs-sm); }
.bt-trow:last-child { border-bottom: none; }
.bt-trow.clickable { cursor: pointer; }
.bt-trow.clickable:hover { background: var(--green-soft); }
.bt-trow.dim { opacity: .6; }
.bt-st { font-size: var(--fs-2xs); font-weight: var(--fw-bold); border-radius: var(--r-pill); padding: 2.5px 9px; flex: none; }
.bt-st--done { background: var(--green-soft); color: var(--green-d); }
.bt-st--pending { background: var(--soft); color: var(--ink-2); border: 1px solid var(--line); }
.bt-st--failed { background: var(--red-soft); color: var(--red); }
.bt-st--ntd { background: var(--soft-2); color: var(--ink-3); border: 1px solid var(--line-2); }
.bt-side { margin-left: auto; font-size: var(--fs-2xs); color: var(--ink-3); flex: none; }
.bt-side.view { color: var(--green-d); font-weight: var(--fw-semibold); }
.bt-side.err { color: var(--red); }
.bt-footnote { max-width: 720px; margin: 0 auto; width: 100%; padding: 2px 0 16px; font-size: var(--fs-2xs); color: var(--ink-3); }

/* ============ 阅读态（两栏占满浮窗全宽：左书签 216 固定 + 右文章弹性内 760 版心） ============ */
.bt-read { flex: 1; min-height: 0; display: none; }
.bt-read.is-show { display: flex; }
.bk-rail { width: 216px; flex: none; border-right: 1px solid var(--line); overflow-y: auto; padding: 10px 10px 16px; }
.bk-back { display: flex; align-items: center; gap: 6px; width: 100%; border: none; background: transparent; color: var(--ink-2); font-size: var(--fs-sm); font-weight: var(--fw-semibold); font-family: inherit; padding: 8px; border-radius: var(--r-sm); cursor: pointer; margin-bottom: 8px; }
.bk-back:hover { background: var(--soft); color: var(--ink); }
/* 标的分组手风琴（三轮反馈定稿）：组头可折叠；进入/切换文章时目标组自动展开（JS 控），渲染不强制弹回 */
.bk-group { margin-bottom: 4px; }
.bk-ghead { display: flex; align-items: center; gap: 6px; width: 100%; text-align: left; border: none; background: transparent; font-family: inherit; padding: 8px 6px; border-radius: var(--r-sm); cursor: pointer; }
.bk-ghead:hover { background: var(--soft); }
.bk-gcaret { color: var(--ink-3); flex: none; transition: transform var(--t-base); }
.bk-group.closed .bk-gcaret { transform: rotate(-90deg); }
.bk-gname { font-size: var(--fs-sm); font-weight: var(--fw-bold); color: var(--ink); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bk-gcnt { margin-left: auto; flex: none; font-size: var(--fs-2xs); color: var(--ink-3); }
.bk-gcnt b { color: var(--green-d); }
.bk-group.closed .bk-subs { display: none; }
.bk-item { display: flex; align-items: center; gap: 7px; width: 100%; text-align: left; border: none; background: transparent; border-left: 3px solid transparent; font-family: inherit; padding: 7px 6px 7px 20px; border-radius: 0 var(--r-sm) var(--r-sm) 0; cursor: pointer; margin-bottom: 1px; }
.bk-item:hover { background: var(--soft-2); }
.bk-item.cur { border-left-color: var(--green); background: var(--green-soft); }
.bk-item.cur .bk-type { font-weight: var(--fw-bold); color: var(--green-d); }
.bk-item.off { opacity: .45; cursor: default; }
.bk-item.off:hover { background: transparent; }
.bk-type { font-size: var(--fs-sm); color: var(--ink); flex: none; }
.bk-st { margin-left: auto; flex: none; font-size: var(--fs-2xs); }
.bk-st.ok { color: var(--green-d); } .bk-st.pend { color: var(--ink-3); } .bk-st.fail { color: var(--red); } .bk-st.ntd { color: var(--ink-3); }
/* 移动端两级级联（桌面隐藏） */
.bk-mob { display: none; }
.bk-mrow { display: flex; align-items: center; gap: 6px; overflow-x: auto; scrollbar-width: none; padding: 4px 2px; }
.bk-mrow::-webkit-scrollbar { display: none; }
.bk-mchip { display: flex; align-items: center; gap: 5px; flex: none; border: 1px solid var(--line); background: var(--bg); border-radius: var(--r-pill); font-family: inherit; padding: 6px 12px; font-size: var(--fs-sm); color: var(--ink-2); cursor: pointer; }
.bk-mchip.cur { border-color: var(--green); background: var(--green-soft); color: var(--green-d); font-weight: var(--fw-bold); }
.bk-mchip.off { opacity: .45; cursor: default; }

/* 文章区：内部正文复用 .report-body 排版（report.css），此处只管容器与 meta */
.bt-article-wrap { flex: 1; min-width: 0; overflow-y: auto; }
.bt-article { max-width: var(--content-max); margin: 0 auto; padding: 26px 28px 60px; }
.bt-art-meta { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; font-size: var(--fs-sm); color: var(--ink-3); flex-wrap: wrap; }
.bt-art-meta b { color: var(--ink); }
.bt-art-empty { color: var(--ink-3); font-size: var(--fs-sm); text-align: center; padding-top: 80px; }
.bt-art-skel { display: flex; flex-direction: column; gap: 12px; padding-top: 8px; }
.bt-art-skel span { display: block; height: 14px; border-radius: var(--r-xs); background: var(--soft); animation: btPulse 1.1s ease-in-out infinite alternate; }
.bt-art-skel span:nth-child(1) { width: 62%; height: 22px; }
.bt-art-skel span:nth-child(2) { width: 100%; height: 220px; }
.bt-art-skel span:nth-child(3) { width: 88%; }
@keyframes btPulse { from { opacity: .55; } to { opacity: 1; } }

/* ============ 配置弹窗（添加制；定高 560 防跳屏——chips 换行不得移动外框） ============ */
.bt-modal-ovl { position: absolute; inset: 0; z-index: 35; background: rgba(20, 23, 27, .34); display: none; align-items: center; justify-content: center; padding: 16px; }
.bt-modal-ovl.is-open { display: flex; }
.bt-modal { width: min(92%, 480px); height: min(560px, 92%); background: var(--bg); border-radius: var(--r-xl); box-shadow: var(--sh-pop); display: flex; flex-direction: column; overflow: hidden; }
.bm-head { display: flex; align-items: center; padding: 16px 18px 8px; flex: none; }
.bm-head h4 { font-size: var(--fs-lg); font-weight: var(--fw-extrabold); }
.bm-x { margin-left: auto; border: none; background: transparent; color: var(--ink-3); font-size: 15px; cursor: pointer; width: 30px; height: 30px; border-radius: var(--r-sm); }
.bm-x:hover { background: var(--soft); color: var(--ink); }
.bm-body { flex: 1; min-height: 0; padding: 0 18px 6px; overflow-y: auto; }
.bm-label { font-size: var(--fs-xs); color: var(--ink-3); font-weight: var(--fw-semibold); margin: 12px 0 6px; }
.bm-search { position: relative; }
.bm-search input { width: 100%; border: 1px solid var(--line); border-radius: var(--r-md); padding: 9px 12px; font-size: var(--fs-md); font-family: inherit; outline: none; background: var(--bg); color: var(--ink); }
.bm-search input:focus { border-color: var(--green); box-shadow: var(--focus-ring); }
.bm-sug { position: absolute; left: 0; right: 0; top: calc(100% + 4px); background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--sh-pop); z-index: 5; display: none; overflow: hidden; }
.bm-sug.is-open { display: block; }
.bm-sug-item { display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; border: none; background: transparent; font-family: inherit; padding: 9px 12px; cursor: pointer; font-size: var(--fs-sm); color: var(--ink); }
.bm-sug-item:hover { background: var(--soft); }
.bm-sug-none { padding: 10px 12px; font-size: var(--fs-sm); color: var(--ink-3); }
.bm-picks { display: flex; flex-wrap: wrap; gap: 8px; min-height: 34px; }
.bm-pick { display: flex; align-items: center; gap: 6px; border: 1.5px solid var(--line); background: var(--bg); border-radius: var(--r-pill); padding: 5px 8px 5px 10px; font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--ink-2); cursor: pointer; }
.bm-pick.cur { border-color: var(--green); background: var(--green-soft); color: var(--green-d); }
.bm-pick .cnt { font-size: var(--fs-2xs); font-weight: var(--fw-regular); opacity: .75; }
.bm-pick .px { border: none; background: transparent; color: inherit; opacity: .6; cursor: pointer; font-size: 12px; padding: 0 2px; }
.bm-pick .px:hover { opacity: 1; color: var(--red); }
.bm-picks-empty { font-size: var(--fs-sm); color: var(--ink-3); padding: 6px 2px; }
.bm-types { display: flex; flex-wrap: wrap; gap: 8px; }
.bm-tchip { border: 1px solid var(--line); background: var(--bg); color: var(--ink-2); border-radius: var(--r-pill); padding: 6px 13px; font-size: var(--fs-sm); font-family: inherit; cursor: pointer; }
.bm-tchip .pv { font-size: var(--fs-2xs); color: var(--ink-3); margin-left: 3px; }
.bm-tchip.on { background: var(--green-soft); border-color: var(--green); color: var(--green-d); font-weight: var(--fw-semibold); }
.bm-tchip.on .pv { color: var(--green-d); }
.bm-tchip:disabled { opacity: .45; cursor: not-allowed; }
.bm-foot { display: flex; align-items: flex-end; gap: 10px; padding: 12px 18px 16px; border-top: 1px solid var(--line); flex: none; position: relative; }
.bm-total { font-size: var(--fs-sm); color: var(--ink-2); }
.bm-total b { color: var(--green-d); }
.bm-total.over, .bm-total.over b { color: var(--red); }
.bm-warn { font-size: var(--fs-2xs); color: var(--red); margin-top: 3px; }
.bm-note { font-size: var(--fs-2xs); color: var(--ink-3); margin-top: 3px; }
.bm-save { margin-left: auto; background: var(--green-solid); color: #fff; border: none; border-radius: var(--r-pill); padding: 9px 22px; font-weight: var(--fw-bold); font-size: var(--fs-sm); font-family: inherit; cursor: pointer; flex: none; }
.bm-save:hover { background: var(--green-solid-h); }
.bm-save:disabled { background: var(--soft); color: var(--ink-3); cursor: not-allowed; }
/* 清空任务（items=[] + 二次确认）：警示样式主钮 + foot 上方确认条 */
.bm-save.danger { background: var(--bg); color: var(--red); border: 1.5px solid var(--red); }
.bm-save.danger:hover { background: var(--red-soft); }
.bm-confirm { position: absolute; left: 0; right: 0; bottom: 100%; display: flex; align-items: center; gap: 10px; padding: 10px 18px; background: var(--red-soft); border-top: 1px solid var(--line); font-size: var(--fs-sm); color: var(--red); }
.bm-confirm .bc-txt { min-width: 0; }
.bm-confirm button { border: none; border-radius: var(--r-pill); font-family: inherit; font-size: var(--fs-sm); padding: 5px 14px; cursor: pointer; flex: none; }
.bm-confirm .yes { background: var(--red-solid); color: #fff; font-weight: var(--fw-bold); margin-left: auto; }
.bm-confirm .no { background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }

/* ============ 移动端（≤720：mobile.css 的 .drawer z46/全屏自动适用；此处只管 batch 内部布局） ============ */
@media (max-width: 720px) {
  .batch-peek { margin: 0 10px -13px; padding: 8px 13px 21px; }
  .bp-sum { gap: 7px; }
  /* 客服二维码浮标抬过纸片头（覆盖 v9:92 的 bottom:196——彼值按无纸片头的 composer 顶缘 631 调，
     纸片头令 composer 顶缘升至 ~595（375 实测），浮标 z20 反压「待执行 N」右角；沿用原 ≥12px 间距口径。
     721~1359 紧凑档实测 dock 在纸片头下方 38px、≥1360 档版心两侧余量 ≥320px，均不相交，不动。 */
  .support-root { bottom: 232px; }
  .batch-drawer .bt-head { padding-right: 56px; }        /* × 绝对定位——预留位防主按钮重叠 */
  .bt-tabs, .bt-symwrap, .bt-footnote { max-width: none; padding-left: 14px; padding-right: 14px; }
  .bt-trow { padding-left: 26px; }
  .bt-read { flex-direction: column; }
  .bk-rail { width: 100%; border-right: none; border-bottom: 1px solid var(--line); padding: 6px 10px 8px; overflow: visible; }
  .bk-desk { display: none; }
  .bk-mob { display: block; }
  .bk-mob .bk-back { width: auto; display: inline-flex; margin-bottom: 0; white-space: nowrap; flex: none; padding: 6px 8px; }
  .bt-article { padding: 18px 14px 50px; }
}

/* ============ 主输入区候选浮窗与纸片头共存（生产反馈 2026-08-18） ============ */
/* suggest 向上弹（05 设计）与纸片头同区：弹出期间纸片头让位（避免叠压穿透），收起即回 */
#suggest:not(.u-hidden) ~ .batch-peek { opacity: 0; pointer-events: none; transform: translateY(6px); }
/* suggest 提到纸片头(z1)/输入条(z2)之上 + 与输入条拉开色差（边框深一档、上向阴影加强、暗色随 --pop 更亮） */
.composer-inner .suggest { z-index: 3; background: var(--soft); border-color: var(--line-hover); box-shadow: 0 -14px 36px rgba(20, 23, 27, .16), var(--sh-pop); }
.composer-inner .suggest .suggest-item:hover { background: var(--line-2); }
