:root { --bg:#f5f6f8; --panel:#fff; --line:#ddd; --red:#c00; --text:#222; --muted:#666; --blue:#1a73e8; }
* { box-sizing:border-box; font-family:'Microsoft YaHei','Segoe UI',sans-serif; }
body { margin:0; background:var(--bg); color:var(--text); font-size:14px; }
.topbar { background:#fff; border-bottom:2px solid var(--red); padding:10px 18px; display:flex; align-items:center; justify-content:space-between; }
.topbar h1 { font-size:17px; margin:0; }
.topbar .right { display:flex; gap:10px; align-items:center; color:var(--muted); }
.btn { background:var(--red); color:#fff; border:0; padding:7px 14px; border-radius:4px; cursor:pointer; font-size:13px; }
.btn.ghost { background:#eee; color:#333; }
.btn.mini { padding:4px 9px; font-size:12px; }
input,select { padding:6px 8px; border:1px solid var(--line); border-radius:4px; font-size:13px; }
.wrap { display:flex; height:calc(100vh - 50px); }
.side { width:340px; background:var(--panel); border-right:1px solid var(--line); padding:12px; overflow:auto; }
.main { flex:1; padding:14px; overflow:auto; }
.card { background:var(--panel); border:1px solid var(--line); border-radius:6px; padding:12px; margin-bottom:12px; }
.filters { display:flex; gap:8px; flex-wrap:wrap; margin:10px 0; }
.sec-head { font-weight:700; font-size:15px; color:var(--red); margin:12px 0 4px; }
.proj { border:1px solid var(--line); border-radius:5px; padding:9px 10px; margin-bottom:8px; cursor:pointer; }
.proj:hover { border-color:var(--red); }
.proj.sel { border-color:var(--red); background:#fff7f7; }
.proj .t { font-weight:600; }
.proj .s { color:var(--muted); font-size:12px; margin-top:3px; }
.tag { display:inline-block; padding:1px 7px; border-radius:10px; font-size:11px; background:#f0f0f0; color:#555; margin-left:6px; }
.tag.gov { background:#e8f0fe; color:var(--blue); }
.tag.eng { background:#fdeaea; color:var(--red); }
.btn.danger { background:#b00; }
.lockbadge { background:#fdeaea; color:#c00; border:1px solid #f3c9c9; padding:4px 9px; border-radius:4px; font-size:12px; font-weight:600; }
table { width:100%; border-collapse:collapse; font-size:13px; }
th,td { border:1px solid var(--line); padding:6px 8px; text-align:left; }
th { background:#f2f2f2; }
.muted { color:var(--muted); }
.row { display:flex; gap:8px; align-items:center; flex-wrap:wrap; }
.login { max-width:360px; margin:80px auto; background:var(--panel); border:1px solid var(--line); padding:24px; border-radius:8px; }
.login input { width:100%; margin:8px 0; }
.bar { display:flex; gap:8px; flex-wrap:wrap; }
.ok { color:var(--red); } .err { color:#0a0; } .lk { color:var(--blue); cursor:pointer; margin-left:8px; }
.section-title { font-weight:600; border-left:4px solid var(--red); padding-left:8px; margin:14px 0 8px; }

/* ===== 入口选择 ===== */
.entry { max-width:900px; margin:60px auto; padding:0 20px; text-align:center; }
.entry h2 { font-size:22px; margin-bottom:28px; }
.entry-cards { display:flex; gap:24px; justify-content:center; }
.ecard { flex:1; background:var(--panel); border:2px solid var(--line); border-radius:10px; padding:36px 24px; cursor:pointer; transition:all .15s; text-align:left; }
.ecard:hover { transform:translateY(-3px); box-shadow:0 8px 24px rgba(0,0,0,.08); }
.ecard.gov:hover { border-color:var(--blue); }
.ecard.eng:hover { border-color:var(--red); }
.ecard .et { font-size:21px; font-weight:700; margin-bottom:12px; }
.ecard.gov .et { color:var(--blue); }
.ecard.eng .et { color:var(--red); }
.ecard .ed { font-size:14px; color:var(--text); margin-bottom:8px; }
.ecard .em { font-size:12px; color:var(--muted); margin-bottom:16px; }
.ecard .en { font-size:13px; color:var(--red); border-top:1px dashed var(--line); padding-top:12px; }
.esub { margin-top:28px; font-size:12px; }

/* ===== 卷内目录 ===== */
.cat-block { background:var(--panel); border:1px solid var(--line); border-radius:6px; margin-bottom:12px; overflow:hidden; }
.cat-title { background:#f7f0f0; color:var(--red); font-weight:700; padding:8px 12px; border-left:4px solid var(--red); }
.item-row { border-top:1px solid #eee; padding:8px 12px; }
.item-head { display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.icode { font-family:Consolas,monospace; color:var(--red); font-weight:700; font-size:13px; width:34px; }
.ititle { flex:1; font-size:13px; }
.badge { font-size:11px; padding:1px 8px; border-radius:10px; }
.badge.ok { background:#e6f4ea; color:#137333; }
.badge.none { background:#f1f3f4; color:var(--muted); }
.up-btn { margin-left:auto; }
.ftable { margin-top:6px; font-size:12px; }
.ftable td { padding:4px 8px; }
.pbar { height:6px; background:#eee; border-radius:3px; margin:6px 0 3px; overflow:hidden; }
.pbar i { display:block; height:100%; background:var(--red); }
.pbar.big { height:10px; margin:10px 0 4px; }

/* ===== 到期提醒 / 分卷提示 ===== */
.expiry { margin-top:8px; font-size:13px; font-weight:600; color:var(--red); background:#fff3f3; border:1px solid #f3c9c9; border-radius:4px; padding:5px 8px; }

/* ===== 活动记录：单选面板 + 大字号编辑 ===== */
.rg-tip { line-height:1.6; }
.rg-wrap { border:1px solid var(--line); border-radius:6px; background:#fafafa; padding:10px 12px; margin-bottom:12px; }
.rg { padding:8px 0; border-bottom:1px dashed #e5e5e5; }
.rg:last-child { border-bottom:0; }
.rg-t { font-size:15px; font-weight:700; color:var(--red); margin-bottom:8px; }
.rg-o { display:flex; flex-wrap:wrap; gap:8px 20px; }
.rg-item { display:flex; align-items:center; gap:6px; font-size:15px; line-height:1.8; cursor:pointer; }
.rg-item input[type=radio] { width:16px; height:16px; cursor:pointer; }
.vol-warn { margin-top:8px; font-size:13px; font-weight:600; color:#b26a00; background:#fff6e6; border:1px solid #f0d3a0; border-radius:4px; padding:6px 8px; }

/* ===== 分阶段录入编辑条 ===== */
.entry-edit { display:flex; gap:10px; flex-wrap:wrap; align-items:flex-end; margin-top:6px; background:#fafafa; border:1px dashed #ddd; border-radius:4px; padding:6px 8px; }
.entry-edit .ee { display:flex; flex-direction:column; gap:2px; }
.entry-edit .ee.wide { flex:1; min-width:200px; }
.entry-edit label { font-size:11px; color:var(--muted); }
.entry-edit select, .entry-edit input { font-size:12px; padding:4px 6px; }
.badge.wait { background:#fff3e0; color:#b26a00; }

/* ===== 核查清单 ===== */
table.ck { width:100%; border-collapse:collapse; font-size:13px; margin:4px 0 12px; }
table.ck th, table.ck td { border:1px solid var(--line); padding:5px 8px; text-align:left; }
table.ck th { background:#f7f0f0; color:var(--red); }
.ck-sum { margin-top:6px; font-size:13px; background:#f5f5f5; border-radius:4px; padding:8px; }

/* ===== 全部项目台账 ===== */
table.allt { width:100%; border-collapse:collapse; font-size:13px; }
table.allt th, table.allt td { border:1px solid var(--line); padding:7px 10px; text-align:left; }
table.allt th { background:#f2f2f2; }

/* ===== 可复制文本汇编 ===== */
.at-vol { border:1px solid var(--line); border-radius:6px; margin-top:10px; overflow:hidden; }
.at-h { background:#f7f0f0; color:var(--red); font-weight:700; padding:7px 12px; border-bottom:1px solid var(--line); }
.at-pre { margin:0; padding:12px; white-space:pre-wrap; word-break:break-all; font-size:12px; line-height:1.6; font-family:Consolas,'Microsoft YaHei',monospace; background:#fff; }

/* ===== 弹窗表单 ===== */
.modal-ov { position:fixed; inset:0; background:rgba(0,0,0,.4); display:flex; align-items:center; justify-content:center; z-index:99; }
.modal { background:#fff; border-radius:8px; width:640px; max-height:86vh; display:flex; flex-direction:column; }
.mtitle { font-weight:700; font-size:15px; padding:12px 16px; border-bottom:1px solid var(--line); color:var(--red); }
.mbody { padding:12px 16px; overflow:auto; }
.mfoot { padding:10px 16px; border-top:1px solid var(--line); display:flex; justify-content:flex-end; gap:8px; }
.fgrid { display:grid; grid-template-columns:1fr 1fr; gap:8px 16px; }
.ro { font-size:13px; color:var(--text,#333); margin-bottom:8px; }
.ro code { background:#f1f3f5; padding:2px 6px; border-radius:4px; font-size:12px; word-break:break-all; }
.hint { font-size:12px; color:#888; margin-top:10px; line-height:1.6; }
.frow { display:flex; flex-direction:column; gap:3px; }
.frow.wide { grid-column:1 / -1; }
.frow label { font-size:12px; color:var(--muted); }
.frow input, .frow select { width:100%; }

/* ===== 活动记录：富文本编辑区表格（Word 导入 / 插入表格） ===== */
#actText table { border-collapse:collapse; width:100%; margin:10px 0; }
#actText td, #actText th { border:1px solid #888; padding:6px 8px; vertical-align:top; min-width:42px; word-break:break-word; }
#actText th { background:#eef2f7; font-weight:700; text-align:center; }
#actText table.act-tbl td:empty::after, #actText table.act-tbl th:empty::after { content:'\00a0'; }
#actText table.act-tbl p { margin:2px 0; }            /* 去掉 Word 单元格段落默认大间距 */
#actText table.act-tbl { width:100%; border-collapse:collapse; }
/* 边框变体（表格工具->边框） */
#actText table.act-bd-none td, #actText table.act-bd-none th { border:none; }
#actText table.act-bd-thick td, #actText table.act-bd-thick th { border:2px solid #333; }

/* ===== 活动记录：A4 纸张编辑区 ===== */
.a4-desk { background:#ececec; padding:20px; border:1px solid #ddd; border-top:none; border-radius:0 0 6px 6px; overflow:auto; max-height:78vh; }
.a4-page { box-sizing:border-box; }
@media print {
  .a4-desk { background:#fff; padding:0; border:none; max-height:none; overflow:visible; }
  .a4-page { box-shadow:none; width:auto; min-height:auto; margin:0; padding:0; }
  /* 隐藏编辑 chrome，只打印 A4 正文 */
  #actToolbar, #actTableTools, .topbar, .bar, .row { display:none !important; }
}

/* ===== 表格工具条 ===== */
#actTableTools {
  display:flex; gap:4px; padding:5px 8px; background:#eef3f8; border:1px solid #ddd; border-bottom:none;
  align-items:center; flex-wrap:wrap; opacity:.55; transition:opacity .15s, border-color .15s; font-size:13px;
}
#actTableTools.active { opacity:1; border-color:#7aa7d6; }
#actTableTools .tt-label { color:#5a6b7b; font-weight:600; }
#actTableTools .tt-sep { width:1px; height:18px; background:#c2cedb; display:inline-block; margin:0 2px; }
#actTableTools button {
  padding:3px 8px; border:1px solid #c2cedb; border-radius:3px; background:#fff; cursor:pointer; font-size:13px; color:#234;
}
#actTableTools button:hover { background:#e3edf7; border-color:#7aa7d6; }

