/* ==========================================================================
   横琴粤澳深度合作区产业发展局 · 综合行政管理系统（三期）
   政务蓝白风格 · 全局样式
   ========================================================================== */

:root {
  /* 主色调 —— 政务蓝 */
  --gov-primary: #2f5bd9;
  --gov-primary-dark: #2347ad;
  --gov-primary-darker: #1a3680;
  --gov-primary-light: #eef3ff;
  --gov-primary-hover: #4a74e2;

  /* 侧栏深蓝 */
  --gov-sidebar-bg: #1b3266;
  --gov-sidebar-bg-deep: #142547;
  --gov-sidebar-hover: #243f7d;
  --gov-sidebar-active: #2f5bd9;

  /* 中性色 */
  --gov-bg: #eef2f8;
  --gov-card-bg: #ffffff;
  --gov-text: #1f2937;
  --gov-text-secondary: #6b7280;
  --gov-border: #e3e8f0;

  /* Element Plus 主色覆盖 */
  --el-color-primary: #2f5bd9;
  --el-color-primary-light-3: #6b8ce7;
  --el-color-primary-light-5: #9ab1ee;
  --el-color-primary-light-7: #c6d3f6;
  --el-color-primary-light-8: #dbe4fa;
  --el-color-primary-light-9: #edf2fd;
  --el-color-primary-dark-2: #2347ad;
  --el-border-radius-base: 4px;
  --el-font-size-base: 13px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  height: 100%;
  font-family: "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  color: var(--gov-text);
  background: var(--gov-bg);
  -webkit-font-smoothing: antialiased;
}

#app { height: 100%; }

a { color: var(--gov-primary); text-decoration: none; }

/* ==========================================================================
   登录页
   ========================================================================== */
.login-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #1b3266 0%, #2f5bd9 55%, #5b8def 100%);
  position: relative;
  overflow: hidden;
}
.login-page::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 12% 18%, rgba(255,255,255,.12) 0, transparent 28%),
    radial-gradient(circle at 85% 80%, rgba(255,255,255,.10) 0, transparent 30%);
}
.login-deco {
  position: absolute;
  inset: 0;
  pointer-events: none;
}
.login-panel {
  position: relative;
  width: 400px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 20px 60px rgba(10, 25, 70, .35);
  padding: 40px 40px 34px;
}
.login-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.login-logo .emblem {
  width: 46px;
  height: 46px;
  border-radius: 8px;
  background: linear-gradient(135deg, #2f5bd9, #1b3266);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
}
.login-title {
  /* 平台全称较长：字号收一档并允许两行，避免撑破登录卡片 */
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
  color: #16305f;
  letter-spacing: .3px;
}
.login-subtitle {
  font-size: 12px;
  color: var(--gov-text-secondary);
  margin: 6px 0 26px;
}
.login-footer {
  margin-top: 16px;
  text-align: center;
  font-size: 11px;
  color: #9aa5c0;
}

/* ==========================================================================
   主框架布局
   ========================================================================== */
.gov-layout {
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* 顶栏 */
.gov-header {
  height: 58px;
  flex: 0 0 58px;
  display: flex;
  align-items: center;
  background: #fff;
  border-bottom: 1px solid var(--gov-border);
  padding: 0 20px 0 0;
  box-shadow: 0 1px 4px rgba(20, 40, 90, .06);
  position: relative;
  z-index: 20;
}
.gov-header .brand {
  height: 100%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 20px;
  background: transparent;
  color: #1b3266;
  flex: 0 0 auto;
  white-space: nowrap;
}
.gov-header .brand .emblem {
  width: 32px;
  height: 32px;
  border-radius: 6px;
  background: linear-gradient(135deg, #1b3266, #2347ad);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 17px;
  font-weight: 700;
  flex: 0 0 32px;
}
.gov-header .brand .name {
  font-size: 16px;
  font-weight: 700;
  letter-spacing: .3px;
  line-height: 1.2;
  color: #1b3266;
}
.gov-header .header-center {
  flex: 1;
  display: flex;
  align-items: center;
  padding-left: 20px;
}
.gov-header .header-center .sys-tag {
  font-size: 12px;
  color: #6b7280;
}
.gov-header .header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}
.gov-header .header-right .header-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 12px;
  border-radius: 6px;
  cursor: pointer;
  color: #374151;
  font-size: 13px;
  transition: background .15s;
}
.gov-header .header-right .header-item:hover { background: #f0f4fb; }
.gov-header .user-chip {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 20px;
  cursor: pointer;
}
.gov-header .user-chip:hover { background: #f0f4fb; }
.gov-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f5bd9, #1b3266);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
}

/* 主体：侧栏 + 内容 */
.gov-body {
  flex: 1;
  display: flex;
  overflow: hidden;
}

/* 侧栏 */
.gov-sidebar {
  width: 240px;
  flex: 0 0 240px;
  background: linear-gradient(180deg, var(--gov-sidebar-bg) 0%, var(--gov-sidebar-bg-deep) 100%);
  overflow-y: auto;
  padding: 10px 0 30px;
}
.gov-sidebar::-webkit-scrollbar { width: 6px; }
.gov-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.18); border-radius: 3px; }

