/* 锝玖代理管理系统 · UI 原型样式
   可直接改 :root 变量；浏览器打开 HTML 即预览 */

:root {
  --ui-fs: 13px;
  --ui-fs-sm: 12px;
  --ui-fs-xs: 11px;
  --ui-btn-fs: 12.5px;
  --ui-btn-sm-fs: 11.5px;
  --ui-btn-pad-y: 6px;
  --ui-btn-pad-x: 12px;
  --ui-btn-sm-pad-y: 4px;
  --ui-btn-sm-pad-x: 8px;
  --ui-nav-fs: 12.5px;
  --ui-nav-pad-y: 7px;
  --ui-nav-pad-x: 10px;
  --ui-td-pad-y: 9px;
  --ui-td-pad-x: 10px;
  --brand: #1a5fb4;
  --brand-soft: #dceafc;
  --brand-dark: #0d3d7a;
  --accent: #26a269;
  --accent-soft: #d8f5e3;
  --danger: #c01c28;
  --danger-soft: #fde8ea;
  --warn: #e5a50a;
  --warn-soft: #fff4d6;
  --muted: #6b7280;
  --text: #1f2937;
  --border: #e5e7eb;
  --bg: #f3f4f6;
  --panel: #ffffff;
  --sidebar-w: 212px;
  --top-h: 48px;
  --radius: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,.08);
  --font: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif;
}

* { box-sizing: border-box; }
html.is-busy,
html.is-busy body { cursor: progress; }
html.is-busy .toolbar .btn.primary,
html.is-busy .toolbar .btn.teal {
  pointer-events: none;
  opacity: 0.65;
}
html, body {
  margin: 0; padding: 0;
  font-family: var(--font);
  font-size: var(--ui-fs);
  color: var(--text);
  background: var(--bg);
  width: 100%;
  height: 100%;
  min-height: 100%;
}
html[data-ui-size="compact"] {
  --ui-fs: 12px;
  --ui-fs-sm: 11px;
  --ui-fs-xs: 10px;
  --ui-btn-fs: 11.5px;
  --ui-btn-sm-fs: 10.5px;
  --ui-btn-pad-y: 3px;
  --ui-btn-pad-x: 8px;
  --ui-btn-sm-pad-y: 2px;
  --ui-btn-sm-pad-x: 6px;
  --ui-nav-fs: 11.5px;
  --ui-nav-pad-y: 5px;
  --ui-nav-pad-x: 8px;
  --ui-td-pad-y: 5px;
  --ui-td-pad-x: 8px;
  --top-h: 42px;
  --sidebar-w: 188px;
}
html[data-ui-size="large"] {
  --ui-fs: 15px;
  --ui-fs-sm: 13px;
  --ui-fs-xs: 12px;
  --ui-btn-fs: 14px;
  --ui-btn-sm-fs: 13px;
  --ui-btn-pad-y: 8px;
  --ui-btn-pad-x: 14px;
  --ui-btn-sm-pad-y: 6px;
  --ui-btn-sm-pad-x: 10px;
  --ui-nav-fs: 14px;
  --ui-nav-pad-y: 9px;
  --ui-nav-pad-x: 12px;
  --ui-td-pad-y: 11px;
  --ui-td-pad-x: 12px;
  --top-h: 54px;
  --sidebar-w: 228px;
}
html[data-ui-size="xl"] {
  --ui-fs: 17px;
  --ui-fs-sm: 15px;
  --ui-fs-xs: 13px;
  --ui-btn-fs: 15.5px;
  --ui-btn-sm-fs: 14px;
  --ui-btn-pad-y: 10px;
  --ui-btn-pad-x: 16px;
  --ui-btn-sm-pad-y: 8px;
  --ui-btn-sm-pad-x: 12px;
  --ui-nav-fs: 15.5px;
  --ui-nav-pad-y: 11px;
  --ui-nav-pad-x: 12px;
  --ui-td-pad-y: 13px;
  --ui-td-pad-x: 12px;
  --top-h: 58px;
  --sidebar-w: 244px;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font-family: inherit; cursor: pointer; }

/* ===== App shell ===== */
.app {
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: var(--top-h) auto 1fr;
  width: var(--app-w, 100%);
  height: var(--app-h, 100%);
  min-width: 0;
  min-height: 0;
}
.topbar {
  grid-column: 1 / -1;
  background: var(--brand-dark);
  color: #fff;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  box-shadow: var(--shadow);
  z-index: 10;
}
.topbar .logo {
  font-weight: 700;
  letter-spacing: .5px;
  white-space: nowrap;
}
.topbar .logo span { opacity: .75; font-weight: 400; font-size: 12px; margin-left: 8px; }
.topbar .search {
  flex: 1;
  max-width: 420px;
  display: flex;
}
.topbar .search input {
  flex: 1;
  border: none;
  border-radius: 6px;
  padding: 7px 12px;
  font-size: var(--ui-fs);
}
.topbar .meta {
  margin-left: auto;
  font-size: 12px;
  opacity: .9;
  display: flex;
  gap: 14px;
  align-items: center;
}
.badge-soft {
  background: rgba(255,255,255,.15);
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
}
.qc-ins {
  background: #d8f5e3;
  color: #0f7b3a;
  text-decoration: underline;
}
.qc-del {
  color: #c01c28;
  text-decoration: line-through;
  background: #fde8ea;
}
.qc-cmt {
  background: #fff4d6;
  border-bottom: 1px dotted #c9a227;
}
.qc-cmt-box {
  margin-top: 16px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fffbeb;
  font-size: 12px;
  line-height: 1.55;
}
.qc-cmt-title { font-weight: 600; margin-bottom: 6px; }
.qc-cmt-item { margin: 4px 0; }
.tag-wx-retry {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 6px;
  border-radius: 99px;
  background: var(--danger-soft, #fde8ea);
  color: var(--danger, #c01c28);
  font-size: 11px;
  font-weight: 600;
  vertical-align: middle;
}

/* 多账号切换 */
.acct-switch { position: relative; }
.acct-btn {
  background: rgba(255,255,255,.12) !important;
  color: #fff !important;
  border-color: transparent !important;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acct-dropdown {
  position: absolute;
  right: 0;
  top: calc(100% + 6px);
  background: #fff;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 12px 30px rgba(0,0,0,.18);
  min-width: 260px;
  padding: 10px;
  z-index: 50;
}
.acct-title {
  font-size: var(--ui-fs-xs);
  color: var(--muted);
  margin-bottom: 6px;
}
.ui-size-row {
  display: flex;
  gap: 4px;
  margin: 6px 0 8px;
}
.ui-size-row button {
  flex: 1;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  padding: 5px 0;
  font-size: 11px;
  font-family: inherit;
}
.ui-size-row button.on {
  background: var(--brand-soft);
  border-color: var(--brand);
  color: var(--brand-dark);
  font-weight: 600;
}
.acct-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 8px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 12.5px;
}
.acct-item:hover { background: var(--bg); }
.acct-item.active {
  background: var(--brand-soft);
  font-weight: 600;
}
.acct-item .roles {
  margin-left: auto;
  font-size: 10.5px;
  color: var(--muted);
}
.acct-item .rm {
  border: none;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 14px;
  padding: 0 4px;
}

.sidebar {
  grid-row: 3;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 12px 10px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  overflow-x: hidden;
  min-height: 0;
}
.nav-footer {
  margin-top: auto;
  position: sticky;
  bottom: 0;
  background: #fff;
  padding-top: 8px;
  border-top: 1px solid var(--border);
}
.nav-label {
  font-size: 11px;
  color: var(--muted);
  padding: 10px 10px 4px;
  text-transform: none;
}
.nav-group-title {
  font-size: 11px;
  color: var(--muted);
  padding: 12px 10px 4px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.ws-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.ws-card {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 14px;
  background: #fff;
}
.ws-card b {
  display: block;
  font-size: 22px;
  color: var(--brand-dark);
  line-height: 1.2;
}
.ws-card span {
  font-size: 12px;
  color: var(--muted);
}
.ws-card.warn b { color: #b8860b; }
.ws-card.green b { color: #2f855a; }

/* 可搜索下拉（案源人/承办人） */
.combo {
  position: relative;
  display: inline-block;
  vertical-align: middle;
  min-width: 120px;
}
.combo input.combo-q {
  width: 100%;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  box-sizing: border-box;
}
/* 列表常挂到 body（避免被 overflow 裁切），样式不能依赖 .combo 祖先 */
.combo-list {
  max-height: 220px;
  overflow: auto;
  background: #fff;
  background-color: #fff;
  border: 1px solid #d1d5db;
  border-radius: 6px;
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
  display: none;
  color: var(--text);
}
.combo .combo-list {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  z-index: 40;
}
.combo.open .combo-list { display: block; }
.combo-list.is-fixed {
  position: fixed;
  right: auto;
  z-index: 2400;
  background: #fff;
  background-color: #fff;
}
.combo.drop-up .combo-list:not(.is-fixed) {
  top: auto;
  bottom: 100%;
}
.combo-list .combo-item,
.combo .combo-item {
  padding: 6px 8px;
  font-size: 12px;
  cursor: pointer;
  background: #fff;
}
.combo-list .combo-item:hover,
.combo-list .combo-item.on,
.combo .combo-item:hover,
.combo .combo-item.on {
  background: var(--brand-soft);
}
.combo-list .combo-item .sub,
.combo .combo-item .sub {
  display: block;
  font-size: 10px;
  color: var(--muted);
}
.combo .combo-clear {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  padding: 2px 4px;
}
.xfer-box {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 8px;
}
.xfer-box .combo {
  display: block;
  width: 100%;
  min-width: 0;
}
.xfer-box .combo .combo-q {
  width: 100%;
  min-width: 0;
  padding-right: 22px;
}
.xfer-ops {
  flex-wrap: wrap;
}
.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: var(--ui-nav-pad-y) var(--ui-nav-pad-x);
  border-radius: 8px;
  color: var(--text);
  font-size: var(--ui-nav-fs);
  border: none;
  background: transparent;
  width: 100%;
  text-align: left;
}
.nav-item:hover { background: var(--bg); text-decoration: none; }
.nav-item.active {
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-weight: 600;
}
.nav-item .ico { width: 18px; text-align: center; opacity: .85; }
.nav-badge {
  margin-left: auto;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  border-radius: 9px;
  background: #e53e3e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 18px;
  text-align: center;
}
.nav-badge.hidden { display: none !important; }
.pkg-new {
  display: inline-block;
  min-width: 16px;
  height: 16px;
  margin-right: 6px;
  padding: 0 5px;
  border-radius: 8px;
  background: #e53e3e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  vertical-align: middle;
}
.nav-item .tag-inline {
  font-size: 10px;
  color: var(--brand);
  margin-left: 4px;
}
.nav-item.optional {
  color: var(--muted);
  border: 1px dashed var(--border);
  margin-top: 8px;
}
.nav-item .tag {
  margin-left: auto;
  font-size: 10px;
  background: var(--bg);
  color: var(--muted);
  padding: 1px 6px;
  border-radius: 4px;
}
.nav-item.active .tag { background: #fff; color: var(--brand); }

.main {
  grid-row: 3;
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
}

/* 各业务页：占满 main，内部再滚 */
.page {
  display: none;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
.page:not(.hidden) {
  display: flex;
}
.page.hidden {
  display: none !important;
}
.page > .toolbar,
.page > .ver-banner,
.page > .alert-strip,
.page > .subtabs,
.page > .stage-bar,
.page > .chips {
  flex-shrink: 0;
}

/* toolbar */
.toolbar {
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  padding: 10px 14px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.toolbar h1 {
  font-size: 15px;
  margin: 0 12px 0 0;
  font-weight: 650;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  cursor: pointer;
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 99px;
  padding: 4px 10px;
  font-size: 12px;
  color: var(--text);
}
.chip:hover { border-color: var(--brand); color: var(--brand); }
.chip.on {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.chip.warn-on { background: var(--warn-soft); border-color: #e5c06a; color: #8a6d00; }
.chip.danger-on { background: var(--danger-soft); border-color: #e8a0a6; color: var(--danger); }
.spacer { flex: 1; }
.btn {
  border: 1px solid var(--border);
  background: #fff;
  border-radius: 6px;
  padding: var(--ui-btn-pad-y) var(--ui-btn-pad-x);
  font-size: var(--ui-btn-fs);
}
.btn:hover { background: var(--bg); }
.btn.primary {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
}
.btn.primary:hover { background: var(--brand-dark); }
.btn.ghost { background: transparent; }

/* content split: list + detail (CPC-like) */
.content-split {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 340px;
  min-height: 0;
  min-width: 0;
  overflow: hidden;
}
/* 业务工作台详情：原 340px 加宽约 2cm（≈76px） */
#assist-main-pane.content-split {
  grid-template-columns: 1fr 416px;
}
/* 所有任务：默认折叠，表格拉到详情左边界；展开后占 416px */
#cases-main-pane.content-split {
  grid-template-columns: minmax(0, 1fr) 22px 0px;
}
#cases-main-pane.content-split.is-detail-open {
  grid-template-columns: minmax(0, 1fr) 22px minmax(280px, 416px);
}
/* 流程监控 · 案件进度：与工作台同一套列表+详情折叠 */
#mon-progress.content-split {
  grid-template-columns: minmax(0, 1fr) 22px 0px;
}
#mon-progress.content-split.is-detail-open {
  grid-template-columns: minmax(0, 1fr) 22px minmax(280px, 416px);
}
#mon-progress .list-panel {
  border-right: none;
  min-width: 0;
  overflow: auto;
}
#mon-progress:not(.is-detail-open) #progress-detail-host {
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}
#mon-progress table.data .col-contact {
  width: var(--col-contact);
  min-width: var(--col-contact);
  overflow: hidden;
  text-overflow: ellipsis;
}
#mon-progress .contact-fold {
  max-width: none;
}

#cases-main-pane .list-panel {
  border-right: none;
  min-width: 0;
  overflow: auto;
}
#cases-main-pane table.data {
  width: 100%;
  table-layout: fixed;
  --col-check: calc(16px + 10px + var(--ui-td-pad-x) * 2);
  --col-case-no: calc(16ch + 6em + var(--ui-td-pad-x) * 2);
  --col-contact: calc(11em + var(--ui-td-pad-x) * 2);
  --col-app-no: calc(13ch + var(--ui-td-pad-x) * 2);
  --col-date: calc(10ch + var(--ui-td-pad-x) * 2);
  --col-type: calc(4.2em + var(--ui-td-pad-x) * 2);
  --col-status: calc(8.2em + 1.35em + var(--ui-td-pad-x) * 2);
  --col-deadline: calc(10ch + var(--ui-td-pad-x) * 2);
  --col-agent: calc(7em + var(--ui-td-pad-x) * 2);
}
#cases-main-pane table.data th,
#cases-main-pane table.data td {
  max-width: none;
}
#cases-main-pane table.data td.wrap,
#cases-main-pane table.data th.wrap {
  max-width: none;
}
#cases-main-pane .contact-fold {
  max-width: none;
}
#cases-main-pane table.data .col-check {
  width: var(--col-check);
  min-width: var(--col-check);
  max-width: var(--col-check);
  text-align: center;
  overflow: visible;
  padding-left: var(--ui-td-pad-x);
  padding-right: var(--ui-td-pad-x);
}
#cases-main-pane table.data .col-check input[type="checkbox"] {
  margin: 0;
  vertical-align: middle;
}
#cases-today-pane table.data .col-check {
  width: 36px;
  min-width: 36px;
  max-width: 36px;
  text-align: center;
  overflow: visible;
}
#cases-today-pane table.data .col-check input[type="checkbox"] {
  margin: 0;
  vertical-align: middle;
}
#cases-today-pane table.data tbody tr {
  cursor: pointer;
}
#cases-main-pane table.data .col-case-no {
  width: var(--col-case-no);
  min-width: var(--col-case-no);
  white-space: nowrap;
  overflow: hidden;
}
.case-no-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  white-space: nowrap;
}
#cases-main-pane table.data .case-no-cell {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  white-space: nowrap;
}
#page-monitor table.data .col-case-no {
  white-space: nowrap;
}
#page-monitor table.data .case-no-cell .btn.sm {
  flex-shrink: 0;
  padding: 2px 6px;
}
.detail-edit-inline {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.detail-edit-inline select,
.detail-edit-inline input[type="date"] {
  max-width: 12em;
  font-size: 12px;
}
#cases-main-pane table.data .col-case-no .btn.sm {
  flex-shrink: 0;
  padding: 2px 6px;
}
#cases-main-pane table.data .col-contact {
  width: var(--col-contact);
  min-width: var(--col-contact);
  overflow: hidden;
  text-overflow: ellipsis;
}
#cases-main-pane table.data .col-app-no {
  width: var(--col-app-no);
  min-width: var(--col-app-no);
  overflow: hidden;
  text-overflow: ellipsis;
}
#cases-main-pane table.data .col-date {
  width: var(--col-date);
  min-width: var(--col-date);
  overflow: hidden;
  text-overflow: ellipsis;
}
#cases-main-pane table.data .col-deadline {
  width: var(--col-deadline);
  min-width: var(--col-deadline);
  overflow: hidden;
  text-overflow: ellipsis;
}
#cases-main-pane table.data .col-type {
  width: var(--col-type);
  min-width: var(--col-type);
  overflow: hidden;
  text-overflow: ellipsis;
}
#cases-main-pane table.data .col-status {
  width: var(--col-status);
  min-width: var(--col-status);
  overflow: hidden;
  text-overflow: ellipsis;
}
#cases-main-pane table.data .col-agent {
  width: var(--col-agent);
  min-width: var(--col-agent);
  overflow: hidden;
  text-overflow: ellipsis;
}
#cases-main-pane table.data .col-grow {
  width: auto;
  min-width: 4.5em;
  overflow: hidden;
  text-overflow: ellipsis;
}
#cases-main-pane:not(.is-detail-open) #cases-detail-host {
  overflow: hidden;
  visibility: hidden;
  pointer-events: none;
}
.detail-rail {
  width: 22px;
  min-width: 22px;
  margin: 0;
  padding: 0;
  border: none;
  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);
  background: #f1f5f9;
  color: #475569;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
  z-index: 3;
}
.detail-rail:hover {
  background: #e2e8f0;
  color: var(--brand);
}
.detail-host {
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.detail-host .detail-panel {
  flex: 1;
  min-height: 0;
}
.skill-backdrop {
  background: rgba(15, 23, 42, 0.52);
  backdrop-filter: blur(4px);
  padding: 20px;
}
.skill-modal {
  width: min(680px, 96vw);
  max-height: min(92vh, 860px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(13, 61, 122, 0.22), 0 2px 8px rgba(0, 0, 0, 0.08);
  border: 1px solid #d7e3f4;
}
.skill-hero {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 18px 18px 14px;
  background:
    radial-gradient(120% 80% at 0% 0%, #e8f1fc 0%, transparent 55%),
    linear-gradient(180deg, #f7faff 0%, #fff 100%);
  border-bottom: 1px solid #e6eef8;
}
.skill-hero-ico {
  flex: 0 0 40px;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--brand);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 18px;
  box-shadow: 0 6px 14px rgba(26, 95, 180, 0.28);
}
.skill-hero-text { flex: 1; min-width: 0; }
.skill-hero-kicker {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--brand);
  font-weight: 700;
  margin-bottom: 2px;
}
.skill-hero-text h2 {
  margin: 0 0 4px;
  font-size: 17px;
  color: var(--brand-dark);
  font-weight: 700;
}
.skill-hero-text p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.45;
}
.skill-hero-text code {
  font-size: 11px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  padding: 0 5px;
  border-radius: 4px;
}
.skill-x {
  flex: 0 0 32px;
  width: 32px;
  height: 32px;
  border: none;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 20px;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
}
.skill-x:hover {
  background: #f3f4f6;
  color: var(--text);
}
.skill-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 14px 18px 8px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.skill-case-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  align-self: flex-start;
  max-width: 100%;
  padding: 6px 10px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-dark);
  font-size: 12.5px;
  font-weight: 600;
  line-height: 1.35;
  word-break: break-all;
}
.skill-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 12px;
}
@media (max-width: 560px) {
  .skill-grid { grid-template-columns: 1fr; }
}
.skill-modal label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 600;
}
.skill-modal select,
.skill-modal textarea {
  width: 100%;
  box-sizing: border-box;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px;
  font: inherit;
  font-size: 13px;
  color: var(--text);
  background: #fff;
}
.skill-modal select:focus,
.skill-modal textarea:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(26, 95, 180, 0.14);
}
.skill-modal select:disabled {
  background: #f3f4f6;
  color: var(--muted);
}
.skill-block-h {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin-bottom: 6px;
}
.skill-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-height: 28px;
}
.skill-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 9px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #d7e3f4;
  background: #f7faff;
  color: var(--brand-dark);
}
.skill-chip.miss {
  border-color: #f3c4c8;
  background: var(--danger-soft);
  color: var(--danger);
}
.skill-chip .dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}
.skill-chip.miss .dot { background: var(--danger); }
#skill-prompt {
  min-height: 140px;
  max-height: 220px;
  resize: vertical;
  font-family: ui-monospace, "Cascadia Mono", "Consolas", monospace;
  font-size: 12px;
  line-height: 1.5;
  background: #f8fafc;
}
.skill-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 18px;
  border-top: 1px solid #e6eef8;
  background: #f7faff;
}
.skill-status {
  font-size: 12px;
  color: var(--muted);
  min-height: 1.2em;
  flex: 1;
}
.skill-foot-btns {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

/* 详情「案卷文件」折叠（工作台 / 辅助功能共用） */
.fold-sec { margin-top: 6px; }
.fold-h {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin: 14px 0 8px;
  padding: 4px 0;
  border: none;
  background: transparent;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.3px;
  cursor: pointer;
  text-align: left;
  position: relative;
  z-index: 2;
  user-select: none;
}
.fold-h:hover { color: var(--text); }
.fold-caret {
  display: inline-block;
  width: 1em;
  transition: transform 0.15s ease;
}
.fold-sec.collapsed .fold-caret { transform: rotate(-90deg); }
.fold-sec.collapsed > .fold-body,
#detail-files-fold.collapsed #detail-files-body {
  display: none !important;
}
.fold-count {
  margin-left: auto;
  font-weight: 600;
  background: #eef2f7;
  border-radius: 999px;
  padding: 1px 8px;
  font-size: 11px;
  color: var(--text);
  letter-spacing: 0;
}
.date-dual {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  max-width: 100%;
  vertical-align: middle;
}
.date-dual .date-fuzzy {
  width: 118px;
  min-width: 96px;
  max-width: 140px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
  font: inherit;
  font-size: 12.5px;
}
.date-dual input[type="date"],
.date-dual .date-pick {
  width: 132px;
  min-width: 118px;
}
.form-grid .date-dual,
label .date-dual {
  width: 100%;
}
/* 工具栏里的日期不要撑满整行，否则「筛选 / 发文日 / 收起」会被拆到多行 */
.form-inline .date-dual,
.cpc-scan-toolbar .date-dual,
.cpc-scan-toolbar label .date-dual {
  width: auto;
  flex: 0 0 auto;
}
.form-grid .date-dual .date-fuzzy,
.form-grid .date-dual input[type="date"] {
  width: auto;
  flex: 1 1 110px;
  max-width: 160px;
}

