/* 批 V2-c（2026-11-03）V2-11 ★：制式文件模板——生成页（左预览右表单）、设置页的小件（public/js/doctpl.js） */
.dg-wrap { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(320px, 1fr); gap: 16px; height: min(68vh, 720px); }
.dg-prev-col, .dg-form-col { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--border); border-radius: var(--radius); background: var(--panel); }
.dg-col-hd { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--border); font-weight: 600; font-size: 13px; color: var(--text-2); }
.dg-legend { margin-left: auto; font-weight: 400; font-size: 12px; display: flex; gap: 6px; }
.dg-prev { flex: 1; overflow: auto; padding: 14px 18px; font-family: 'Times New Roman', serif; font-size: 14px; line-height: 1.55; color: var(--text); }
.dg-p { margin: 0 0 8px; white-space: normal; word-break: break-word; }
.dg-part { margin-right: 6px; font-family: inherit; }
.dg-v { background: #fef08a; border-radius: 3px; padding: 0 2px; cursor: pointer; }
.dg-v.dg-empty { background: transparent; border: 1.5px solid var(--red); display: inline-block; min-width: 2.2em; height: 1.1em; vertical-align: text-bottom; }
.dg-form { flex: 1; overflow: auto; padding: 8px 12px 12px; }
.dg-grp { margin-bottom: 10px; }
.dg-grp-hd { font-weight: 600; font-size: 13px; padding: 6px 0 4px; border-bottom: 1px dashed var(--border); margin-bottom: 6px; }
.dg-f { margin-bottom: 8px; }
.dg-f > label { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); margin-bottom: 2px; }
.dg-f > input { width: 100%; box-sizing: border-box; }
.dg-form .dg-f.dg-f-empty > input { border-color: var(--red) !important; background: var(--red-bg) !important; }   /* 全站输入框样式优先级高，这里要压过 */
.dg-form .dg-f.dg-edited > input { border-color: var(--yellow) !important; }
.dg-save { display: flex; align-items: center; gap: 4px; font-size: 12px; color: var(--text-2); margin-top: 2px; }
.dg-ft-tip { max-width: 760px; }
.dg-ft-tip.dg-warn { color: var(--red); font-weight: 600; }
.dg-log { padding: 8px 12px; border-top: 1px solid var(--border); display: grid; gap: 2px; }
.dg-dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin: 0 3px 0 6px; vertical-align: middle; }
.dg-dot.g { background: var(--green); } .dg-dot.y { background: var(--yellow); } .dg-dot.r { background: var(--red); }
.dg-rules { display: grid; gap: 6px; line-height: 1.6; }
.dg-rules code { background: var(--bg); padding: 0 4px; border-radius: 3px; }
.field .dg-chk, .dg-chk { display: inline-flex !important; align-items: center; gap: 3px; margin: 0 14px 4px 0; font-size: 13px; width: auto; }
.dg-fq { width: 200px; }
@media (max-width: 900px) { .dg-wrap { grid-template-columns: 1fr; height: auto; } .dg-prev { max-height: 40vh; } }
/* 批 V4-b（2026-11-04）V4-8 ★：一键获取（来源小字、请核对、几个来源列出来选）、底部实时提示、预览文档（真实版式，lib/docxhtml.js 出的 HTML 排成一页页白纸） */
.dg-body { position: relative; }
.dg-af-msg { font-weight: 400; }
.dg-cnt { margin-left: auto; font-weight: 400; }
.dg-src { color: var(--text-2); margin-top: 2px; }
.dg-form .dg-f.dg-f-check > input { border-color: var(--yellow) !important; background: #fefce8 !important; }
.dg-pick { margin-top: 3px; display: grid; gap: 3px; font-size: 12px; }
.dg-pick-it { cursor: pointer; padding: 2px 6px; border: 1px dashed var(--border); border-radius: 4px; }
.dg-pick-it:hover { background: var(--bg); }
.dg-left { margin-left: 8px; color: var(--text-2); }
.dg-left.dg-warn { color: var(--red); font-weight: 600; }
.dg-dl-box { display: flex; flex-direction: column; align-items: flex-end; gap: 2px; }
.dg-savecnt { color: var(--text-2); white-space: nowrap; }
.dg-doc { position: absolute; inset: 0; z-index: 5; display: flex; flex-direction: column; background: #cbd0d8; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; }
.dg-doc[hidden] { display: none; }
.dg-doc-hd { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 6px 10px; background: var(--panel); border-bottom: 1px solid var(--border); font-size: 13px; }
.dg-doc-note { flex-basis: 100%; }
.dg-doc-sc { flex: 1; overflow: auto; padding: 16px; }
.dh-sizer { margin: 0 auto; }
.dh-pages { transform-origin: top left; }
.dh-page { position: relative; box-sizing: border-box; background: #fff; color: #000; box-shadow: 0 1px 4px rgba(0, 0, 0, .3); margin: 0 0 16px; overflow: hidden; font-family: 'Times New Roman', serif; font-size: 10pt; line-height: 1.15; text-align: left; }
.dh-hd, .dh-ft, .dh-bd { position: absolute; }
.dh-bd { overflow: hidden; }
.dh-doc .dh-p { margin: 0; padding: 0; white-space: pre-wrap; overflow-wrap: break-word; }
.dh-doc .dh-p.dh-top { padding-top: 0 !important; }
.dh-doc .dh-tbl { border-collapse: collapse; }
.dh-doc .dh-tbl td { overflow-wrap: break-word; }
.dh-doc .dh-gb { border: none; padding: 0; }
.dh-tab { display: inline-block; height: 1em; vertical-align: baseline; }
.dh-num { white-space: pre; }
.dh-img { display: inline-block; vertical-align: bottom; }
.dh-img-x { border: 1px dashed #9ca3af; box-sizing: border-box; }
.dh-tbx { display: inline-block; vertical-align: top; border: 1px solid #9ca3af; box-sizing: border-box; padding: 3.6pt 7.2pt; }