.el-menu.gov-menu {
  border-right: none;
  background: transparent;
}
.el-menu.gov-menu .el-menu-item,
.el-menu.gov-menu .el-sub-menu__title {
  color: #c7d2ee;
  height: 44px;
  line-height: 44px;
}
.el-menu.gov-menu .el-menu-item:hover,
.el-menu.gov-menu .el-sub-menu__title:hover {
  background: var(--gov-sidebar-hover);
  color: #fff;
}
.el-menu.gov-menu .el-menu-item.is-active {
  background: var(--gov-sidebar-active);
  color: #fff;
}
.el-menu.gov-menu .el-menu-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #7ba3ff;
}
.el-menu.gov-menu .el-sub-menu .el-menu {
  background: rgba(0,0,0,.12);
}
.el-menu.gov-menu .el-sub-menu .el-menu-item {
  color: #b4c1e2;
  min-width: 0;
  padding-left: 48px !important;
}
.el-menu.gov-menu .el-sub-menu .el-menu-item.is-active {
  color: #fff;
  background: rgba(47,91,217,.55);
}
.gov-menu .el-icon { margin-right: 6px; }

/* 内容区 */
.gov-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--gov-bg);
}
.gov-page {
  flex: 1;
  min-height: 0;
  height: 0;
  overflow-y: auto;
  padding: 14px 18px 24px;
}
.gov-page::-webkit-scrollbar { width: 8px; }
.gov-page::-webkit-scrollbar-thumb { background: #c6cede; border-radius: 4px; }

/* 面包屑 */
.gov-breadcrumb {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 0 10px;
  font-size: 12px;
  color: #8a94a8;
}
.gov-breadcrumb .sep { color: #c3cad8; }

/* 卡片 */
.gov-card {
  background: var(--gov-card-bg);
  border: 1px solid var(--gov-border);
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(20,40,90,.05);
}
.gov-card + .gov-card { margin-top: 14px; }
.gov-card .card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 18px;
  border-bottom: 1px solid #eef1f7;
}
.gov-card .card-head .card-title {
  font-size: 15px;
  font-weight: 600;
  color: #1f2b4d;
  display: flex;
  align-items: center;
  gap: 8px;
}
.gov-card .card-title::before {
  content: "";
  width: 4px;
  height: 16px;
  background: var(--gov-primary);
  border-radius: 2px;
}
.gov-card .card-body { padding: 16px 18px; }

/* 筛选工具栏 */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--gov-border);
  border-radius: 8px;
  margin-bottom: 14px;
}
.filter-bar .filter-item { display: flex; align-items: center; gap: 6px; }
.filter-bar .filter-label { color: #5a6478; font-size: 13px; white-space: nowrap; }

/* 统计指标卡 */
.stat-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-bottom: 14px;
}
.stat-card {
  background: #fff;
  border: 1px solid var(--gov-border);
  border-radius: 8px;
  padding: 16px 18px;
  display: flex;
  align-items: center;
  gap: 14px;
  box-shadow: 0 1px 3px rgba(20,40,90,.05);
}
.stat-card .stat-icon {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  color: #fff;
}
.stat-card .stat-info .stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #1f2b4d;
  line-height: 1.1;
}
.stat-card .stat-info .stat-label {
  font-size: 12px;
  color: #8a94a8;
  margin-top: 4px;
}
.stat-card .stat-info .stat-extra { font-size: 12px; color: #2f5bd9; margin-top: 3px; }

/* 图表容器 */
.chart-box { width: 100%; height: 280px; }
.chart-box.sm { height: 220px; }

/* 详情描述 */
.desc-list { display: flex; flex-wrap: wrap; gap: 0 32px; }
.desc-list .desc-item { width: 30%; margin-bottom: 14px; }
.desc-list .desc-item.full { width: 100%; }
.desc-list .desc-item .lbl { color: #8a94a8; font-size: 12px; margin-bottom: 4px; }
.desc-list .desc-item .val { color: #1f2b4d; font-size: 13px; line-height: 1.6; }

/* 状态标签 */
.status-tag { padding: 2px 10px; border-radius: 10px; font-size: 12px; display: inline-block; white-space: nowrap; }
.status-draft { background: #f1f3f7; color: #6b7280; }
.status-pending { background: #fff7e6; color: #d48806; }
.status-approving { background: #eef3ff; color: #2f5bd9; }
.status-approved { background: #e8f7ee; color: #16a34a; }
.status-rejected { background: #fdeaea; color: #dc2626; }
.status-done { background: #e8f7ee; color: #16a34a; }
.status-closed { background: #f1f3f7; color: #9aa1b2; }

/* 审批时间线 */
.approval-flow { padding: 6px 0; }

/* 空态 / 通用 */
.text-muted { color: #8a94a8; }
.text-primary { color: #2f5bd9; }
.text-danger { color: #dc2626; }
.text-success { color: #16a34a; }
.mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; }
.mb8 { margin-bottom: 8px; } .mb16 { margin-bottom: 16px; }
.flex { display: flex; align-items: center; }
.flex-between { display: flex; align-items: center; justify-content: space-between; }
.gap8 { gap: 8px; } .gap12 { gap: 12px; }
.flex-1 { flex: 1; }
.right { text-align: right; }

/* 表格行 hover 高亮，金额右对齐 */
.el-table .cell { font-size: 13px; }
.amount { font-variant-numeric: tabular-nums; font-family: "SF Pro", "Segoe UI", monospace; }
.num { text-align: right; }

/* 流程设计器 */
.flow-canvas {
  background: #f7f9fd;
  border: 1px solid var(--gov-border);
  border-radius: 8px;
  min-height: 460px;
  position: relative;
  overflow: auto;
  padding: 20px;
  background-image: radial-gradient(#dfe6f3 1px, transparent 1px);
  background-size: 16px 16px;
}
.flow-node {
  position: absolute;
  box-sizing: border-box;
  border-radius: 8px;
  background: #fff;
  border: 2px solid #2f5bd9;
  padding: 8px 10px;
  text-align: center;
  cursor: move;
  user-select: none;
  box-shadow: 0 2px 8px rgba(30, 60, 140, .12);
  transition: box-shadow .12s;
  overflow: hidden;
}
.flow-node:hover { box-shadow: 0 6px 16px rgba(30, 60, 140, .22); }
.flow-node-body {
  width: 100%; height: 100%;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.35;
}
.flow-node-type { font-size: 11px; color: #8a94a8; }
.flow-node-name { font-size: 13px; font-weight: 600; color: #1f2b4d; margin: 2px 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.flow-node-approver { font-size: 11px; color: #2f5bd9; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* 形状区分：胶囊 / 圆角矩形 / 六边形 / 双描边 / 虚线胶囊 */
.flow-node-start {
  border-radius: 999px;
  border-color: #22c55e;
  background: #f0fdf4;
}
.flow-node-end {
  border-radius: 999px;
  border-color: #94a3b8;
  background: #f8fafc;
}
.flow-node-approve { border-radius: 12px; }

.flow-node-countersign {
  border-radius: 12px;
  border-color: #0284c7;
  background: #f0f9ff;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px #bae6fd, 0 2px 8px rgba(2, 132, 199, .16);
}
.flow-node-countersign .flow-node-type { color: #0284c7; }

.flow-node-orsign {
  border: none;
  clip-path: polygon(14% 0, 86% 0, 100% 50%, 86% 100%, 14% 100%, 0 50%);
  background: #ecfdf5;
  box-shadow: inset 0 0 0 2px #14b8a6, 0 2px 8px rgba(20, 184, 166, .18);
}
.flow-node-orsign .flow-node-type { color: #0f766e; }

/* 加签节点：紫色描边卡片，办理时可在该节点前/后追加审批人 */
.flow-node-addsign {
  border-radius: 12px;
  border-color: #7c3aed;
  background: #f5f3ff;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 4px #ddd6fe, 0 2px 8px rgba(124, 58, 237, .18);
}
.flow-node-addsign .flow-node-type { color: #6d28d9; }
.flow-node-addsign .flow-node-approver { color: #7c3aed; }
.flow-node-orsign .flow-node-body,
.flow-node-branch .flow-node-body { width: 68%; }
.flow-node-cc .flow-node-body { width: 82%; }
.flow-node-branch .flow-node-name { font-size: 12px; }
.flow-node-branch .flow-node-approver { font-size: 10px; }

.flow-node-branch {
  border: none;
  clip-path: polygon(50% 0, 100% 26%, 100% 74%, 50% 100%, 0 74%, 0 26%);
  background: #fffbeb;
  box-shadow: inset 0 0 0 2px #f59e0b, 0 2px 8px rgba(245, 158, 11, .18);
}
.flow-node-branch .flow-node-type { color: #b45309; font-weight: 600; }
.flow-node-branch .flow-node-approver { color: #b45309; }

.flow-node-cc {
  border-color: #6366f1;
  border-style: dashed;
  border-radius: 999px;
  background: #f5f3ff;
}
.flow-node-cc .flow-node-type { color: #6366f1; }

/* 表格在线编辑器 */
.sheet-editor {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  background: #fff;
}
.sheet-editor th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #f2f5fb;
  border: 1px solid #e2e8f3;
  color: #5a6478;
  font-weight: 600;
  padding: 5px 8px;
  white-space: nowrap;
}
.sheet-editor td {
  border: 1px solid #eef1f6;
  padding: 0;
}
.sheet-editor td input {
  width: 100%;
  min-width: 92px;
  border: 0;
  outline: none;
  padding: 6px 8px;
  font-size: 12px;
  font-family: inherit;
  background: transparent;
}
.sheet-editor td input:focus {
  background: #eef4ff;
  box-shadow: inset 0 0 0 1px #2f5bd9;
}
.sheet-editor .row-del {
  color: #cbd3e1;
  cursor: pointer;
  margin-left: 4px;
  font-weight: 400;
}
.sheet-editor .row-del:hover { color: #e5484d; }

/* 切换账号卡片 */
.acct-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.acct-card {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid #e8edf6;
  background: #fff;
  cursor: pointer;
  transition: all .16s;
}
.acct-card:hover {
  border-color: #b9c9ee;
  box-shadow: 0 6px 16px rgba(31, 58, 122, .10);
  transform: translateY(-1px);
}
.acct-card.active {
  border-color: #2f5bd9;
  background: #f4f7ff;
  cursor: default;
}
.acct-avatar {
  width: 34px; height: 34px;
  border-radius: 50%;
  background: linear-gradient(135deg, #2f5bd9, #1f3a7a);
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 14px; font-weight: 600;
  flex: 0 0 34px;
}
.acct-name {
  font-size: 13px; font-weight: 600; color: #1f2b4d;
  display: flex; align-items: center; gap: 6px;
}
.acct-cur {
  font-size: 10px; font-weight: 400; color: #2f5bd9;
  background: #e3ecff; border-radius: 8px; padding: 0 6px;
}
.acct-meta { font-size: 11px; color: #8a94a8; margin-top: 2px; }
.acct-go { color: #b0b8c8; font-size: 14px; }

/* 富文本区 */
.doc-preview {
  border: 1px solid var(--gov-border);
  border-radius: 6px;
  padding: 20px 24px;
  background: #fff;
  line-height: 2;
  font-size: 14px;
}
.doc-preview .doc-title { text-align: center; font-size: 20px; font-weight: 700; margin-bottom: 8px; }
.doc-preview p { text-indent: 2em; margin: 0 0 6px; }

/* 知识库卡片 */
.knowledge-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.knowledge-item {
  border: 1px solid var(--gov-border);
  border-radius: 8px;
  padding: 16px;
  background: #fff;
  cursor: pointer;
  transition: box-shadow .15s, transform .15s;
}
.knowledge-item:hover { box-shadow: 0 6px 18px rgba(30,60,140,.12); transform: translateY(-2px); }
.knowledge-item .k-icon {
  width: 42px; height: 42px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 22px; color: #2f5bd9; background: #eef3ff;
  margin-bottom: 10px;
}
.knowledge-item .k-title { font-weight: 600; color: #1f2b4d; margin-bottom: 4px; }
.knowledge-item .k-desc { font-size: 12px; color: #8a94a8; line-height: 1.6; }

/* 聊天问答 */
.chat-wrap { display: flex; flex-direction: column; height: 560px; }
.chat-messages { flex: 1; overflow-y: auto; padding: 10px 4px; }
.chat-msg { display: flex; gap: 10px; margin-bottom: 16px; }
.chat-msg.user { flex-direction: row-reverse; }
.chat-msg .bubble {
  max-width: 72%;
  padding: 10px 14px;
  border-radius: 10px;
  background: #f2f4f9;
  color: #1f2b4d;
  line-height: 1.7;
  font-size: 13px;
  white-space: pre-wrap;
}
.chat-msg.user .bubble { background: #2f5bd9; color: #fff; }
.chat-msg .ai-avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #2f5bd9, #1b3266);
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 16px; flex: 0 0 34px;
}

/* 弹窗正文留白 */
.el-dialog__body { padding: 18px 22px; }

/* 移动端/平板提示条 */
.quick-nav { display: flex; flex-wrap: wrap; gap: 10px; }

/* 菜单项 hover 高亮提示 */
.menu-tip { color: #8a94a8; font-size: 12px; }

/* ============ 移动端 / iPad 适配（宽度 ≤ 1024px） ============ */
.menu-toggle { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; margin-left: 8px; border-radius: 8px; color: #1f2b4d; cursor: pointer; }
.menu-toggle:hover { background: #f0f4fb; }
.sidebar-mask { display: none; position: fixed; inset: 0; background: rgba(15, 23, 42, .42); z-index: 900; }

@media (max-width: 1024px) {
  .menu-toggle { display: flex; }
  .gov-header .brand { width: auto; flex: 0 0 auto; padding: 0 10px; }
  .gov-header .brand .name { display: none; }
  .gov-header .header-center { display: none; }
  .gov-header .header-right { margin-left: auto; }
  .gov-header .header-right .header-item:nth-child(1) { display: none; }

  .gov-sidebar {
    position: fixed; top: 58px; bottom: 0; left: 0; z-index: 1000;
    transform: translateX(-100%); transition: transform .22s ease;
    box-shadow: 6px 0 22px rgba(15, 23, 42, .18);
  }
  .gov-sidebar.mobile-open { transform: translateX(0); }
  .sidebar-mask { display: block; }

  .gov-page { padding: 10px 12px 20px; }
  .stat-row { grid-template-columns: repeat(2, 1fr) !important; gap: 10px; }
  .stat-card { padding: 12px; }
  .filter-bar { flex-wrap: wrap; gap: 8px; }
  .filter-bar .el-input, .filter-bar .el-select { width: 100% !important; }
  .gov-card .card-body { overflow-x: auto; }
  .el-table { font-size: 12px; }
  .el-dialog { width: 92vw !important; }
  .el-message-box { width: 88vw !important; }
}

@media (max-width: 640px) {
  .stat-row { grid-template-columns: 1fr !important; }
  .gov-page { padding: 8px 8px 16px; }
  .el-dialog { width: 96vw !important; }
  .el-form-item__label { width: 76px !important; }
  .gov-header .user-chip div[style*="line-height"] { display: none; }
}

/* ==========================================================================
   文档阅读器（公文预览）
   ========================================================================== */
/* Word 风格富文本在线编辑器 */
.word-editor { border:1px solid #e2e9f8; border-radius:8px; overflow:hidden; background:#eef1f7; }
.word-toolbar { display:flex; flex-wrap:wrap; align-items:center; gap:4px; padding:8px 10px; background:#fbfcff; border-bottom:1px solid #e6ebf4; }
.word-toolbar button { min-width:30px; height:28px; border:1px solid transparent; background:transparent; border-radius:5px; color:#3a4560; font-size:13px; cursor:pointer; padding:0 6px; }
.word-toolbar button:hover { background:#eaf0ff; border-color:#d3ddf5; }
.word-toolbar select { height:28px; border:1px solid #dbe2f0; border-radius:5px; background:#fff; color:#3a4560; font-size:12px; padding:0 4px; }
.word-toolbar .wt-sep { width:1px; height:18px; background:#e2e9f8; margin:0 4px; }
.word-canvas { max-height:460px; overflow:auto; padding:18px; background:#eef1f7; }
.word-paper { min-height:420px; background:#fff; padding:38px 46px; box-shadow:0 2px 14px rgba(15,32,68,0.10); outline:none; font-family:'FangSong',serif; font-size:16px; line-height:1.9; color:#1a1a1a; }
.word-paper:focus { box-shadow:0 2px 18px rgba(47,91,217,0.20); }
.word-paper table.word-table td { font-family:'微软雅黑',sans-serif; font-size:14px; }
/* 详情弹窗：内容再多也能滚动查看（补充协议、付款计划等长字段不会被裁在可视区外） */
.detail-dialog .el-dialog__body { max-height: 66vh; overflow: auto; }

/* 富文本预览：在线编辑保存的正文原样渲染，保证「保存后预览与编辑器一致」 */
.doc-richtext { font-family:'FangSong','仿宋_GB2312','STFangsong',serif; font-size:16px; line-height:2.05; color:#1a1a1a; word-break:break-word; }
.doc-richtext > p, .doc-richtext > div { margin:0 0 6px; }
.doc-richtext ul, .doc-richtext ol { margin:0 0 6px; padding-left:2.4em; }
.doc-richtext table { border-collapse:collapse; max-width:100%; }
.doc-richtext td, .doc-richtext th { border:1px solid #999; padding:4px 8px; font-size:14px; }
.doc-richtext img { max-width:100%; height:auto; }
/* 表格在线编辑：与 Word 编辑器同款外壳（工具栏 + 纸张画布） */
.wt-hint { font-size:12px; color:#9aa3b5; line-height:28px; margin:0 2px; }
.sheet-paper {
  display:inline-block; min-width:100%; box-sizing:border-box;
  background:#fff; padding:16px 18px 22px;
  box-shadow:0 2px 14px rgba(15,32,68,0.10);
  font-family:'Microsoft YaHei','等线',sans-serif;
}
.sheet-paper .sheet-editor td input { min-width:104px; padding:7px 9px; font-size:12.5px; }

.doc-reader {
  position: relative;
  max-height: 640px;
  overflow: auto;
  padding: 18px;
  background: #e9edf5;
  border-radius: 6px;
  border: 1px solid #dde3ee;
}
.doc-reader .doc-watermark {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
  font-size: 46px;
  letter-spacing: 12px;
  font-weight: 700;
  color: rgba(47, 91, 217, 0.055);
  transform: rotate(-22deg);
  user-select: none;
}

/* 流程位置条 */
.flow-position {
  border: 1px solid #e3e9f5;
  background: linear-gradient(180deg, #f7f9ff 0%, #ffffff 100%);
  border-radius: 8px;
  padding: 14px 16px 12px;
  margin-bottom: 14px;
}
.flow-position .fp-head {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: #1f2b4d;
  margin-bottom: 12px;
}
.flow-position .fp-track {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}
.fp-node {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border-radius: 16px;
  font-size: 12px;
  border: 1px solid transparent;
  background: #f1f3f7;
  color: #8a94a8;
  max-width: 100%;
}
.fp-node .fp-idx {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  color: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid currentColor;
}
.fp-node.done { background: #e9f8ef; color: #16a34a; border-color: #c9eed9; }
.fp-node.active { background: #eef3ff; color: #2f5bd9; border-color: #c6d3f6; box-shadow: 0 0 0 3px rgba(47,91,217,0.08); font-weight: 600; }
.fp-node.overdue { background: #fdeaea; color: #dc2626; border-color: #f7c9c9; }
.fp-node .fp-sub { font-size: 11px; opacity: 0.85; }
.fp-arrow { color: #c3cad8; font-size: 12px; }
.fp-meta {
  margin-top: 10px;
  font-size: 12px;
  color: #5a6478;
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}
.fp-meta b { color: #1f2b4d; }

/* 会议议题（平板阅读） */
.topic-reader {
  display: flex;
  flex-direction: column;
  min-height: calc(100vh - 180px);
  background: #eaeef6;
  border-radius: 10px;
  padding: 18px;
}
.topic-reader .tr-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 6px 14px;
}
.topic-reader .tr-paper {
  flex: 1;
  overflow: auto;
  background: #fff;
  border-radius: 6px;
  padding: 40px 46px;
  box-shadow: 0 4px 20px rgba(20, 35, 70, 0.08);
  font-family: "FangSong", "仿宋", serif;
}
.topic-reader .tr-actions {
  display: flex;
  gap: 14px;
  padding-top: 16px;
}
.topic-reader .tr-actions .el-button {
  flex: 1;
  height: 58px;
  font-size: 17px;
  border-radius: 10px;
}

/* ==========================================================================
   AI 对话式界面（会议纪要等，ChatGPT 风格气泡 + 底部输入区）
   ========================================================================== */
.ai-chat {
  display: flex; flex-direction: column;
  height: calc(100vh - 250px); min-height: 500px;
  background: #fff; border: 1px solid #e8edf6; border-radius: 12px;
  box-shadow: 0 2px 14px rgba(15, 32, 68, .05); overflow: hidden;
}
.ai-chat-head {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 12px 16px; border-bottom: 1px solid #eef1f7; background: #fbfcff; flex-wrap: wrap;
}
.ai-avatar {
  width: 30px; height: 30px; border-radius: 9px; flex: 0 0 auto;
  background: linear-gradient(135deg, #2f5bd9, #5b8def); color: #fff;
  font-size: 12px; font-weight: 600; display: flex; align-items: center; justify-content: center;
}
.ai-avatar.user { background: #e8eefc; color: #2f5bd9; }
.ai-chat-body { flex: 1; overflow-y: auto; padding: 18px 16px; background: #f7f9fd; }
.ai-row { display: flex; gap: 10px; margin-bottom: 16px; align-items: flex-start; }
.ai-row.user { justify-content: flex-end; }
.ai-bubble {
  max-width: 78%; padding: 12px 14px; border-radius: 12px;
  font-size: 13px; line-height: 1.85; box-shadow: 0 1px 3px rgba(15, 32, 68, .06);
}
.ai-bubble.assistant { background: #fff; border: 1px solid #e8edf6; border-top-left-radius: 4px; color: #1f2b4d; }
.ai-bubble.user { background: #eaf1ff; border: 1px solid #d6e2ff; border-top-right-radius: 4px; color: #1f2b4d; }
.ai-text { white-space: pre-wrap; word-break: break-word; }
.ai-caret { color: #2f5bd9; animation: ai-blink 1s steps(2, start) infinite; }
@keyframes ai-blink { to { visibility: hidden; } }
.ai-meta { margin-top: 6px; font-size: 11px; color: #8a94a8; }
.ai-audio {
  display: inline-flex; align-items: center; gap: 6px; margin-bottom: 6px;
  font-size: 12px; color: #2f5bd9; background: #f2f6ff;
  border: 1px solid #dde7fb; border-radius: 999px; padding: 2px 10px;
}
.ai-actions { margin-top: 8px; display: flex; gap: 2px; flex-wrap: wrap; }
.ai-typing { display: flex; gap: 4px; padding: 2px 0; }
.ai-typing span {
  width: 6px; height: 6px; border-radius: 50%; background: #9bb0d8;
  animation: ai-dot 1.2s infinite ease-in-out;
}
.ai-typing span:nth-child(2) { animation-delay: .15s; }
.ai-typing span:nth-child(3) { animation-delay: .3s; }
@keyframes ai-dot {
  0%, 80%, 100% { transform: translateY(0); opacity: .5; }
  40% { transform: translateY(-4px); opacity: 1; }
}
.ai-composer { border-top: 1px solid #eef1f7; padding: 10px 14px 12px; background: #fff; }
.ai-composer-box {
  border: 1px solid #dfe6f3; border-radius: 12px; padding: 6px 8px; background: #fbfcff;
}
.ai-composer-box:focus-within {
  border-color: #2f5bd9; box-shadow: 0 0 0 3px rgba(47, 91, 217, .10); background: #fff;
}
.ai-input {
  width: 100%; min-height: 64px; border: 0; outline: none; resize: none; background: transparent;
  font-size: 13px; line-height: 1.8; color: #1f2b4d; font-family: inherit; box-sizing: border-box;
}
.ai-composer-bar { display: flex; align-items: center; gap: 4px; margin-top: 4px; }
.ai-hint { font-size: 11px; color: #9aa3b5; margin-left: 4px; }
.ai-foot-hint {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 11px; color: #9aa3b5; margin-top: 6px;
}
@media (max-width: 720px) {
  .ai-chat { height: auto; }
  .ai-chat-body { max-height: 62vh; }
  .ai-bubble { max-width: 88%; }
  .ai-row .ai-avatar { display: none; }
}

/* ==========================================================================
   表单动态子表（预算来源明细 / 判给明细）：带标签、自动换行、合计提示
   ========================================================================== */
.sub-row {
  display: flex; flex-wrap: wrap; gap: 8px 10px; align-items: flex-end;
  padding: 10px 12px; margin-bottom: 8px;
  background: #fbfcff; border: 1px solid #e8eef8; border-radius: 8px;
}
.sub-cell { flex: 1 1 140px; min-width: 128px; }
.sub-label {
  font-size: 11px; color: #8a94a8; margin-bottom: 3px; line-height: 1.3;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.sub-del { margin-bottom: 2px; padding: 0 2px; }
.sub-sum {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 6px; padding: 6px 10px; background: #f7f9fd; border-radius: 6px;
}
.sub-sum-hint { font-size: 12px; }

/* 移动端 H5 外壳 */
.h5-shell {
  max-width: 430px;
  margin: 0 auto;
  min-height: 100vh;
  background: #f2f5fa;
  position: relative;
  padding-bottom: 62px;
  box-shadow: 0 0 30px rgba(20, 35, 70, 0.10);
}
.h5-top {
  background: linear-gradient(135deg, #2f5bd9, #1b3266);
  color: #fff;
  padding: 16px 16px 20px;
  border-radius: 0 0 18px 18px;
}
.h5-tabs {
  position: fixed;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 430px;
  display: flex;
  background: #fff;
  border-top: 1px solid #e6ebf4;
  z-index: 20;
}
.h5-tabs > div {
  flex: 1;
  text-align: center;
  padding: 8px 0 6px;
  font-size: 11px;
  color: #8a94a8;
  cursor: pointer;
}
.h5-tabs > div.active { color: #2f5bd9; font-weight: 600; }
.h5-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  margin: 12px 12px 0;
  box-shadow: 0 2px 10px rgba(20, 35, 70, 0.05);
}
.h5-empty { text-align: center; color: #b0b8c8; padding: 40px 0; font-size: 13px; }

/* 数据口径脚注 */
.metric-source {
  font-size: 11px;
  color: #9aa3b5;
  margin-top: 8px;
  border-top: 1px dashed #eef1f6;
  padding-top: 6px;
  line-height: 1.6;
}