.file-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.file-item {
  padding: 6px 0 8px;
  border-bottom: 1px solid var(--border);
}
.file-item:last-child { border-bottom: 0; }
.file-when {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.3;
  margin-bottom: 3px;
}
.file-main {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.file-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px;
}
.file-cat {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
.file-name {
  font-size: 13px;
  word-break: break-all;
}
.file-ver {
  font-size: 11px;
  color: var(--muted);
  flex-shrink: 0;
}
.file-act {
  display: flex;
  flex-wrap: nowrap;
  gap: 2px;
  justify-content: flex-end;
  align-items: center;
  flex-shrink: 0;
}
.file-ico {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  line-height: 1;
  color: #334155;
}
.file-ico:hover {
  background: #eef4fb;
  border-color: #93c5fd;
}
.content-split.full { grid-template-columns: 1fr; }
.list-panel, .detail-panel {
  min-height: 0;
  min-width: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--panel);
}
.list-panel { border-right: 1px solid var(--border); }
.detail-panel {
  background: #fafbfc;
  overflow: auto; /* 详情整栏可滚 */
}
/* 表体滚动区：表头 sticky 在内 */
.table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll > table.data {
  margin: 0;
}
/* 底部分页条 */
.pager {
  flex: 0 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-top: 1px solid var(--border);
  background: #f8fafc;
  font-size: 12px;
  color: var(--text);
}
.pager .pager-info {
  color: var(--muted);
  margin-right: 4px;
}
.pager .pager-size {
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 6px;
  background: #fff;
}
.pager .btn.sm {
  padding: 3px 8px;
  min-width: 28px;
}
.pager .btn.sm:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.pager .pager-page {
  font-variant-numeric: tabular-nums;
  min-width: 4.5em;
  text-align: center;
}
/* 无 list-panel 时的独立表（设置/导入等）也给滚动 */
.page > .list-panel,
.page .list-panel {
  /* already flex column */
}
/*
 * 子页签「内容区」撑满 —— 只能写明确的内容面板 id。
 * 禁止再用 [id^="mon-"] / [id^="collab-"] / [id^="biz-"]：
 * 会误伤 mon-stats / mon-subtabs / collab-stats / biz-subtabs 等，
 * 导致标签下巨空白、统计卡被 flex:1 纵向撑满（年费正常正因 id 不匹配）。
 */
.page > .content-split,
.page > #mon-board,
.page > #mon-deadline,
.page > #mon-progress,
.page > #collab-inbox,
.page > #collab-notices,
.page > #collab-sent,
.page > #collab-receipts,
.page > #mid-pane-board,
.page > #mid-pane-handoff,
.page > #biz-contract,
.page > #biz-pay,
.page > #biz-fee,
.page > #biz-case,
.page > #ws-pane-overview,
.page > #ws-pane-byuser {
  flex: 1;
  min-height: 0;
}
/* 顶栏元素禁止被撑高（双保险） */
.page > .subtabs,
.page > .alert-strip,
.page > .toolbar,
.page > .ver-banner,
.page > #mon-stats,
.page > #collab-stats,
.page > #annual-stats,
.page > #ws-stats,
.page > #mon-subtabs,
.page > #collab-subtabs,
.page > #biz-subtabs,
.page > #annual-tabs,
.page > #ws-subtabs,
.page > #case-subtabs,
.page > #mid-subtabs,
.page > #set-subtabs {
  flex: 0 0 auto;
  min-height: 0;
}
/* 库与系统：标签固定，内容区随屏高滚动 */
#page-settings > #set-pane-org,
#page-settings > #set-pane-tpl {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
/* 权限配置：顶栏固定，两个标签页各自滚动 */
#page-role-modules > #perm-pane-role,
#page-role-modules > #perm-pane-user,
#page-role-modules > #perm-pane-dept {
  flex: 1;
  min-height: 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#page-role-modules > #perm-pane-user.hidden,
