/* ============================================================
   view-report.css · 报告撰写
   ============================================================ */

/* ---------------- 无 item 时的极简引导页 ----------------
   报告在对话里生成，这里只解释去哪做，不放模板与列表 */
.rpt-guide { padding-top: 68px; }
.rpt-guide .empty__art { background: var(--brand-50); color: var(--brand-600); }

/* 面板内空态（比全局 .empty 更紧凑） */
.rpt-empty {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: 6px; padding: 20px 12px;
  border: 1px dashed var(--line-dark); border-radius: var(--r-md);
  background: var(--surface-2); color: var(--text-4);
}
.rpt-empty__t { font-size: var(--fs-13); font-weight: 600; color: var(--text-2); }
.rpt-empty__d { font-size: var(--fs-12); line-height: 1.6; }

/* ---------------- 编辑器骨架 ---------------- */
.report-editor { display: flex; flex-direction: column; height: 100%; min-height: 0; }
.report-editor__body {
  flex: 1; min-height: 0;
  display: grid;
  grid-template-columns: 272px minmax(0, 1fr);
}
.report-editor__outline {
  border-right: 1px solid var(--line);
  background: var(--surface);
  overflow: auto;
  min-height: 0;
}
.report-editor__scroll {
  overflow: auto;
  min-height: 0;
  background: var(--bg-alt);
  padding: 26px 28px 40px;
}

/* AI 写作条 */
.ai-action-bar {
  display: flex; align-items: center; gap: 7px;
  padding: 8px 14px;
  background: linear-gradient(90deg, #f7f5ff 0%, #fbfaff 60%, #f4f9ff 100%);
  border-bottom: 1px solid #e8e2fd;
  flex: none;
  overflow-x: auto;
}
.ai-action-bar__label {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: var(--fs-12); font-weight: 600; color: var(--violet);
  padding-right: 6px; margin-right: 3px;
  border-right: 1px solid #e2d9fe;
  flex: none;
}
.ai-action-bar .chip { background: #fff; border-color: #e2d9fe; flex: none; }
.ai-action-bar .chip.is-loading { opacity: .6; pointer-events: none; }

/* ---------------- 大纲面板 ---------------- */
.outline-panel { padding: 14px; }
.outline-panel__head { margin-bottom: 12px; }
.outline-list { display: flex; flex-direction: column; gap: 1px; }
.outline-item {
  display: flex; align-items: center; gap: 8px;
  padding: 7px 9px;
  border-radius: var(--r-sm);
  font-size: var(--fs-12); color: var(--text-2);
  cursor: pointer;
  transition: background .14s var(--ease);
}
.outline-item:hover { background: var(--surface-3); }
.outline-item.is-active { background: var(--brand-50); color: var(--brand-700); font-weight: 600; }
.outline-item.is-sub { padding-left: 22px; font-size: 12px; }
.outline-item__mark {
  width: 15px; height: 15px; flex: none; border-radius: 50%;
  border: 1.5px solid var(--line-dark);
  display: grid; place-items: center;
  color: #fff; font-size: 11px;
}
.outline-item__mark.is-done { background: var(--success); border-color: var(--success); }
.outline-panel__foot {
  margin-top: 16px; padding-top: 14px;
  border-top: 1px solid var(--line);
}

/* ---------------- 文档区 ---------------- */
.doc-paper-wrap { max-width: none; }
.doc-end { max-width: none; margin: 18px auto 0; }

/* ---------------- 向导：数据来源行（view-chat.js 也在用，勿删） ---------------- */
.src-row {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-2);
  cursor: pointer;
  opacity: .55;
  transition: all .16s var(--ease);
}
.src-row.is-on { opacity: 1; background: var(--surface); border-color: var(--success-bd); }

/* ---------------- 面板内部 ---------------- */
.sidepanel__body--flush { display: flex; flex-direction: column; overflow: hidden; }
.sidepanel__pad { flex: 1; min-height: 0; overflow: auto; padding: 16px; }
.sidepanel__bottom { flex: none; border-top: 1px solid var(--line); background: var(--surface); }

/* ---------------- 响应式 ---------------- */
/* 窄屏 / 面板打开时：vbar 换行显示，避免缩放与提交按钮被裁掉 */
.report-editor .vbar { flex-wrap: wrap; overflow-x: visible; height: auto; row-gap: 7px; }

@media (max-width: 1200px) {
  .report-editor__body { grid-template-columns: 232px minmax(0, 1fr); }
}