#page-role-modules > #perm-pane-role.hidden,
#page-role-modules > #perm-pane-dept.hidden {
  display: none !important;
}
#page-role-modules .perm-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px;
}
#page-role-modules .perm-scroll table.data thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  box-shadow: 0 1px 0 var(--border);
}
#page-role-modules .perm-matrix th:first-child,
#page-role-modules .perm-matrix td:first-child {
  text-align: left;
  min-width: 12em;
}
#page-role-modules .perm-matrix th:not(:first-child),
#page-role-modules .perm-matrix td:not(:first-child) {
  text-align: center;
  vertical-align: middle;
  width: 5.2em;
  min-width: 4.8em;
  padding-left: 4px;
  padding-right: 4px;
}
#page-role-modules .perm-matrix input[type="checkbox"] {
  margin: 0;
  vertical-align: middle;
}
#page-role-modules .perm-matrix th .perm-h {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
  line-height: 1.25;
}
#page-role-modules .perm-matrix th .perm-h label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  font-weight: 400;
  margin: 0;
}
#perm-user-body table.perm-matrix,
#perm-dept-body table.perm-matrix {
  table-layout: fixed;
  width: 100%;
}
#perm-user-body table.perm-matrix th,
#perm-user-body table.perm-matrix td,
#perm-dept-body table.perm-matrix th,
#perm-dept-body table.perm-matrix td {
  max-width: none;
  overflow: visible;
  white-space: normal;
}
#perm-user-body table.perm-matrix th.perm-cb,
#perm-user-body table.perm-matrix td.perm-cb,
#perm-dept-body table.perm-matrix th.perm-cb,
#perm-dept-body table.perm-matrix td.perm-cb {
  text-align: center !important;
  vertical-align: middle;
  width: 108px;
  min-width: 108px;
  max-width: 108px;
  padding-left: 6px;
  padding-right: 6px;
}
#perm-user-body table.perm-matrix col.perm-flag,
#perm-dept-body table.perm-matrix col.perm-flag {
  width: 108px;
}
/* mid 双栏：左侧表滚、右侧表单滚 */
#mid-handle-panel {
  overflow: hidden;
}
#mid-handle-form {
  flex: 1;
  min-height: 0;
  overflow: auto !important;
  max-height: none !important;
}
#mid-pane-board {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#mid-pane-board .content-split {
  flex: 1;
  min-height: 0;
}
#mid-pane-handoff {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
#mid-pane-handoff.hidden,
#mid-pane-board.hidden {
  display: none !important;
}

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--ui-fs-sm);
}
/* 序号列：纯 CSS，避免登录后 MutationObserver 改 DOM 卡死界面 */
table.data:not([data-no-seq]) > thead > tr::before,
table.data:not([data-no-seq]) > tbody > tr::before {
  display: table-cell;
  box-sizing: border-box;
  width: 3em;
  min-width: 2.6em;
  padding: var(--ui-td-pad-y) 6px;
  border-bottom: 1px solid var(--border);
  text-align: center;
  vertical-align: middle;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
  user-select: none;
}
table.data:not([data-no-seq]) > thead > tr::before {
  content: "序号";
  background: #f8fafc;
  position: sticky;
  top: 0;
  z-index: 2;
  border-bottom: 1px solid var(--border);
}
table.data:not([data-no-seq]) > tbody {
  counter-reset: dejiu-seq;
}
table.data:not([data-no-seq]) > tbody > tr {
  counter-increment: dejiu-seq;
}
table.data:not([data-no-seq]) > tbody > tr::before {
  content: counter(dejiu-seq);
}
table.data:not([data-no-seq]) > tbody > tr:has(td[colspan]) {
  counter-increment: none;
}
table.data:not([data-no-seq]) > tbody > tr:has(td[colspan])::before {
  content: none;
  display: none;
}
table.data:not([data-no-seq]) > tbody > tr:hover::before {
  background: #f5f9ff;
}
table.data[data-no-seq] > thead > tr::before,
table.data[data-no-seq] > tbody > tr::before {
  content: none !important;
  display: none !important;
}
table.data th {
  position: sticky;
  top: 0;
  background: #f8fafc;
  text-align: left;
  padding: var(--ui-td-pad-y) var(--ui-td-pad-x);
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  z-index: 1;
}
table.data th.sortable {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
table.data th.sortable:hover {
  color: var(--text, #1a1a1a);
  background: #eef3f8;
}
table.data th.sorted {
  color: var(--brand, #1d4ed8);
}
table.data th .sort-ind {
  display: inline-block;
  min-width: 0.9em;
  margin-left: 3px;
  font-size: 10px;
  color: var(--brand, #1d4ed8);
  vertical-align: 1px;
}
table.data td {
  padding: var(--ui-td-pad-y) var(--ui-td-pad-x);
  border-bottom: 1px solid #f0f1f3;
  vertical-align: middle;
  user-select: text;
  -webkit-user-select: text;
  cursor: text;
}
table.data tr { cursor: default; }
table.data tr:hover td { background: #f5f9ff; }
table.data tr.selected td { background: var(--brand-soft); }
/* 勾选行高亮；仅勾选列拖涂时禁选字 */
table.data tr.row-checked td { background: #e8f0fe; }
table.data tr.selected.row-checked td { background: #d4e4fc; }
table.data td.col-check,
table.data td:has(> input[type="checkbox"]) {
  user-select: none;
  -webkit-user-select: none;
  cursor: pointer;
}
table.data tbody.is-check-dragging td.col-check,
table.data tbody.is-check-dragging td:has(> input[type="checkbox"]) {
  user-select: none;
  -webkit-user-select: none;
  cursor: default;
}
table.data .copyable-cell {
  overflow: visible;
  max-width: none;
  white-space: nowrap;
}
table.data .copyable-code {
  user-select: all;
  -webkit-user-select: all;
  cursor: text;
  font-weight: 700;
  letter-spacing: 0.02em;
}
table.data .muted { color: var(--muted); font-size: 11.5px; }
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
}
.pill.blue { background: var(--brand-soft); color: var(--brand-dark); }
.pill.green { background: var(--accent-soft); color: #0d6b3d; }
.pill.red { background: var(--danger-soft); color: var(--danger); }
.pill.yellow { background: var(--warn-soft); color: #8a6d00; }
.pill.gray { background: #eef0f3; color: #4b5563; }

/* stage bar */
.stage-bar {
  display: flex;
  gap: 0;
  padding: 0 14px 10px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  overflow-x: auto;
}
.stage {
  flex: 1;
  min-width: 90px;
  text-align: center;
  padding: 8px 6px 10px;
  font-size: 11.5px;
  color: var(--muted);
  border-bottom: 3px solid transparent;
  position: relative;
}
.stage strong { display: block; font-size: 16px; color: var(--text); margin-bottom: 2px; }
.stage.done { color: var(--accent); border-bottom-color: var(--accent); }
.stage.done strong { color: var(--accent); }
.stage.now { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.stage.now strong { color: var(--brand); }

/* detail */
.detail-head {
  padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
  background: #fff;
  position: sticky;
  top: 0;
  z-index: 1;
}
.detail-head h2 {
  margin: 0 0 6px;
  font-size: 14px;
  line-height: 1.4;
}
.detail-head .sub { font-size: 12px; color: var(--muted); }
.detail-body { padding: 12px 16px 24px; }
.section-title {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  margin: 14px 0 8px;
  letter-spacing: .3px;
}
.kv {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 6px 8px;
  font-size: 12.5px;
  margin-bottom: 4px;
}
.kv .k { color: var(--muted); }
.timeline {
  border-left: 2px solid var(--border);
  margin-left: 6px;
  padding-left: 14px;
}
.timeline .item {
  position: relative;
  padding: 0 0 14px;
  font-size: 12.5px;
}
.timeline .item::before {
  content: "";
  position: absolute;
  left: -19px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--brand);
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px var(--brand);
}
.timeline .item.done::before { background: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.timeline .item .t { color: var(--muted); font-size: 11px; }
.actions-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }

/* 年费维持：统计卡可点击切换标签（本页样式勿改结构；仅保留交互态） */
#page-annual > .alert-strip .stat {
  cursor: pointer;
  user-select: none;
  transition: background .12s, border-color .12s;
}
#page-annual > .alert-strip .stat:hover {
  background: var(--brand-soft);
  border-color: #b8d4f5;
}
#page-annual > .alert-strip .stat.on {
  background: var(--brand-soft);
  border-color: var(--brand);
}

.an-detail-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px 14px;
}
.an-log {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin: 6px 0;
  background: #fff;
}
.an-log summary {
  cursor: pointer;
  padding: 8px 10px;
  font-weight: 600;
  list-style: none;
}
.an-log summary::-webkit-details-marker { display: none; }
.an-log-body {
  padding: 0 10px 10px;
  white-space: pre-wrap;
  line-height: 1.45;
}
.an-group-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 6px 12px 8px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
}
.an-group-chip {
  border: 1px solid #c5d4e6;
  background: #fff;
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  cursor: pointer;
  color: #334155;
}
.an-group-chip.on {
  font-weight: 600;
}
.an-group-chip:not(.on) {
  opacity: 0.55;
}
.an-group-chip[data-ag="expired"].on { border-color: #e2a4a8; background: #fde8ea; color: #9b1c1c; }
.an-group-chip[data-ag="restore"].on { border-color: #f0c2c2; background: #fdecec; color: #9b2c2c; }
.an-group-chip[data-ag="late"].on { border-color: #f0d59a; background: #fff6e5; color: #9a6700; }
.an-group-chip[data-ag="maintain"].on { border-color: #b7ddc1; background: #eef6ee; color: #276749; }
#annual-rows tr.an-group-h td {
  font-weight: 700;
  font-size: 12px;
  padding: 7px 10px;
  color: #1e3a5f;
  border-top: 1px solid #c5d4e6;
  background: #eef3f8;
  cursor: pointer;
  user-select: none;
}
#annual-rows tr.an-group-h[data-g="expired"] td {
  background: #fde8ea;
  color: #9b1c1c;
}
#annual-rows tr.an-group-h[data-g="restore"] td {
  background: #fdecec;
  color: #9b2c2c;
}
#annual-rows tr.an-group-h[data-g="late"] td {
  background: #fff6e5;
  color: #9a6700;
}
#annual-rows tr.an-group-h[data-g="maintain"] td {
  background: #eef6ee;
  color: #276749;
}

/*
 * 顶栏过高：流程监控 / 经营回款 / 协同收发
 * 共用压矮子标签 + 统计卡（对齐年费视觉密度，且不改 #page-annual 全局默认）
 */
#page-monitor > .ver-banner,
#page-business > .ver-banner,
#page-collab > .ver-banner {
  padding: 3px 12px;
  font-size: 11.5px;
  line-height: 1.35;
}

#page-monitor > .subtabs,
#page-business > .subtabs,
#page-collab > .subtabs {
  padding: 0 3px;
  min-height: 0;
}

#page-monitor > .subtabs .subtab,
#page-business > .subtabs .subtab,
#page-collab > .subtabs .subtab {
  padding: 4px 12px;
  font-size: 12px;
  line-height: 1.2;
}

/* 有统计条的页：流程监控、协同收发 */
#page-monitor > .alert-strip,
#page-collab > .alert-strip {
  padding: 4px 10px;
  gap: 6px;
}

#page-monitor > .alert-strip .stat,
#page-collab > .alert-strip .stat {
  padding: 6px 10px 5px;
  border-radius: 6px;
}

/* 数字必须与年费同级可见（曾误写成 3px 导致“没有数字”） */
#page-monitor > .alert-strip .stat b,
#page-collab > .alert-strip .stat b {
  display: block;
  font-size: 18px;
  line-height: 1.2;
  color: var(--brand-dark);
  margin-bottom: 1px;
}
#page-monitor > .alert-strip .stat.warn b,
#page-collab > .alert-strip .stat.warn b {
  color: #b8860b;
}
#page-monitor > .alert-strip .stat.danger b,
#page-collab > .alert-strip .stat.danger b {
  color: var(--danger);
}

/* 工具栏（经营回款工具栏在子页容器内，用后代选择器） */
#page-monitor > .toolbar.dense,
#page-collab > .toolbar.dense,
#page-business .toolbar.dense {
  padding: 4px 10px;
  gap: 4px;
}

#page-monitor > .toolbar.dense h1,
#page-collab > .toolbar.dense h1,
#page-business .toolbar.dense h1 {
  font-size: 13px;
  margin: 0 8px 0 0;
}

#page-business .biz-ct-right {
  display: flex;
  flex-direction: column;
  min-height: 0;
}
#page-business > #biz-contract,
#page-business > #biz-fee {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}
#page-business > #biz-contract .content-split,
#page-business > #biz-fee .content-split {
  flex: 1;
  min-height: 0;
}
#page-business .biz-bound-scroll {
  flex: 1.8 1 260px;
  min-height: 260px;
  overflow: auto;
}
#page-business .biz-pay-scroll {
  flex: 1 1 140px;
  min-height: 120px;
  overflow: auto;
}
#page-business .biz-inv-scroll {
  flex: 0.9 1 100px;
  min-height: 90px;
  overflow: auto;
}
#page-business td.pending-due {
  color: var(--danger);
  font-weight: 600;
}
#page-business #fee-stats {
  font-variant-numeric: tabular-nums;
}
#page-business .combo {
  z-index: 30;
}
#page-business .combo .combo-list {
  z-index: 80;
}

/* 流程监控：统计卡可点切页 + 看板略收 */
#page-monitor > .alert-strip .stat {
  cursor: pointer;
  user-select: none;
  transition: background .12s, border-color .12s;
}
#page-monitor > .alert-strip .stat:hover {
  background: var(--brand-soft);
  border-color: #b8d4f5;
}
#page-monitor > .alert-strip .stat.on {
  background: var(--brand-soft);
  border-color: var(--brand);
}
#page-monitor > .board {
  padding: 10px;
  gap: 10px;
  grid-template-columns: repeat(7, minmax(150px, 1fr));
  overflow-x: auto;
}

/* cards board (monitor) */
.board {
  padding: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  overflow: auto;
  flex: 1;
  min-height: 0;
}

.col {
  background: #eef1f5;
  border-radius: 10px;
  padding: 8px;
  min-height: 120px;
  max-height: none;
  overflow-y: auto;
}
.col h3 {
  margin: 0 0 10px;
  font-size: 13px;
  display: flex;
  justify-content: space-between;
}
.col h3 em {
  font-style: normal;
  background: #fff;
  border-radius: 99px;
  padding: 0 8px;
  font-size: 11px;
  color: var(--muted);
}
.card {
  background: #fff;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 8px;
  box-shadow: var(--shadow);
  border-left: 3px solid var(--brand);
  font-size: 12.5px;
}
.card.urgent { border-left-color: var(--danger); }
.card.warn { border-left-color: var(--warn); }
.card .title { font-weight: 600; margin-bottom: 4px; line-height: 1.35; }
.card .meta { color: var(--muted); font-size: 11.5px; }
.card .due {
  margin-top: 6px;
  font-size: 11.5px;
  font-weight: 600;
}
.card .due.red { color: var(--danger); }
.card .due.yellow { color: #b8860b; }

/* fee table strip — 统计卡铺满一行 */
.alert-strip {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: linear-gradient(90deg, #fff8e6, #fff);
  border-bottom: 1px solid #f0e0b0;
  font-size: 12.5px;
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
}
.alert-strip .stat {
  flex: 1 1 0;
  min-width: 0;
  text-align: center;
}
.stat {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 8px 12px;
}
.stat b { display: block; font-size: 18px; color: var(--brand-dark); line-height: 1.2; }
.stat.danger b { color: var(--danger); }
.stat.warn b { color: #b8860b; }
.stat.green b { color: #2f855a; }

/* midfile optional */
.mid-layout {
  flex: 1;
  display: grid;
  grid-template-columns: 220px 1fr 280px;
  min-height: 0;
}
.mid-tree, .mid-editor, .mid-side {
  overflow: auto;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 12px;
}
.mid-side { border-right: none; background: #fafbfc; }
.tree-item {
  padding: 7px 8px;
  border-radius: 6px;
  font-size: 12.5px;
  cursor: pointer;
}
.tree-item:hover { background: var(--bg); }
.tree-item.on { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.tree-item .hint { display: block; font-size: 11px; color: var(--muted); font-weight: 400; }
.editor-box {
  border: 1px solid var(--border);
  border-radius: 8px;
  min-height: 280px;
  padding: 12px;
  font-size: 13px;
  line-height: 1.6;
  background: #fffef8;
}
.note {
  background: #f0f7ff;
  border: 1px solid #c5daf5;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12px;
  color: #274c77;
  margin-bottom: 12px;
}
.note.warn {
  background: var(--warn-soft);
  border-color: #e5c06a;
  color: #6b5400;
}

/* hub page */
.hub {
  max-width: 960px;
  margin: 40px auto;
  padding: 0 20px 60px;
}
.hub h1 { font-size: 22px; margin: 0 0 8px; }
.hub .lead { color: var(--muted); margin-bottom: 24px; line-height: 1.6; }
.hub-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}
.hub-card {
  background: #fff;
  border-radius: 12px;
  padding: 18px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
  transition: .15s border-color;
}
.hub-card:hover { border-color: var(--brand); text-decoration: none; }
.hub-card h3 { margin: 0 0 6px; font-size: 15px; color: var(--text); }
.hub-card p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.hub-card .no { font-size: 11px; color: var(--brand); font-weight: 700; margin-bottom: 6px; }
.hub-foot {
  margin-top: 28px;
  padding: 16px;
  background: #fff;
  border-radius: 10px;
  border: 1px solid var(--border);
  font-size: 13px;
  line-height: 1.7;
}
.hub-foot code {
  background: #f3f4f6;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 12px;
}
.fake-window {
  border: 1px solid #c9cdd3;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.12);
  margin-top: 8px;
}
.window-dots {
  background: #e8eaed;
  padding: 8px 12px;
  display: flex;
  gap: 6px;
}
.window-dots i {
  width: 10px; height: 10px; border-radius: 50%;
  background: #d0d3d8;
  display: inline-block;
}
.window-dots i:nth-child(1) { background: #ff5f57; }
.window-dots i:nth-child(2) { background: #febc2e; }
.window-dots i:nth-child(3) { background: #28c840; }

.footer-hint {
  padding: 6px 14px;
  font-size: 11px;
  color: var(--muted);
  background: #fff;
  border-top: 1px solid var(--border);
}
.footer-hint b { color: var(--brand); }

@media (max-width: 1200px) {
  .content-split { grid-template-columns: 1fr 300px; }
  /* clientp2uiw: keep eng right ~60% / min>=520; do not let generic content-split shrink to 300px */
  .content-split.eng-split,
  .eng-split {
    grid-template-columns: minmax(180px, 2fr) minmax(520px, 3fr);
  }
  #cases-main-pane.content-split.is-detail-open,
  #mon-progress.content-split.is-detail-open {
    grid-template-columns: minmax(0, 1fr) 22px 300px;
  }
  .board { grid-template-columns: 1fr 1fr; }
  .mid-layout { grid-template-columns: 180px 1fr 240px; }
}

/* ===== 完整版增量样式 ===== */
.nav-group-title {
  font-size: 10px;
  color: var(--muted);
  padding: 10px 10px 2px;
  letter-spacing: .5px;
}
.nav-item { font-size: var(--ui-nav-fs); padding: var(--ui-nav-pad-y) var(--ui-nav-pad-x); }
.nav-item .tag { font-size: 9px; }
.tb-group {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  align-items: center;
  padding: 0 6px;
  border-left: 1px solid var(--border);
}
.tb-group:first-of-type { border-left: none; padding-left: 0; }
.tb-group label {
  font-size: 10px;
  color: var(--muted);
  margin-right: 2px;
  white-space: nowrap;
}
.btn.sm { padding: var(--ui-btn-sm-pad-y) var(--ui-btn-sm-pad-x); font-size: var(--ui-btn-sm-fs); }
.btn.danger {
  background: #fff;
  border-color: #e8a0a6;
  color: var(--danger);
}
.btn.danger:hover { background: var(--danger-soft); }
.btn.purple { background: #6b46c1; border-color: #6b46c1; color: #fff; }
.btn.teal { background: #2c7a7b; border-color: #2c7a7b; color: #fff; }
.btn.orange { background: #dd6b20; border-color: #dd6b20; color: #fff; }
.subtabs {
  display: flex;
  gap: 0;
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 0 12px;
}
.subtab {
  border: none;
  background: transparent;
  padding: 9px 14px;
  font-size: 12.5px;
  color: var(--muted);
  border-bottom: 2px solid transparent;
  cursor: pointer;
}
.subtab:hover { color: var(--brand); }
.subtab.on {
  color: var(--brand-dark);
  font-weight: 600;
  border-bottom-color: var(--brand);
}
.toolbar.dense { padding: 6px 10px; gap: 4px; }
.toolbar.dense .btn { padding: 4px 9px; font-size: 11.5px; }
.mini-hint {
  font-size: 11px;
  color: var(--muted);
  padding: 4px 12px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
}
.ver-banner {
  background: linear-gradient(90deg, #1a5fb4, #26a269);
  color: #fff;
  font-size: 11.5px;
  padding: 5px 14px;
  text-align: center;
}
.ver-banner a { color: #fff; text-decoration: underline; }
.hub-grid.three { grid-template-columns: 1fr 1fr 1fr; }
@media (max-width: 1100px) {
  .hub-grid.three { grid-template-columns: 1fr 1fr; }
}
.checkbox-inline {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11.5px;
  margin-left: 4px;
}
.login-opts {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 2px 0 10px;
}
.login-opts .checkbox-inline {
  margin: 0;
  flex-direction: row;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  color: var(--text);
  font-size: 12px;
}

/* 合同完整预览填空 */
.ct-modal {
  width: min(920px, 96vw);
  max-height: 96vh;
  display: flex;
  flex-direction: column;
  border-radius: 14px;
  overflow: hidden;
}
.ct-modal-h {
  align-items: center;
  flex-wrap: nowrap;
  background: linear-gradient(180deg, #fff 0%, #faf7f2 100%);
  border-bottom: 1px solid #eadfce;
  gap: 12px;
}
.ct-modal-h h1 {
  margin: 0;
  font-size: 16px;
  letter-spacing: 0.06em;
  flex: 0 0 auto;
  white-space: nowrap;
}
.ct-modal-sub {
  margin: 0;
  font-size: 12px;
  color: #8a7a66;
  white-space: nowrap;
  flex: 1 1 auto;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ct-modal-h .combo {
  z-index: 5;
}
.ct-modal-body {
  flex: 1;
  overflow: auto;
  background:
    radial-gradient(ellipse at top, #efe6d6 0%, transparent 55%),
    #e4ddd2;
  padding: 18px 14px 28px;
}
.ct-paper {
  position: relative;
  background: #fffdf8;
  max-width: 780px;
  margin: 0 auto;
  padding: 36px 48px 48px;
  border: 1px solid #e7d8be;
  box-shadow: 0 14px 40px rgba(60, 40, 16, 0.14);
  font-family: "Songti SC", "STSong", "SimSun", "Noto Serif SC", serif;
  font-size: 15px;
  line-height: 1.95;
  color: #2a2118;
}
.ct-paper::before {
  content: "";
  position: absolute;
  inset: 10px;
  border: 1px solid rgba(185, 28, 28, 0.12);
  pointer-events: none;
}
.ct-seal {
  position: absolute;
  right: 46px;
  top: 38px;
  width: 72px;
  height: 72px;
  border: 3px solid rgba(185, 28, 28, 0.18);
  border-radius: 50%;
  color: rgba(185, 28, 28, 0.22);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.2em;
  display: flex;
  align-items: center;
  justify-content: center;
  transform: rotate(-16deg);
  pointer-events: none;
}
.ct-paper-kicker {
  text-align: center;
  font-size: 12px;
  letter-spacing: 0.28em;
  color: #b45309;
}
.ct-paper h2 {
  text-align: center;
  font-size: 24px;
  letter-spacing: 0.42em;
  margin: 6px 0 14px;
  font-weight: 700;
  color: #7f1d1d;
}
.ct-paper h3 {
  font-size: 15.5px;
  margin: 22px 0 8px;
  font-weight: 700;
  color: #7f1d1d;
  letter-spacing: 0.12em;
  border-bottom: 1px solid #eadfce;
  padding: 0 0 4px;
}
.ct-meta {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 14px;
  font-size: 13px;
  color: #57534e;
}
.ct-no { font-family: ui-monospace, Consolas, monospace; color: #7f1d1d; }
.ct-party,
.ct-parties {
  margin: 0 0 16px;
}
.ct-party-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 5px 0;
}
.ct-party-lab {
  flex: 0 0 3.2em;
  color: #9a3412;
  font-weight: 700;
}
.ct-party-lab.slim { flex-basis: 2.2em; text-align: right; }
.ct-party-b { font-weight: 600; }
.ct-party-sub {
  margin: 4px 0 0 3.4em;
  font-size: 12px;
  color: #78716c;
}
.ct-lead { text-indent: 2em; }
.ct-fixed { text-indent: 2em; color: #44403c; }
.ct-hint { font-size: 12px; color: #a16207; margin: 4px 0 8px; }
.ct-preview-body { text-align: justify; }
.ct-preview-body p { text-indent: 2em; margin: 8px 0; }
.ct-sign {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 32px;
  font-size: 14px;
}
.ct-sign p { margin: 8px 0; }
@media (max-width: 640px) {
  .ct-sign { grid-template-columns: 1fr; }
  .ct-paper { padding: 20px 16px 28px; font-size: 14px; }
}
.ct-acct {
  font-size: 12.5px;
  background: #fff7ed;
  border: 1px dashed #fdba74;
  padding: 8px 12px;
  margin: 8px 0 4px;
  line-height: 1.7;
  color: #7c2d12;
}
.ct-blank,
.ct-blank-date {
  border: none;
  border-bottom: 1px solid #d6c4a3;
  background: transparent;
  font: inherit;
  color: inherit;
  padding: 1px 4px;
  min-width: 7em;
  outline: none;
  transition: background .15s, border-color .15s;
}
.ct-blank.wide { min-width: 0; flex: 1; }
.ct-blank:hover,
.ct-blank-date:hover { background: #fff7ed; }
.ct-blank:focus,
.ct-blank-date:focus {
  background: #fff7ed;
  border-bottom-color: #b45309;
}
.ct-items {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 6px 0;
  background: #fff;
}
.ct-items th,
.ct-items td {
  border: 1px solid #eadfce;
  padding: 5px 6px;
  text-align: left;
}
.ct-items th { background: #faf4ea; font-weight: 600; color: #7c2d12; }
.ct-items input,
.ct-items select {
  width: 100%;
  border: none;
  background: transparent;
  font: inherit;
  padding: 2px 3px;
}
.ct-items input:focus,
.ct-items select:focus { background: #fff7ed; outline: none; }
.ct-items-ops { margin: 6px 0 10px; }
.ct-clause {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 10px 0;
  padding: 6px 4px 6px 2px;
  border: none;
  border-left: 3px solid transparent;
  border-radius: 0;
  cursor: pointer;
  background: transparent;
  transition: border-color .15s, opacity .15s, color .15s;
}
.ct-clause input[type="checkbox"] {
  margin-top: 7px;
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  accent-color: #b45309;
}
.ct-clause-body { flex: 1; min-width: 0; }
.ct-clause.on {
  background: transparent;
  border-left-color: #b45309;
}
.ct-clause.off {
  opacity: 0.55;
  color: #78716c;
}
.ct-tpl-preview {
  margin: 0 14px 20px;
  border: 1px solid #eadfce;
  border-radius: 10px;
  background: #fffdf8;
  padding: 0 12px 12px;
}
.ct-tpl-config {
  margin: 0 14px 20px;
  border: 1px solid #eadfce;
  border-radius: 10px;
  background: #fffdf8;
  padding: 0 12px 12px;
}
.ct-cfg-split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  min-height: 360px;
}
@media (max-width: 1100px) {
  .ct-cfg-split { grid-template-columns: 1fr; }
}
.ct-cfg-text {
  user-select: text;
  cursor: text;
}
.ct-cfg-fields {
  overflow: auto;
  max-height: 420px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ct-cfg-card {
  border: 1px solid #eadfce;
  border-radius: 8px;
  background: #fff;
  padding: 8px 10px;
  font-size: 12px;
}
.ct-cfg-card.fill { border-left: 3px solid #1a5fb4; }
.ct-cfg-card.check { border-left: 3px solid #b45309; }
.ct-cfg-card.items { border-left: 3px solid #2f855a; }
.ct-cfg-card .row {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 4px 0;
  flex-wrap: wrap;
}
.ct-cfg-card input, .ct-cfg-card select {
  font: inherit;
  border: 1px solid #eadfce;
  border-radius: 4px;
  padding: 3px 6px;
}
.ct-tpl-pre {
  margin: 0;
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 13px;
  line-height: 1.7;
  font-family: "Songti SC", "SimSun", "Noto Serif SC", serif;
  color: #2a2118;
  background: #fff;
  border: 1px solid #f0e4d0;
  border-radius: 8px;
  padding: 12px 14px;
}


.modal-backdrop {
  min-height: 100vh;
  background: rgba(15,23,42,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  font-family: var(--font);
}
.modal {
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 20px 50px rgba(0,0,0,.25);
  width: min(720px, 100%);
  max-height: 90vh;
  overflow: auto;
}
.modal.wide { width: min(920px, 100%); }
#modal-case-picker .modal {
  width: min(1100px, 96vw);
  max-width: 96vw;
  height: min(78vh, 740px);
  max-height: min(78vh, 740px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
#modal-case-picker .modal-b { padding: 12px 16px; }
#modal-case-picker .table-scroll {
  flex: 1;
  min-height: 0;
  overflow: auto;
}
#modal-case-picker table.data th:first-child,
#modal-case-picker table.data td:first-child {
  width: 32px;
  min-width: 32px;
  text-align: center;
}
#modal-case-picker table.data th:last-child,
#modal-case-picker table.data td:last-child {
  width: 64px;
  white-space: nowrap;
}
.modal-h {
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 10px;
}
.modal-h h1 { margin: 0; font-size: 16px; flex: 1; }
.modal-b { padding: 16px 18px; }
.modal-f {
  padding: 12px 18px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  background: #fafbfc;
}
.form-grid {
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 10px 12px;
  font-size: 13px;
  align-items: center;
}
.form-grid input, .form-grid select, .form-grid textarea {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-family: inherit;
  font-size: var(--ui-fs);
  width: 100%;
}
.form-grid input[type="checkbox"],
.form-grid input[type="radio"] {
  width: auto;
  max-width: none;
  padding: 0;
  margin: 0;
  flex: 0 0 auto;
}
.toolbar input, .toolbar select, .toolbar textarea,
.form-inline input, .form-inline select, .form-inline textarea {
  font-size: var(--ui-fs);
  font-family: inherit;
}
.form-grid textarea { min-height: 72px; resize: vertical; }
.form-grid .full { grid-column: 1 / -1; }
.hint { font-size: 12px; color: var(--muted); margin-top: 10px; }
.back-bar {
  position: fixed; top: 0; left: 0; right: 0;
  background: #0d3d7a; color: #fff; padding: 8px 16px; font-size: 12.5px; z-index: 10;
}
.back-bar a { color: #fff; margin-right: 14px; }

.mon-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
  padding: 8px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}
.mon-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.mon-apps {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.mon-app-chips {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 24px;
  align-items: center;
}
.mon-app-chips .pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.mon-date { position: relative; }
.mon-date-native {
  width: 22px;
  height: 28px;
  padding: 0;
  border: none;
  background: transparent;
  cursor: pointer;
}
.drop-check { position: relative; display: inline-block; }
.drop-check-list {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  z-index: 60;
  min-width: 200px;
  max-height: 260px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 8px 20px rgba(0,0,0,.12);
  padding: 6px 8px;
}
.drop-check.open .drop-check-list { display: block; }
.drop-check-list label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--text);
  padding: 3px 2px;
  margin: 0;
  white-space: nowrap;
}
.client-bind {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  position: relative;
  z-index: 6;
}
#page-library .content-split {
  grid-template-columns: minmax(0, 1fr) minmax(320px, 400px);
}

/* ===== 推广版业务端：登录与实用补充 ===== */
.hidden { display: none !important; }

.update-notice {
  grid-column: 1 / -1;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 8px 16px;
  background: #fff8e6;
  border-bottom: 1px solid #f0d58c;
  color: #5c4813;
  font-size: 13px;
  line-height: 1.45;
}
.update-notice.hidden { display: none !important; }
.update-notice-body { flex: 1; min-width: 0; }
.update-notice-body b { margin-right: 8px; }

.dejiu-ctx-menu {
  position: fixed;
  z-index: 400;
  min-width: 168px;
  padding: 4px 0;
  background: #fff;
  border: 1px solid #dcdfe6;
  border-radius: 6px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, .16);
  font-size: 13px;
  color: #303133;
}
.dejiu-ctx-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  padding: 7px 14px;
  cursor: pointer;
  color: inherit;
  font: inherit;
}
.dejiu-ctx-item:hover { background: #ecf2fc; color: #1a5fb4; }
.dejiu-ctx-item.danger { color: #c01c28; }
.dejiu-ctx-item.danger:hover { background: #fde8ea; color: #c01c28; }
.dejiu-ctx-item.disabled,
.dejiu-ctx-item:disabled {
  color: #c0c4cc;
  cursor: default;
  background: transparent;
}
.dejiu-ctx-sep {
  height: 1px;
  margin: 4px 8px;
  background: #ebeef5;
}
#data-scope-bar {
  position: relative;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  z-index: 40;
}
#data-scope-dept-wrap { position: relative; }
.data-scope-drop {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 180px;
  max-height: 240px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.16);
  padding: 8px 10px;
  z-index: 90;
}
.data-scope-drop label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px 2px;
  cursor: pointer;
  font-size: 12px;
  color: var(--text);
}
.data-scope-drop label:hover { background: #f8fafc; }
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(160deg, #0d3d7a 0%, #1a5fb4 45%, #f3f4f6 45%);
  padding: 24px 24px 56px;
  position: relative;
  box-sizing: border-box;
}
.login-beian {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 12px;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px 14px;
  font-size: 12px;
  color: var(--muted);
  text-align: center;
}
.login-beian a {
  color: var(--muted);
  text-decoration: none;
}
.login-beian a:hover { color: var(--brand-dark); text-decoration: underline; }
.login-beian .beian-gongan {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.login-beian .beian-gongan img {
  width: 16px;
  height: 16px;
  display: block;
}
.login-card {
  width: min(420px, 100%);
  background: #fff;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(13, 61, 122, .18);
  padding: 28px 28px 22px;
}
.login-card h1 {
  margin: 0 0 4px;
  font-size: 22px;
  color: var(--brand-dark);
}
.login-card .lead {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 13px;
}
.login-card label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 10px;
}
.login-card input {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 13px;
}
.login-card .btn { width: 100%; margin-top: 4px; padding: 9px 12px; }
.login-card .btn.primary { margin-bottom: 8px; }
.login-card hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 16px 0 12px;
}
.login-card .msg {
  min-height: 18px;
  font-size: 12.5px;
  margin-top: 8px;
}
.login-card .msg.err { color: var(--danger); }
.login-card .msg.ok { color: var(--accent); }
.login-card .login-register {
  margin-top: 14px;
  border-top: 1px solid var(--border);
  padding-top: 10px;
}
.login-card .login-register summary {
  cursor: pointer;
  font-size: 13px;
  color: var(--muted);
  user-select: none;
  margin-bottom: 8px;
}
.login-card .login-register[open] summary { margin-bottom: 12px; }

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 100;
  background: #1f2937;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  font-size: 13px;
  box-shadow: var(--shadow);
  max-width: 360px;
  max-height: min(22vh, 140px);
  overflow-y: auto;
  display: none;
}
.toast.show { display: block; }
/* apply-edit restrained global toast */ .toast.ok { background: #f4faf6; color: #2f6b3a; border: 1px solid #c6e2c7; border-left: 3px solid #67c23a; }
.toast.err { background: #fbf5f5; color: #8b3a3a; border: 1px solid #e9c5c5; border-left: 3px solid #e43935; }

.form-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.form-inline input, .form-inline select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12.5px;
  min-width: 140px;
}
.cpc-scan-toolbar {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 44px;
  margin: 0 0 8px;
  padding: 6px 0;
  line-height: 1.45;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
}
.cpc-scan-toolbar .cpc-scan-lab {
  display: inline-flex;
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
  white-space: nowrap;
  font-size: 12px;
  line-height: 32px;
  color: var(--muted);
}
.cpc-scan-toolbar input,
.cpc-scan-toolbar .date-dual .date-fuzzy,
.cpc-scan-toolbar .date-dual input[type="date"],
.cpc-scan-toolbar .date-dual .date-pick {
  border: 1px solid var(--border);
  border-radius: 6px;
  height: 32px;
  line-height: 20px;
  padding: 5px 8px;
  font-size: 12.5px;
  box-sizing: border-box;
}
.cpc-scan-toolbar .date-dual {
  align-items: center;
  height: 32px;
}
.cpc-scan-toolbar #cpc-scan-sqh {
  min-width: 180px;
  width: 220px;
}
.cpc-scan-toolbar .cpc-scan-hint {
  line-height: 1.4;
  padding: 4px 0;
}
.cpc-scan-panel:not(.hidden) {
  height: 66.67vh;
  min-height: 280px;
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
}
.cpc-scan-panel .cpc-scan-list {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.cpc-scan-panel .cpc-scan-list table.data thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f8fafc;
}
.cpc-scan-name {
  font-weight: 650;
  font-size: 13px;
  color: #0f172a;
  letter-spacing: 0.01em;
}
.cpc-scan-name .cpc-hit,
.cpc-scan-sqh .cpc-hit {
  background: #fde68a;
  color: inherit;
  padding: 0 1px;
  border-radius: 2px;
}
tr.cpc-row-unconfirmed {
  background: #fff7ed;
}
tr.cpc-row-unconfirmed td {
  box-shadow: inset 3px 0 0 #ea580c;
}
tr.cpc-row-undown {
  background: #fef2f2;
}
tr.cpc-row-undown td {
  box-shadow: inset 3px 0 0 #dc2626;
}
.cpc-pill {
  display: inline-block;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}
.cpc-pill.unconfirmed {
  background: #ffedd5;
  color: #c2410c;
}
.cpc-pill.undown {
  background: #fee2e2;
  color: #b91c1c;
}
.cpc-pill.confirmed {
  background: #dcfce7;
  color: #166534;
}
.cpc-pill.certdown {
  background: #dbeafe;
  color: #1d4ed8;
}
.cpc-pill.other {
  background: #eef2f7;
  color: #475569;
}
.cpc-pill.received {
  background: #dcfce7;
  color: #166534;
}
.cpc-pill.unreceived {
  background: #ffedd5;
  color: #c2410c;
}
.cpc-scan-toolbar .date-dual .date-fuzzy {
  width: 96px;
  min-width: 88px;
  max-width: 110px;
}
.cpc-scan-toolbar .date-dual .date-pick,
.cpc-scan-toolbar .date-dual input[type="date"] {
  width: 118px;
  min-width: 110px;
}
.cpc-scan-toolbar .cpc-scan-hint {
  flex: 1 1 auto;
  min-width: 80px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 14px;
  padding: 14px;
}
.form-grid label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
  color: var(--muted);
}
.form-grid input, .form-grid select {
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
}
.form-grid input[type="checkbox"],
.form-grid input[type="radio"] {
  width: auto;
  max-width: none;
  padding: 0;
}
.form-grid .full { grid-column: 1 / -1; }

/* 库与系统 · 机构与编号：收窄过宽框、勾选贴文案 */
#set-pane-org .form-grid {
  grid-template-columns: repeat(2, minmax(0, 340px));
  gap: 10px 24px;
  padding: 12px 16px 16px;
  align-items: start;
}
#set-pane-org .form-grid label {
  max-width: 340px;
}
#set-pane-org .form-grid input,
#set-pane-org .form-grid select {
  max-width: 340px;
}
#set-pane-org .form-grid input[type="checkbox"] {
  width: 15px;
  height: 15px;
  max-width: none;
}
#set-pane-org .form-grid label.checkbox-inline,
#set-pane-org .check-pack label {
  flex-direction: row;
  align-items: center;
  gap: 6px;
  max-width: none;
  width: auto;
  color: var(--text);
  font-size: 12.5px;
  font-weight: 500;
  white-space: nowrap;
}
#set-pane-org .check-pack {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 18px;
  grid-column: 1 / -1;
}
#set-pane-org .w-sm {
  max-width: 120px;
}
#set-pane-org .w-sm input,
#set-pane-org .w-sm select {
  max-width: 120px;
  width: 120px;
}
#set-pane-org .w-md {
  max-width: 200px;
}
#set-pane-org .w-md input,
#set-pane-org .w-md select {
  max-width: 200px;
}
#set-pane-org .w-path {
  max-width: 480px;
  grid-column: 1 / -1;
}
#set-pane-org .w-path input,
#set-pane-org .w-path select {
  max-width: 480px;
}
#set-pane-org .set-hint {
  padding: 0 16px 12px;
  font-size: 11px;
  margin: 0;
  max-width: 720px;
  line-height: 1.5;
}
#numbering-forms {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  padding: 12px 16px 16px;
}
#numbering-forms .num-block {
  margin-bottom: 0;
}
#numbering-forms .form-inline {
  flex-wrap: wrap;
  gap: 8px;
}
.num-block {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  background: #fff;
}
.num-block h4 { margin: 0 0 8px; font-size: 13px; }
.detail-empty {
  padding: 40px 20px;
  text-align: center;
  color: var(--muted);
  font-size: 13px;
}
.topbar .logo { cursor: default; }
.nav-group-title {
  font-size: 11px;
  color: var(--muted);
  padding: 12px 10px 4px;
  font-weight: 600;
}
.sidebar .nav-item { text-decoration: none; }
.ver-banner {
  background: #eef6ff;
  color: var(--brand-dark);
  font-size: 12px;
  padding: 6px 14px;
  border-bottom: 1px solid #d0e3fb;
}
/* ── 工作台看板（精致版） ── */
.board-pane {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 16px 18px 28px;
  background:
    radial-gradient(1200px 400px at 10% -10%, #dbeafe 0%, transparent 55%),
    radial-gradient(900px 360px at 100% 0%, #e0f2fe 0%, transparent 50%),
    linear-gradient(180deg, #f1f5f9 0%, #f8fafc 40%, #f3f4f6 100%);
}
.board-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(135deg, #0d3d7a 0%, #1a5fb4 48%, #2563eb 100%);
  color: #fff;
  box-shadow: 0 10px 28px rgba(13, 61, 122, 0.22);
  position: relative;
  overflow: hidden;
}
.board-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.board-hero-kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  opacity: 0.75;
  margin-bottom: 4px;
}
.board-hero-title {
  margin: 0 0 6px;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.board-hero-desc {
  margin: 0;
  font-size: 12px;
  opacity: 0.85;
  line-height: 1.5;
  max-width: 520px;
}
.board-hero-meta {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  z-index: 1;
}
.board-hero-pill {
  background: rgba(255, 255, 255, 0.14);
  border: 1px solid rgba(255, 255, 255, 0.22);
  backdrop-filter: blur(6px);
  border-radius: 999px;
  padding: 8px 14px;
  min-width: 88px;
  text-align: center;
}
.board-hero-pill b {
  display: block;
  font-size: 20px;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}
.board-hero-pill span {
  font-size: 11px;
  opacity: 0.85;
}
.board-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  align-items: start;
}
@media (max-width: 1280px) {
  .board-grid { grid-template-columns: 1fr; }
}
.board-panel {
  background: #fff;
  border: 1px solid rgba(226, 232, 240, 0.95);
  border-radius: 16px;
  padding: 16px 16px 14px;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
  min-width: 0;
}
.board-panel-todo {
  border-top: 3px solid #1a5fb4;
}
.board-panel-annual {
  border-top: 3px solid #c05621;
}
.board-panel-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 14px;
}
.board-panel-icon {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  flex-shrink: 0;
}
.board-panel-icon.todo {
  background: linear-gradient(145deg, #dbeafe, #eff6ff);
  color: #1a5fb4;
  box-shadow: inset 0 0 0 1px #bfdbfe;
}
.board-panel-icon.annual {
  background: linear-gradient(145deg, #ffedd5, #fff7ed);
  color: #c05621;
  box-shadow: inset 0 0 0 1px #fed7aa;
}
.board-panel-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}
.board-panel-sub {
  margin: 2px 0 0;
  font-size: 11px;
  color: var(--muted);
}
.board-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.board-metric {
  position: relative;
  border: 1px solid #e8eef5;
  border-radius: 12px;
  padding: 12px 12px 10px;
  background: linear-gradient(180deg, #fbfdff 0%, #f8fafc 100%);
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.12s, border-color 0.12s;
  overflow: hidden;
  text-align: left;
}
.board-metric:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.07);
  border-color: #c7d7ef;
}
.board-metric::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #94a3b8;
}
.board-metric.tone-blue::before { background: #1a5fb4; }
.board-metric.tone-amber::before { background: #d69e2e; }
.board-metric.tone-slate::before { background: #64748b; }
.board-metric.tone-orange::before { background: #dd6b20; }
.board-metric.tone-red::before { background: #c01c28; }
.board-metric .bm-label {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 6px;
}
.board-metric .bm-value {
  font-size: 28px;
  font-weight: 700;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.board-metric.tone-amber .bm-value { color: #b7791f; }
.board-metric.tone-orange .bm-value { color: #c05621; }
.board-metric.tone-red .bm-value { color: #c01c28; }
.board-metric.tone-blue .bm-value { color: #1a5fb4; }
.board-metric .bm-hint {
  margin-top: 4px;
  font-size: 10px;
  color: #94a3b8;
}
.board-bars {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 10px 12px;
  margin-bottom: 14px;
  border-radius: 12px;
  background: #f8fafc;
  border: 1px solid #eef2f7;
}
.board-bar-row {
  display: grid;
  grid-template-columns: 72px 1fr 36px;
  gap: 8px;
  align-items: center;
  font-size: 11px;
}
.board-bar-row .bb-lab {
  color: #64748b;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.board-bar-track {
  height: 8px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
}
.board-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #1a5fb4, #3b82f6);
  min-width: 2px;
  transition: width 0.35s ease;
}
.board-bar-fill.warn {
  background: linear-gradient(90deg, #d69e2e, #f6c343);
}
.board-bar-fill.danger {
  background: linear-gradient(90deg, #c01c28, #f56565);
}
.board-bar-fill.slate {
  background: linear-gradient(90deg, #64748b, #94a3b8);
}
.board-bar-row .bb-n {
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: #0f172a;
}
.board-lists {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.board-list {
  border: 1px solid #e8eef5;
  border-radius: 12px;
  max-height: 200px;
  overflow: auto;
  background: #fff;
}
.board-list h4 {
  margin: 0;
  padding: 8px 12px;
  font-size: 12px;
  font-weight: 600;
  color: #334155;
  background: linear-gradient(180deg, #f8fafc, #f1f5f9);
  border-bottom: 1px solid #e8eef5;
  position: sticky;
  top: 0;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.board-list h4 .cnt {
  font-size: 10px;
  font-weight: 600;
  color: #64748b;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 1px 8px;
}
.board-list .item {
  display: block;
  width: 100%;
  text-align: left;
  border: none;
  border-bottom: 1px solid #f1f5f9;
  background: transparent;
  padding: 9px 12px 9px 14px;
  font-size: 12px;
  cursor: pointer;
  color: var(--text);
  position: relative;
  transition: background 0.12s;
}
.board-list .item::before {
  content: "";
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: transparent;
}
.board-list .item:hover {
  background: #f0f7ff;
}
.board-list .item:hover::before {
  background: #1a5fb4;
}
.board-list .item .main {
  font-weight: 600;
  color: #1e293b;
  line-height: 1.35;
}
.board-list .item .sub {
  color: #94a3b8;
  font-size: 11px;
  margin-top: 2px;
  line-height: 1.35;
}
.board-list .item.muted {
  color: #94a3b8;
  cursor: default;
  text-align: center;
  padding: 18px 12px;
}
.board-list .item.muted:hover {
  background: transparent;
}
.board-list .item.muted::before { display: none; }

.stat-row {
  display: flex;
  gap: 8px;
  padding: 10px 14px;
  background: var(--panel);
  border-bottom: 1px solid var(--border);
  flex-wrap: nowrap;
  width: 100%;
  box-sizing: border-box;
  overflow-x: auto;
}
.stat-card {
  background: #f8fafc;
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px;
  flex: 1 1 120px;
  min-width: 120px;
  text-align: center;
  cursor: pointer;
  transition: background .12s, border-color .12s;
  box-sizing: border-box;
}
.stat-card:hover {
  background: var(--brand-soft);
  border-color: #b8d4f5;
}
.stat-card.on {
  background: var(--brand-soft);
  border-color: var(--brand);
}
.stat-card strong {
  display: block;
  font-size: 22px;
  color: var(--brand-dark);
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  overflow: visible;
  word-break: keep-all;
}
.stat-card span {
  font-size: 11px;
  color: var(--muted);
  white-space: normal;
  line-height: 1.25;
}
.stat-card.warn strong { color: #b8860b; }
.stat-card.danger strong { color: var(--danger); }
.stat-card.green strong { color: #2f855a; }

/* 其他任务统计卡：五档等分铺满，点击切换筛选 */
#other-stats {
  flex-shrink: 0;
}
#other-stats .stat-card {
  flex: 1 1 0;
  min-width: 0;
}

table.data th, table.data td {
  white-space: nowrap;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
}
table.data td.wrap, table.data th.wrap {
  white-space: normal;
  max-width: 280px;
}
table.data .sub-line {
  display: block;
  font-size: 11px;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.contact-fold {
  display: block;
  max-width: 180px;
  line-height: 1.35;
}

/* ===== 答复审查意见：对齐 CPC 制作意见陈述书 ===== */
.mh-oa-banner {
  background: #fff7ed;
  border: 1px solid #fed7aa;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 13px;
  margin-bottom: 10px;
  line-height: 1.55;
}
.mh-oa-banner-sub {
  margin-top: 6px;
  color: #606266;
  font-size: 12px;
}
.mh-oa-banner .appno {
  color: #dc2626;
  font-weight: 700;
}
.mh-oa-sentence {
  font-size: 13px;
  line-height: 1.9;
  padding: 4px 2px 8px;
  color: #1f2937;
}
.mh-oa-sentence .fill {
  display: inline-block;
  min-width: 5.5em;
  border-bottom: 1px solid #9ca3af;
  padding: 0 6px;
  color: #111;
  font-weight: 600;
}
.mh-field {
  display: block;
  margin: 8px 0;
  font-size: 12px;
  color: var(--text);
}
.mh-field > span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
}
.mh-field input {
  width: 100%;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 8px;
}
.mh-field .req {
  color: #dc2626;
  font-style: normal;
  font-weight: 700;
}
.mh-field-hint {
  font-style: normal;
  color: #1410ec;
  cursor: help;
  margin-left: 4px;
}

/* ===== 中间文件业务办理：富文本 + 补正行表 ===== */
.mh-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
  margin-bottom: 4px;
  padding: 4px 0;
}
.mh-editor-toolbar .btn {
  min-width: 32px;
  padding: 2px 8px;
  font-size: 12px;
}
.mh-editor-toolbar .btn sup,
.mh-editor-toolbar .btn sub {
  font-size: 9px;
}
.mh-editor {
  min-height: 200px;
  max-height: 360px;
  overflow: auto;
  width: 100%;
  font-size: 13px;
  line-height: 1.65;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  font-family: inherit;
  outline: none;
  white-space: pre-wrap;
  word-break: break-word;
}
.mh-editor:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 2px var(--brand-soft);
}
.mh-editor[contenteditable="false"] {
  background: #f9fafb;
  color: var(--muted);
}
.mh-editor:empty:before {
  content: attr(data-placeholder);
  color: #9ca3af;
  pointer-events: none;
}
.mh-editor b, .mh-editor strong { font-weight: 700; }
.mh-editor u { text-decoration: underline; }
.mh-editor i, .mh-editor em { font-style: italic; }
.mh-editor sup { vertical-align: super; font-size: 0.75em; }
.mh-editor sub { vertical-align: sub; font-size: 0.75em; }

/* 意见陈述粘贴：块级段不要再用默认 p 外边距画出空行（CPC section 一段一行） */
.mh-editor p,
.mh-editor div,
.mh-editor h1,
.mh-editor h2,
.mh-editor h3,
.mh-editor h4,
.mh-editor h5,
.mh-editor h6,
.mh-editor li {
  margin: 0;
  padding: 0;
}


.mh-corr-table-wrap {
  overflow: auto;
  max-height: 280px;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.mh-corr-table {
  width: 100%;
  margin: 0;
}
.mh-corr-table th,
.mh-corr-table td {
  white-space: normal;
  max-width: none;
  font-size: 12px;
  vertical-align: top;
  padding: 4px 6px;
}
.mh-corr-table input,
.mh-corr-table select,
.mh-corr-table textarea {
  width: 100%;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 6px;
  font-family: inherit;
}
.mh-corr-table textarea {
  min-height: 48px;
  resize: vertical;
}
.mh-c-file-other {
  margin-top: 4px;
}
.mh-fee-opt {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 13px;
  line-height: 1.55;
  margin: 8px 0 4px;
  color: #1f2937;
}
.mh-fee-opt input {
  margin-top: 3px;
}
.mh-fee-pane {
  margin: 0 0 8px 24px;
}
.mh-inline-date,
.mh-inline-text {
  display: inline-block;
  font-size: 12px;
  border: none;
  border-bottom: 1px solid #9ca3af;
  border-radius: 0;
  padding: 0 6px;
  background: transparent;
  min-width: 7em;
}
.mh-inline-text {
  min-width: 10em;
}
.mh-attach-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 12px;
}
.mh-attach-row {
  display: grid;
  grid-template-columns: 22px 110px 1fr;
  gap: 6px;
  align-items: center;
  padding: 4px 6px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafbfc;
}
.mh-attach-row select {
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 6px;
  width: 100%;
}
.mh-attach-row label {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}
.mh-attach-row {
  grid-template-columns: 22px 100px 1fr auto auto;
}
.mh-attach-row .mh-a-status {
  font-size: 10px;
  color: var(--muted);
  white-space: nowrap;
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}
.mh-tb-sep {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 4px;
}
.mh-tb-rich {
  gap: 3px;
  max-width: 100%;
}
.mh-tb-select {
  font-size: 11px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 2px 4px;
  max-width: 100px;
  background: #fff;
}
.mh-tb-color {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
  font-size: 12px;
  font-weight: 700;
  overflow: hidden;
}
.mh-tb-color input[type="color"] {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
  width: 100%;
  height: 100%;
  border: none;
  padding: 0;
}
.mh-tb-color span.bg {
  text-decoration: underline;
  text-decoration-color: #eab308;
  text-decoration-thickness: 3px;
}
.mh-editor ul, .mh-editor ol {
  margin: 4px 0 4px 1.4em;
  padding: 0;
}
.mh-editor s, .mh-editor strike { text-decoration: line-through; }
.mh-editor hr {
  border: none;
  border-top: 1px solid #999;
  margin: 10px 0;
}
.mh-proof-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 12px;
}
.mh-proof-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: #fafbfc;
}
.mh-proof-row input[type="text"] {
  flex: 1;
  min-width: 100px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 3px 6px;
}
.mh-proof-row .name {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* 全屏编辑 */
.mh-fs {
  position: fixed;
  inset: 0;
  z-index: 2000;
  background: #fff;
  display: flex;
  flex-direction: column;
}
.mh-fs.hidden { display: none !important; }
.mh-fs-bar {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--brand-soft);
}
.mh-fs-editor {
  flex: 1;
  max-height: none;
  min-height: 0;
  border: none;
  border-radius: 0;
  font-size: 15px;
  line-height: 1.8;
  padding: 20px 28px;
}
.mh-fs .mh-editor-toolbar {
  padding: 6px 16px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}

/* 模态预览 / 四书编辑 */
.mh-modal {
  position: fixed;
  inset: 0;
  z-index: 2100;
  background: rgba(15, 23, 42, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.mh-modal.hidden { display: none !important; }
.mh-modal-card {
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 12px 40px rgba(0,0,0,.18);
  width: min(920px, 100%);
  max-height: min(90vh, 900px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.mh-four-card { width: min(960px, 100%); }
.mh-preview-card { width: min(880px, 100%); }
.mh-preview-wide { width: min(920px, 100%); }

/* 中间文件预览纸面内嵌官方表格 */
.app-preview-paper .mh-paper-inner {
  margin-top: 8px;
}
.app-preview-paper .mh-paper-inner .cpc-form {
  max-width: 100%;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.04);
}
.app-preview-paper .mh-paper-inner .pv-doc {
  font-family: "SimSun", "宋体", "Noto Serif CJK SC", serif;
  font-size: 14px;
  line-height: 1.85;
  color: #111;
}
.app-preview-paper .mh-paper-inner .pv-doc p {
  text-indent: 2em;
  margin: 0.35em 0;
}

/* ===== 官方表格样式预览（对齐 100012/100006 请求类表格） ===== */
.cpc-form {
  background: #fff;
  color: #111;
  border: 2px solid #222;
  font-family: "SimSun", "宋体", "Noto Serif CJK SC", serif;
  font-size: 13px;
  line-height: 1.55;
  max-width: 820px;
  margin: 0 auto;
}
.cpc-form .cpc-title {
  text-align: center;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: 0.35em;
  padding: 14px 12px 8px;
  border-bottom: 1px solid #222;
}
.cpc-form .cpc-code {
  text-align: right;
  font-size: 11px;
  color: #444;
  padding: 4px 10px 0;
}
.cpc-form .cpc-hint {
  font-size: 11px;
  color: #444;
  padding: 4px 12px 8px;
  border-bottom: 1px solid #222;
}
.cpc-form table.cpc-grid {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}
.cpc-form table.cpc-grid td,
.cpc-form table.cpc-grid th {
  border: 1px solid #222;
  padding: 6px 8px;
  vertical-align: top;
  font-weight: 400;
  font-size: 12.5px;
}
.cpc-form .lab {
  width: 22%;
  background: #f7f7f7;
  white-space: nowrap;
}
.cpc-form .lab-num {
  width: 36px;
  text-align: center;
  background: #f0f0f0;
  font-weight: 700;
}
.cpc-form .chk-row {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  margin: 4px 0;
  line-height: 1.45;
}
.cpc-form .chk {
  display: inline-block;
  width: 13px;
  height: 13px;
  border: 1px solid #222;
  margin-top: 2px;
  flex: 0 0 auto;
  text-align: center;
  line-height: 11px;
  font-size: 11px;
}
.cpc-form .chk.on::before { content: "✓"; }
.cpc-form .fill {
  display: inline-block;
  min-width: 2.2em;
  border-bottom: 1px solid #333;
  padding: 0 2px;
  margin: 0 1px;
}
.cpc-form .cpc-body {
  min-height: 180px;
  padding: 10px 12px;
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SimSun", "宋体", serif;
  font-size: 13px;
  line-height: 1.75;
}
.cpc-form .cpc-body b, .cpc-form .cpc-body strong { font-weight: 700; }
.cpc-form .cpc-body u { text-decoration: underline; }
.cpc-form .cpc-body i, .cpc-form .cpc-body em { font-style: italic; }
.cpc-form .cpc-body sup { vertical-align: super; font-size: 0.75em; }
.cpc-form .cpc-body sub { vertical-align: sub; font-size: 0.75em; }
.cpc-form .cpc-body p,
.cpc-form .cpc-body div,
.cpc-form .cpc-body h1,
.cpc-form .cpc-body h2,
.cpc-form .cpc-body h3,
.cpc-form .cpc-body h4,
.cpc-form .cpc-body h5,
.cpc-form .cpc-body h6,
.pv-section-body p,
.pv-section-body div,
.ap-section.pv-doc p,
.ap-section.pv-doc div {
  margin: 0;
  padding: 0;
}

.cpc-form .cpc-body ul, .cpc-form .cpc-body ol { margin: 4px 0 4px 1.4em; }
.cpc-form .cpc-sign {
  min-height: 56px;
  text-align: right;
  padding: 12px 16px;
}
.cpc-form .cpc-sign .nm { font-size: 14px; margin-bottom: 6px; }
.cpc-form .cpc-office {
  min-height: 48px;
  color: #666;
  font-size: 12px;
}
.cpc-form table.cpc-corr {
  width: 100%;
  border-collapse: collapse;
}
.cpc-form table.cpc-corr th {
  background: #f0f0f0;
  font-weight: 700;
  text-align: center;
}
.cpc-form table.cpc-corr td,
.cpc-form table.cpc-corr th {
  border: 1px solid #222;
  padding: 6px;
  font-size: 12px;
}
.cpc-form .cpc-foot {
  font-size: 11px;
  color: #555;
  padding: 8px 12px;
  border-top: 1px solid #222;
  background: #fafafa;
}
.mh-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  background: #f8fafc;
}
.mh-preview-tabs {
  display: flex;
  gap: 4px;
  padding: 8px 16px 0;
  border-bottom: 1px solid var(--border);
}
.mh-preview-tabs .subtab {
  border: none;
  background: transparent;
  padding: 6px 12px;
  font-size: 12px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
}
.mh-preview-tabs .subtab.on {
  color: var(--brand-dark);
  border-bottom-color: var(--brand);
  font-weight: 600;
}
.mh-preview-body {
  flex: 1;
  overflow: auto;
  padding: 16px 20px;
  font-size: 13px;
  line-height: 1.7;
}
.mh-preview-body .pv-meta {
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 12px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--border);
}
.mh-preview-body .pv-doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fffef8;
  min-height: 200px;
}
.mh-preview-body .pv-doc b { font-weight: 700; }
.mh-preview-body .pv-doc u { text-decoration: underline; }
.mh-preview-body .pv-doc i { font-style: italic; }
.mh-preview-body .pv-doc sup { vertical-align: super; font-size: 0.75em; }
.mh-preview-body .pv-doc sub { vertical-align: sub; font-size: 0.75em; }
.mh-preview-body pre.pv-tree {
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px 14px;
  border-radius: 8px;
  font-size: 12px;
  overflow: auto;
  white-space: pre-wrap;
}
.mh-preview-body table.pv-corr {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
.mh-preview-body table.pv-corr th,
.mh-preview-body table.pv-corr td {
  border: 1px solid var(--border);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.mh-preview-body table.pv-corr th { background: #f3f4f6; }
.mh-four-text {
  flex: 1;
  min-height: 360px;
  margin: 0 16px 12px;
  padding: 12px;
  font-size: 13px;
  font-family: "Cascadia Code", "Consolas", "Microsoft YaHei", monospace;
  line-height: 1.6;
  border: 1px solid var(--border);
  border-radius: 8px;
  resize: vertical;
}
.mh-four-xml {
  margin: 0 16px 12px;
  max-height: 280px;
  overflow: auto;
  background: #0f172a;
  color: #e2e8f0;
  padding: 12px;
  border-radius: 8px;
  font-size: 11px;
  white-space: pre-wrap;
  word-break: break-all;
}

/* ===== 预览申请文件（对齐 CPC：左树 + 右版式） ===== */
#modal-four-preview,
#modal-file-preview {
  background: rgba(15, 23, 42, .55);
  backdrop-filter: blur(3px);
}
.app-preview-modal {
  width: min(1120px, 98vw);
  height: min(92vh, 940px);
  max-height: 94vh;
  display: flex;
  flex-direction: column;
  padding: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 18px 50px rgba(15, 23, 42, .28);
  border: 1px solid rgba(255, 255, 255, .35);
}
.app-preview-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  flex-shrink: 0;
  background: linear-gradient(180deg, #0f4c8a 0%, #0d3d7a 100%);
  color: #fff;
}
.app-preview-h h1 {
  color: #fff;
  font-size: 16px;
  letter-spacing: .5px;
}
.app-preview-h #four-prev-path,
.app-preview-h #file-prev-path,
.app-preview-h #rd-path {
  color: rgba(255, 255, 255, .78) !important;
  font-size: 12px;
}
.rd-tree-group {
  font-size: 11px;
  font-weight: 600;
  color: #64748b;
  padding: 10px 10px 4px;
}
.rd-edit,
textarea.rd-src {
  flex: 1;
  width: 100%;
  min-height: 0;
  border: 1px solid var(--border, #e2e8f0);
  border-radius: 8px;
  padding: 12px 14px;
  font-family: ui-monospace, Consolas, "宋体", monospace;
  font-size: 15px;
  line-height: 1.65;
  resize: none;
  background: #fff;
}
.rd-edit {
  zoom: var(--preview-zoom, 1.2);
}
.app-preview-tools {
  display: flex;
  gap: 6px;
  align-items: center;
  flex-shrink: 0;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.preview-zoom {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0 2px;
}
.preview-zoom .btn {
  min-width: 32px;
  padding-left: 8px;
  padding-right: 8px;
}
.preview-zoom-pct {
  min-width: 48px !important;
  font-variant-numeric: tabular-nums;
}
.app-preview-tools .btn {
  background: rgba(255, 255, 255, .12);
  color: #fff;
  border-color: rgba(255, 255, 255, .28);
}
.app-preview-tools .btn:hover {
  background: rgba(255, 255, 255, .22);
}
.app-preview-tools .btn.on {
  background: #fff;
  color: #0d3d7a;
  border-color: #fff;
  font-weight: 600;
}
.app-preview-body {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: 220px 1fr;
  background: linear-gradient(160deg, #dfe7f1 0%, #eef2f7 45%, #e4eaf2 100%);
}
.app-preview-tree {
  background: linear-gradient(180deg, #f7fafc 0%, #eef3f8 100%);
  border-right: 1px solid #d5dee8;
  overflow: auto;
  padding: 12px 0 16px;
}
.app-preview-tree-title {
  font-size: 11px;
  font-weight: 700;
  color: #64748b;
  letter-spacing: 1px;
  text-transform: uppercase;
  padding: 0 14px 10px;
}
.app-preview-tree-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 8px;
}
.app-preview-tree-item {
  display: block;
  width: 100%;
  text-align: left;
  border: 1px solid transparent;
  background: transparent;
  border-radius: 8px;
  padding: 9px 11px;
  font-size: 12.5px;
  color: var(--text);
  cursor: pointer;
  line-height: 1.35;
  transition: background .12s, border-color .12s, box-shadow .12s;
}
.app-preview-tree-item:hover {
  background: #fff;
  border-color: #c9d7ea;
  box-shadow: 0 1px 3px rgba(15, 23, 42, .06);
}
.app-preview-tree-item.on {
  background: linear-gradient(135deg, #1a5fb4, #0d4a9a);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 4px 12px rgba(26, 95, 180, .28);
}
.app-preview-tree-item .code {
  display: block;
  font-size: 10px;
  opacity: .72;
  margin-top: 3px;
  font-family: ui-monospace, Consolas, monospace;
}
.app-preview-main {
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 14px 18px 18px;
  overflow: hidden;
}
#four-prev-meta,
#file-prev-meta {
  font-size: 11.5px !important;
  color: #64748b;
  margin-bottom: 10px !important;
  flex-shrink: 0;
  padding: 0 4px;
}
.app-preview-paper.ap-embed {
  padding: 0;
  max-width: none;
  background: #3f4448;
}
.app-preview-paper.ap-embed iframe,
.app-preview-paper.ap-embed img.ap-full {
  display: block;
  width: 100%;
  min-height: 68vh;
  border: 0;
}
.app-preview-paper.ap-embed img.ap-full {
  object-fit: contain;
  background: #2b2b2b;
  min-height: 42vh;
}
.app-preview-paper .ap-file-table {
  width: 100%;
  border-collapse: collapse;
  margin: 10px 0 16px;
  font-family: var(--font);
  font-size: 13px;
}
.app-preview-paper .ap-file-table th,
.app-preview-paper .ap-file-table td {
  border: 1px solid #c3cdd9;
  padding: 4px 8px;
  vertical-align: top;
}
.app-preview-paper pre.qc-opinion {
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "SimSun", "宋体", "Noto Serif CJK SC", serif;
  font-size: 14px;
  line-height: 1.85;
  color: #111;
  margin: 0;
  padding: 8px 4px 24px;
}
.app-preview-paper .qc-opinion {
  color: #111;
  font-family: "SimSun", "宋体", "Noto Serif CJK SC", serif;
  font-size: 15px;
  line-height: 1.75;
}
.app-preview-paper .qc-opinion p {
  margin: 0;
}
.app-preview-paper .qc-op-title {
  font-family: "SimHei", "黑体", "Microsoft YaHei", sans-serif;
  font-size: 22px;
  font-weight: 700;
  text-align: center;
  letter-spacing: 0.08em;
  margin: 0 0 8px;
  padding-bottom: 8px;
  border-bottom: 3px double #1f4e79;
}
.app-preview-paper .qc-op-intro,
.app-preview-paper .qc-op-preface,
.app-preview-paper .qc-op-body,
.app-preview-paper .qc-op-note {
  text-indent: 2em;
  text-align: justify;
  margin: 8px 0;
}
.app-preview-paper .qc-op-preface {
  font-weight: 700;
}
.app-preview-paper .qc-op-meta,
.app-preview-paper .qc-op-search {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 14px;
  font-size: 14px;
}
.app-preview-paper .qc-op-meta th,
.app-preview-paper .qc-op-meta td,
.app-preview-paper .qc-op-search th,
.app-preview-paper .qc-op-search td {
  border: 1px solid #c5d0dc;
  padding: 5px 8px;
  vertical-align: top;
  text-align: left;
}
.app-preview-paper .qc-op-meta th {
  width: 8.5em;
  font-weight: 700;
  color: #1f4e79;
  background: #f4f7fb;
  white-space: nowrap;
}
.app-preview-paper .qc-op-search th {
  background: #e7eef5;
  font-weight: 700;
  text-align: center;
}
.app-preview-paper .qc-op-search td:first-child,
.app-preview-paper .qc-op-search td:last-child {
  text-align: center;
  white-space: nowrap;
}
.app-preview-paper .qc-op-h {
  font-size: 17px;
  font-weight: 700;
  margin: 18px 0 8px;
  padding-bottom: 3px;
  border-bottom: 1px solid #1f4e79;
}
.app-preview-paper .qc-op-item {
  margin: 8px 0;
  padding-left: 2em;
  text-indent: -2em;
  text-align: justify;
}
.app-preview-paper .qc-op-no {
  font-weight: 700;
}
.app-preview-paper .qc-op-verdict {
  margin: 12px 0;
  padding: 8px 12px;
  text-indent: 0;
  background: #fbf3e4;
  border-left: 3px solid #8a6a2f;
}
.app-preview-paper .qc-op-sub {
  margin: 14px 0 4px;
  font-weight: 700;
  color: #1f4e79;
}
.app-preview-paper .qc-op-suggest,
.app-preview-paper .qc-op-cite {
  margin: 6px 0 12px;
  text-indent: 0;
  text-align: justify;
}
.app-preview-paper .qc-op-suggest {
  padding: 6px 10px 6px 12px;
  background: #f4f7fb;
  border-left: 3px solid #1f4e79;
}
.app-preview-paper .qc-op-note {
  color: #595959;
  font-size: 13px;
}
.app-preview-paper {
  flex: 1;
  min-height: 0;
  overflow: auto;
  background:
    linear-gradient(180deg, #fffefb 0%, #ffffff 40%, #fbfcfe 100%);
  border: 1px solid #c3cdd9;
  border-radius: 4px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .9) inset,
    0 10px 28px rgba(15, 23, 42, .1);
  padding: 32px 40px 48px;
  font-family: "SimSun", "Songti SC", "STSong", "Noto Serif CJK SC", serif;
  font-size: 16px;
  line-height: 1.9;
  zoom: var(--preview-zoom, 1.2);
  color: #1a1a1a;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}
.app-preview-paper .ap-doc-banner {
  text-align: center;
  font-family: "SimHei", "Microsoft YaHei", "PingFang SC", sans-serif;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: 3px;
  margin: 0 0 4px;
  color: #0b3a75;
  padding-bottom: 8px;
  border-bottom: 2px solid #0b3a75;
}
.app-preview-paper .ap-doc-sub {
  text-align: center;
  font-size: 12px;
  color: #6b7280;
  margin: 10px 0 20px;
  font-family: var(--font);
}
.app-preview-paper .ap-title {
  text-align: center;
  font-weight: 700;
  font-size: 16.5px;
  margin: 10px 0 20px;
  line-height: 1.5;
}
.app-preview-paper .ap-heading {
  font-weight: 700;
  font-family: "SimHei", "Microsoft YaHei", sans-serif;
  margin: 18px 0 8px;
  font-size: 15px;
  color: #111;
  padding-left: 2px;
}
.app-preview-paper .ap-p {
  margin: 0 0 9px;
  text-align: justify;
  text-indent: 0;
}
.app-preview-paper .ap-p .ap-num {
  color: #334155;
  margin-right: 6px;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
}
.app-preview-paper .ap-claim {
  margin: 0 0 16px;
  text-align: justify;
  padding: 2px 0 2px 2px;
}
.app-preview-paper .ap-claim-num {
  display: inline;
  font-weight: 700;
  margin-right: 6px;
  color: #0d3d7a;
}
.app-preview-paper .ap-claim-text {
  margin: 0 0 8px;
  text-align: justify;
}
.app-preview-paper .ap-claim-cont {
  padding-left: 2em;
}
.app-preview-paper .ap-figure {
  margin: 22px auto;
  text-align: center;
  page-break-inside: avoid;
}
.app-preview-paper .ap-figure .ap-fig-img-slot {
  display: inline-block;
  overflow: hidden;
  margin: 0 auto;
}
.app-preview-paper .ap-figure img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  border: 1px solid #d1d5db;
  border-radius: 2px;
  background: #fafafa;
  box-shadow: 0 2px 8px rgba(0, 0, 0, .06);
}
.app-preview-paper .ap-math {
  display: inline-block;
  vertical-align: middle;
  margin: 0 2px;
}
.app-preview-paper .ap-math-fallback {
  display: inline-block;
  vertical-align: middle;
  margin: 0 2px;
  padding: 0 4px;
  font-family: "Cambria Math", "Times New Roman", serif;
  font-style: italic;
  background: #f3f4f6;
  border: 1px solid #e5e7eb;
  border-radius: 3px;
  line-height: 1.4;
}

.app-preview-paper .ap-cpc-table {
  border-collapse: collapse;
  width: 100%;
  margin: 8px 0 12px;
  font-size: 13px;
  table-layout: auto;
}
.app-preview-paper .ap-cpc-table td,
.app-preview-paper .ap-cpc-table th {
  border: 1px solid #444;
  padding: 4px 6px;
  vertical-align: top;
  word-break: break-word;
}
.app-preview-paper .ap-cpc-table .ap-math,
.app-preview-paper .ap-cpc-table .ap-math-fallback {
  display: inline-block;
  max-width: 100%;
}

.app-preview-paper .ap-table {
  display: block;
  margin: 8px 0;
}
.app-preview-paper .ap-math .ap-fig-img-slot,
.app-preview-paper .ap-table .ap-fig-img-slot {
  display: inline-block;
  min-height: 0;
  overflow: hidden;
  vertical-align: middle;
}
.app-preview-paper .ap-math img,
.app-preview-paper .ap-table img {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  display: block;
  vertical-align: middle;
  background: #fff;
}
.app-preview-paper .ap-fig-label {
  margin-top: 8px;
  font-size: 13px;
  font-family: "SimHei", "Microsoft YaHei", sans-serif;
  color: #222;
}
.app-preview-paper .ap-empty {
  color: #94a3b8;
  font-family: var(--font);
  text-align: center;
  padding: 56px 16px;
  font-size: 13px;
}
.app-preview-paper .ap-kv {
  display: grid;
  grid-template-columns: 148px 1fr;
  gap: 6px 12px;
  font-size: 13px;
  margin-bottom: 8px;
  font-family: var(--font);
  align-items: start;
}
.app-preview-paper .ap-kv .k {
  color: #64748b;
  font-weight: 500;
}
.app-preview-paper .ap-section {
  border-top: 1px dashed #cbd5e1;
  margin-top: 16px;
  padding-top: 12px;
}
.app-preview-src {
  flex: 1;
  min-height: 0;
  overflow: auto;
  margin: 0;
  background: #0b1220;
  color: #e2e8f0;
  padding: 16px 18px;
  border-radius: 8px;
  font-size: 13px;
  zoom: var(--preview-zoom, 1.2);
  white-space: pre-wrap;
  word-break: break-word;
  font-family: "Cascadia Code", Consolas, "SF Mono", monospace;
  line-height: 1.55;
  border: 1px solid #1e293b;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .04);
}
.app-preview-src.hidden,
.app-preview-paper.hidden,
.rd-edit.hidden { display: none !important; }

#modal-file-preview.is-fs,
#modal-four-preview.is-fs,
#modal-reply-docs.is-fs,
#mh-preview.is-fs {
  background: #0b1220;
  width: 100vw;
  height: 100vh;
  max-width: none;
  inset: 0;
}
#modal-file-preview.is-fs .app-preview-modal,
#modal-four-preview.is-fs .app-preview-modal,
#modal-reply-docs.is-fs .app-preview-modal,
#mh-preview.is-fs .app-preview-modal,
.app-preview-modal.is-fs {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  border-radius: 0;
}

@media print {
  body.printing-preview * {
    visibility: hidden !important;
  }
  body.printing-preview .app-preview-paper.is-printing,
  body.printing-preview .app-preview-paper.is-printing * {
    visibility: visible !important;
  }
  body.printing-preview .app-preview-paper.is-printing {
    position: absolute !important;
    left: 0 !important;
    top: 0 !important;
    width: 100% !important;
    max-width: none !important;
    height: auto !important;
    overflow: visible !important;
    margin: 0 !important;
    zoom: 1 !important;
    padding: 12mm 14mm !important;
    border: none !important;
    box-shadow: none !important;
    background: #fff !important;
  }
}

/* 著录项目变更 · CPC 分表 */
.bib-side .table-wrap { overflow:auto; max-height:220px; }
.bib-side table.data { font-size:12px; }
.bib-party-grid {
  display:grid;
  grid-template-columns: 120px 1fr;
  gap:8px 10px;
  align-items:center;
  font-size:13px;
}
.bib-party-grid label { color:var(--muted); }
.bib-party-grid input,
.bib-party-grid select { width:100%; padding:6px 8px; border:1px solid var(--border); border-radius:6px; font:inherit; }
.ph-proof-row input[type="file"] { font-size:11px; }

/* 质检工作台 */
.qc-split {
  grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.45fr);
}
.qc-split.is-preview-folded {
  grid-template-columns: 1fr;
}

.qc-split.is-preview-folded #qc-work {
  display: none;
}

/* ENG-SPLIT-P2B — 委托关系右侧详情折叠（参照质检 qc-split，独立选择器，勿改 .qc-*） */
/* clientp2uiw: eng detail ~60% / min-width>=520px; list may shrink; do not touch QC */
.content-split.eng-split,
.eng-split {
  grid-template-columns: minmax(200px, 2fr) minmax(520px, 3fr);
  min-height: 360px;
}
.eng-split.is-preview-folded {
  grid-template-columns: 1fr;
}
.eng-split.is-preview-folded #eng-detail {
  display: none;
}
.eng-detail-pane {
  padding: 12px;
  overflow: auto;
  min-width: 0;
  min-height: 0;
}

.qc-preview-pane {
  padding: 12px;
  overflow: hidden;
  min-width: 0;
  min-height: 0;
  display: flex;
  flex-direction: column;
}
#qc-work-empty { flex-shrink: 0; }
#qc-work-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.qc-preview-head {
  flex-shrink: 0;
  background: #fff;
  z-index: 2;
}
.qc-ver-sel {
  max-width: 240px;
  min-width: 120px;
  font-size: 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 4px 6px;
  background: #fff;
}
.qc-four-body {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  flex: 1;
  min-height: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
}
.qc-four-body.is-opinion {
  grid-template-columns: 1fr;
}
.qc-four-body.is-opinion #qc-four-tree {
  display: none;
}
#qc-four-tree {
  overflow: auto;
  min-height: 0;
  background: linear-gradient(180deg, #f7fafc 0%, #eef3f8 100%);
  border-right: 1px solid #d5dee8;
}
.qc-four-body .app-preview-main {
  overflow: hidden;
  min-height: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 10px;
}
#qc-preview-doc {
  overflow: auto;
  flex: 1;
  min-height: 0;
}
.qc-row-badge {
  display: inline-block;
  min-width: 16px;
  height: 16px;
  padding: 0 4px;
  margin-left: 4px;
  border-radius: 8px;
  background: #e53e3e;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  line-height: 16px;
  text-align: center;
  vertical-align: middle;
}
.qc-new-mark {
  display: inline-block;
  margin-right: 4px;
  padding: 0 5px;
  border-radius: 4px;
  background: #c6f6d5;
  color: #276749;
  font-size: 10px;
  font-weight: 700;
  vertical-align: middle;
}
.qc-org-dept {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 10px;
  background: #fff;
}
.qc-org-dept-h {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 8px 12px;
  background: #fafbfc;
  border-bottom: 1px solid var(--border);
  font-size: 13px;
}
.qc-org-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 6px 12px 6px 28px;
  font-size: 12px;
  border-top: 1px dashed var(--border);
}
#qc-pick-rows tr.qc-pick-row td {
  cursor: pointer;
  user-select: none;
  -webkit-user-select: none;
}
#qc-pick-rows tr.qc-pick-row:hover td { background: #eef5ff; }
#qc-pick-rows tr.qc-pick-row.selected td {
  background: var(--brand-soft);
  box-shadow: inset 3px 0 0 var(--brand);
}

.qc-org-dept-h label,
.qc-org-group label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 0;
}
.subtabs .subtab .nav-badge {
  margin-left: 6px;
}

#modal-qc-reply,
#modal-qc-supplement {
  align-items: center;
  justify-content: center;
}
#modal-qc-reply .qc-reply-modal,
#modal-qc-supplement .qc-reply-modal {
  width: min(760px, 94vw);
  height: min(72vh, 680px);
  min-width: 480px;
  min-height: 360px;
  max-width: 96vw;
  max-height: 92vh;
  resize: both;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
#modal-qc-reply .qc-reply-body,
#modal-qc-supplement .qc-reply-body {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 12px 16px 16px;
}
#modal-qc-reply .qc-reply-foot,
#modal-qc-supplement .qc-reply-foot {
  flex-shrink: 0;
  justify-content: flex-end;
  gap: 10px;
}
#modal-qc-reply .qc-reply-save,
#modal-qc-supplement .qc-reply-save {
  min-width: 96px;
  font-weight: 700;
  background: #fff7ed;
  border-color: #dd6b20;
  color: #9a3412;
}
#modal-qc-reply .qc-reply-save:hover,
#modal-qc-supplement .qc-reply-save:hover { background: #ffedd5; }
#modal-qc-reply .qc-reply-push,
#modal-qc-supplement .qc-reply-push {
  min-width: 120px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 700;
  box-shadow: 0 2px 0 #0d3d7a;
}
.qc-reply-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px 12px;
  margin-bottom: 12px;
  background: #fafbfc;
}
.qc-reply-item .qc-reply-seq {
  font-size: 12px;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 4px;
}
.qc-reply-item .qc-reply-conclusion {
  font-size: 13px;
  line-height: 1.55;
  white-space: pre-wrap;
  margin: 0 0 8px;
}
.qc-reply-item textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  line-height: 1.5;
  background: #fff;
}
.qc-reply-preview {
  display: grid;
  gap: 12px;
  padding: 8px 4px 16px;
}
.qc-reply-preview .qc-reply-item { margin: 0; }
.qc-coverage {
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 10px 12px 8px;
  margin-bottom: 14px;
  background: #f4f7fb;
}
.qc-coverage-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--brand-dark);
  margin-bottom: 6px;
}
.qc-coverage ol {
  margin: 0;
  padding-left: 22px;
}
.qc-coverage li {
  font-size: 12.5px;
  line-height: 1.55;
  margin-bottom: 6px;
}
.qc-coverage li strong { font-weight: 700; }
.qc-supp-extra-lab {
  font-size: 13px;
  font-weight: 700;
  margin: 4px 0 8px;
}
.qc-supp-item {
  margin-bottom: 10px;
}
.qc-supp-item textarea {
  width: 100%;
  min-height: 88px;
  resize: vertical;
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 8px 10px;
  font: inherit;
  line-height: 1.5;
  background: #fff;
}
.qc-reply-preview .qc-reply-ans {
  white-space: pre-wrap;
  font-size: 13px;
  line-height: 1.55;
  min-height: 40px;
  padding: 8px 10px;
  border-radius: 6px;
  background: #fff;
  border: 1px dashed #c4d4e8;
}
.tl-item { padding: 3px 0; border-bottom: 1px solid var(--border); }
.tl-more { margin-top: 4px; }
tr.qc-row-new td { background: #fffaf0; }

/* 原出包入口折叠，申请文件编辑为主入口 */
.pack-legacy {
  display: inline-flex;
  align-items: center;
  margin-left: 6px;
  border: 1px dashed var(--border);
  border-radius: 6px;
  padding: 2px 6px;
  background: #fafbfc;
}
.pack-legacy > summary {
  cursor: pointer;
  font-size: 11px;
  color: var(--muted);
  list-style: none;
  user-select: none;
  padding: 2px 4px;
}
.pack-legacy > summary::-webkit-details-marker { display: none; }
.pack-legacy[open] {
  flex-wrap: wrap;
  gap: 4px;
  padding-bottom: 4px;
}
.pack-legacy[open] > summary { width: 100%; }
.cases-more-ops {
  margin-left: 0;
}
.cases-more-ops[open] {
  max-width: min(720px, 100%);
  justify-content: flex-end;
}
.cases-more-ops > .pack-legacy {
  margin-left: 0;
}

.qc-hist-bar {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 8px 14px 10px;
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}
.qc-hist-bar.hidden { display: none; }
.qc-hist-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 10px;
  align-items: center;
}
.qc-hist-filters label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.qc-hist-filters select,
.qc-hist-filters input[type="date"] {
  font-size: 12px;
  padding: 3px 6px;
  min-width: 110px;
}
.qc-hist-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: stretch;
}
.qc-hist-stats .stat {
  flex: 0 1 auto;
  min-width: 72px;
  padding: 6px 10px;
}
.qc-hist-stats .stat b { font-size: 16px; }

.qc-hist-fold {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #fff;
  margin: 0;
}
.qc-hist-fold > summary {
  cursor: pointer;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  list-style: none;
  font-size: 12px;
  user-select: none;
}
.qc-hist-fold > summary::-webkit-details-marker { display: none; }
.qc-hist-fold[open] > summary {
  border-bottom: 1px solid var(--border);
  background: #fafbfc;
}
.qc-hist-fold .qc-hist-case-no { font-weight: 650; font-variant-numeric: tabular-nums; }
.qc-hist-fold .qc-hist-title { flex: 1; min-width: 120px; }
.qc-hist-rounds { width: 100%; border: none; margin: 0; }
.qc-hist-rounds td { font-size: 12px; }
.qc-hist-rounds tr[data-qid] { cursor: pointer; }
.qc-hist-rounds tr.selected td { background: #eef5ff; }
.qc-hist-round-lab { font-weight: 600; }


/* claims-paste contenteditable rd-edit */
div.rd-edit {
  overflow: auto;
  white-space: pre-wrap;
  word-break: break-word;
  outline: none;
  font-family: "宋体", SimSun, "Times New Roman", serif;
}
div.rd-edit:empty:before {
  content: attr(data-placeholder);
  color: #94a3b8;
  pointer-events: none;
}
div.rd-edit img {
  max-width: 100%;
  height: auto;
  display: inline-block;
  vertical-align: middle;
  margin: 4px 2px;
}

/* ENG-UI-CLIENTENGUI — 委托关系页分行线/观感/分页挂载；仅 #page-engagement；勿动 .qc-* */
#page-engagement .eng-split > .list-panel:not(.eng-detail-pane) {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-height: 0;
}
#page-engagement .eng-detail-pane {
  padding: 14px 16px;
}
#page-engagement .table {
  width: 100%;
  border-collapse: collapse;
}
#page-engagement .table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f1f5f9;
  font-weight: 600;
  font-size: 12px;
  color: #334155;
  letter-spacing: 0.02em;
  border-bottom: 1px solid #cbd5e1;
  padding: 8px 10px;
  text-align: left;
  white-space: nowrap;
}
#page-engagement .table tbody td {
  padding: 8px 10px;
  font-size: 13px;
  vertical-align: middle;
  border-bottom: 1px solid #e2e8f0;
}
#page-engagement .table tbody tr:hover {
  background: #f8fafc;
}
#page-engagement .table tbody tr.on {
  background: #eff6ff;
}
#page-engagement .table tbody tr.on td {
  border-bottom-color: #bfdbfe;
}
#page-engagement #eng-info-panel {
  padding: 14px 16px;
}
#page-engagement #eng-info-panel h3,
#page-engagement .eng-detail-pane h3,
#page-engagement .eng-detail-pane h4,
#page-engagement #eng-lines-wrap h4 {
  margin: 14px 0 8px;
  font-size: 14px;
  font-weight: 650;
  color: #1e293b;
  border-bottom: 1px solid #e2e8f0;
  padding-bottom: 6px;
}
#page-engagement .eng-detail-pane .form-grid,
#page-engagement #eng-info-panel .form-grid {
  gap: 10px 14px;
}
#page-engagement #eng-case-drawer {
  list-style: none;
  margin: 0;
  padding: 0;
}
#page-engagement #eng-case-drawer li {
  border-bottom: 1px solid #f1f5f9;
  padding: 7px 0;
  font-size: 13px;
}
#page-engagement #eng-case-drawer li:last-child {
  border-bottom: none;
}
#page-engagement .eng-du-panel {
  margin-top: 4px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  max-height: min(52vh, 480px);
}
#page-engagement .eng-du-panel .pager {
  border-top: 1px solid #e2e8f0;
}
#page-engagement .eng-split > .list-panel:not(.eng-detail-pane) .pager {
  border-top: 1px solid #e2e8f0;
}
#page-engagement .page-head h2 {
  letter-spacing: 0.02em;
}
#page-engagement .toolbar.dense {
  gap: 8px;
  align-items: center;
}
