/* ============================================================
   南农继教院培训一体化管理系统 — 设计系统（南农绿）
   UI Design Guide: 教育机构 · 沉稳可信
   ============================================================ */
:root {
  /* 品牌色 */
  --primary: #0F7A4D;
  --primary-hover: #0C6A41;
  --primary-active: #0A5C38;
  --primary-light: #E8F3EC;
  --primary-dark: #08452C;
  --gold: #C9A063;

  /* 导航 */
  --sidebar-bg: #0B3B2A;
  --sidebar-bg2: #0C442D;
  --sidebar-text: #C9D6CF;

  /* 中性色 */
  --bg: #F5F6F7;
  --card: #FFFFFF;
  --border: #E5E6EB;
  --border-strong: #D8DAE0;
  --text: #1F2329;
  --text-2: #646A73;
  --text-3: #8F959E;

  /* 语义色 */
  --success: #3BA66B;
  --success-bg: #E8F3EC;
  --warning: #E6A23C;
  --warning-bg: #FDF3E3;
  --danger: #D64545;
  --danger-bg: #FBEAEA;
  --info: #3B82C4;
  --info-bg: #E9F2FA;

  /* 尺寸 */
  --sidebar-w: 224px;
  --topbar-h: 56px;
  --radius: 8px;
  --radius-sm: 6px;
  --shadow: 0 1px 3px rgba(15, 23, 42, .05), 0 1px 2px rgba(15, 23, 42, .03);
  --shadow-lg: 0 8px 28px rgba(15, 23, 42, .12);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 14px; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Hiragino Sans GB",
    "Microsoft YaHei", "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
::selection { background: var(--primary-light); color: var(--primary-dark); }
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-thumb { background: #D0D4DA; border-radius: 3px; }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- 布局骨架 ---------- */
.app { display: flex; min-height: 100vh; }
.main {
  flex: 1;
  min-width: 0;
  margin-left: var(--sidebar-w);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  transition: margin-left .2s;
}
.content { padding: 20px 24px 48px; }

/* ---------- 左侧导航 ---------- */
.sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--sidebar-bg2), var(--sidebar-bg));
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width .2s;
}
.logo {
  height: var(--topbar-h);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 8px;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  font-size: 16px;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.logo-mark img { width: 100%; height: 100%; object-fit: contain; display: block; filter: drop-shadow(0 1px 2px rgba(0,0,0,.25)); }
.logo-name { color: #fff; font-weight: 600; font-size: 15px; line-height: 1.25; }
.logo-sub { font-size: 10.5px; color: #7FA08F; letter-spacing: .5px; }

.menu { flex: 1; overflow-y: auto; padding: 6px 10px 20px; }
.menu-group-title {
  font-size: 11px;
  color: #7FA08F;
  padding: 16px 10px 6px;
  letter-spacing: 2px;
}
.menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 6px;
  color: var(--sidebar-text);
  font-size: 13.5px;
  cursor: pointer;
  transition: background .15s, color .15s;
  user-select: none;
}
.menu-item:hover { background: rgba(255,255,255,.07); color: #fff; }
.menu-item.active { background: var(--primary); color: #fff; font-weight: 500; }
.menu-item .arrow {
  margin-left: auto;
  font-size: 10px;
  opacity: .55;
  transition: transform .15s;
}
.menu-item .arrow.open { transform: rotate(90deg); }
.menu-parent { font-weight: 600; color: #DCE8E2; }
.menu-parent:hover { color: #fff; }
.menu-sub { display: none; }
.menu-sub.open { display: block; }
.menu-sub .menu-item { padding-left: 26px; font-size: 13px; }

.sidebar-footer {
  padding: 12px 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: 11.5px;
  color: #7FA08F;
}

/* ---------- 顶栏 ---------- */
.topbar {
  height: var(--topbar-h);
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 24px;
  position: sticky;
  top: 0;
  z-index: 60;
  flex-shrink: 0;
}
.breadcrumb { font-size: 13px; color: var(--text-2); }
.breadcrumb .sep { margin: 0 8px; color: var(--text-3); }
.breadcrumb .cur { color: var(--text); font-weight: 500; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 16px; }
.global-search {
  width: 260px; height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: 6px;
  padding: 0 12px;
  font-size: 13px;
  background: var(--bg);
  outline: none;
  transition: border .15s, box-shadow .15s;
}
.global-search:focus { border-color: var(--primary); background: #fff; box-shadow: 0 0 0 3px var(--primary-light); }
.bell { position: relative; font-size: 17px; color: var(--text-2); cursor: pointer; line-height: 1; }
.bell:hover { color: var(--primary); }
.bell .badge {
  position: absolute; top: -4px; right: -7px;
  min-width: 15px; height: 15px;
  background: var(--danger);
  color: #fff;
  font-size: 10px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  padding: 0 4px;
}
.user-chip { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.user-chip:hover .user-name { color: var(--primary); }
.avatar {
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  flex-shrink: 0;
}
.user-name { font-size: 13px; color: var(--text); }
.user-role { font-size: 11px; color: var(--text-3); }

/* ---------- 页面头部 ---------- */
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-title { font-size: 20px; font-weight: 600; letter-spacing: .2px; }
.page-desc { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.page-actions { display: flex; gap: 10px; flex-shrink: 0; }

/* ---------- 卡片 ---------- */
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.card-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 13px 20px;
  border-bottom: 1px solid var(--border);
}
.card-title { font-size: 15px; font-weight: 600; }
.card-title .hint { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 8px; }
.card-body { padding: 20px; }
.card-body.flush { padding: 0; }

/* ---------- 统计卡片 ---------- */
.stats-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; }
.stats-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.stat-card { padding: 18px 20px; position: relative; overflow: hidden; }
.stat-card::after {
  content: "";
  position: absolute; right: -18px; bottom: -18px;
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--primary-light);
  opacity: .55;
}
.stat-label { font-size: 13px; color: var(--text-2); }
.stat-value { font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--text-2); margin-left: 2px; }
.stat-sub { font-size: 12px; color: var(--text-3); margin-top: 5px; display: flex; gap: 12px; }
.stat-sub .up { color: var(--success); }
.stat-sub .down { color: var(--danger); }

/* ---------- 布局栅格 ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 16px; }
.grid-2-1 { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 16px; }
.grid-1-2 { display: grid; grid-template-columns: 1fr 2fr; gap: 16px; }
.grid-2-1 > *, .grid-1-2 > * { min-width: 0; }

/* ---------- 筛选区 ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 12px 16px;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}
.filter-item { display: flex; align-items: center; gap: 8px; }
.filter-item > label { font-size: 13px; color: var(--text-2); white-space: nowrap; }

/* ---------- 表单控件 ---------- */
.input, .select, .textarea {
  height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  outline: none;
  transition: border .15s, box-shadow .15s;
  min-width: 0;
}
.input:focus, .select:focus, .textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-light);
}
.input::placeholder, .textarea::placeholder { color: #B7BDC5; }
.textarea { height: auto; padding: 8px 10px; resize: vertical; line-height: 1.6; }
.select { padding-right: 26px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%); background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }
/* ---------- 多选下拉（下拉多选） ---------- */
.msel { position: relative; display: inline-block; vertical-align: middle; }
.msel-btn {
  height: 32px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 0 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  background: #fff;
  cursor: pointer;
  text-align: left;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  min-width: 120px;
  outline: none;
  transition: border .15s, box-shadow .15s;
}
.msel-btn:hover { border-color: var(--primary); }
.msel.open .msel-btn { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.msel-arrow { font-size: 11px; color: var(--text-3); flex-shrink: 0; }
.msel-panel {
  display: none;
  position: absolute;
  top: 36px;
  left: 0;
  min-width: 180px;
  max-height: 240px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(20,40,80,.12);
  padding: 6px;
  z-index: 50;
}
.msel.open .msel-panel { display: block; }
.msel-panel label {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
}
.msel-panel label:hover { background: var(--bg-hover); color: var(--text); }
.msel-panel .msel-all { border-bottom: 1px solid var(--border); margin-bottom: 4px; padding-bottom: 6px; color: var(--text); }

/* ---------- 联想搜索下拉（可输入筛选 / 可自定义） ---------- */
.acomb { position: relative; }
.acomb.open .acomb-input { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-light); }
.acomb-panel {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  max-height: 220px;
  overflow: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: 0 8px 24px rgba(20,40,80,.12);
  padding: 6px;
  z-index: 60;
}
.acomb.open .acomb-panel { display: block; }
.acomb-opt {
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text-2);
  cursor: pointer;
  white-space: nowrap;
}
.acomb-opt:hover, .acomb-opt.active { background: var(--bg-hover); color: var(--text); }
.acomb-opt .hit { color: var(--primary); font-weight: 600; }
.acomb-empty { padding: 8px 10px; font-size: 12px; color: var(--text-3); }

.input.w-lg { width: 220px; }
.input.w-md { width: 160px; }
.input.w-sm { width: 110px; }

.form-group { margin-bottom: 16px; }
.field-tip { margin-top: 6px; font-size: 12px; color: var(--text-3); }

.form-label { display: block; font-size: 13px; color: var(--text); margin-bottom: 6px; }
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-tip { font-size: 12px; color: var(--text-3); margin-top: 4px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-section-title {
  font-size: 14px; font-weight: 600;
  margin: 22px 0 14px;
  padding-left: 9px;
  border-left: 3px solid var(--primary);
}
.form-section-title:first-child { margin-top: 0; }

/* ---------- 按钮 ---------- */
.btn {
  height: 32px;
  padding: 0 14px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-primary:active { background: var(--primary-active); }
.btn-ghost { background: #fff; border-color: var(--border-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--primary); color: var(--primary); }
.btn-soft { background: var(--primary-light); color: var(--primary); }
.btn-soft:hover { background: #DBEEDF; }
.btn-danger { background: #fff; border-color: #F2C9C9; color: var(--danger); }
.btn-danger:hover { background: var(--danger-bg); }
.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ---------- 表格 ---------- */
.table-wrap { overflow-x: auto; }
.table-plans { width: 100%; min-width: 1160px; table-layout: fixed; }
.table-plans th:nth-child(1) { width: 104px; }
.table-plans th:nth-child(2) { width: 248px; }
.table-plans th:nth-child(4) { width: 82px; }
.table-plans th:nth-child(5) { width: 132px; }
.table-plans th:nth-child(6) { width: 58px; }
.table-plans th:nth-child(7) { width: 106px; }
.table-plans th:nth-child(8) { width: 92px; }
.table-plans th:nth-child(9) { width: 92px; }
.table-plans td:nth-child(2) .link { display: inline-block; line-height: 1.55; }
.table-plans td:nth-child(5) { line-height: 1.6; }
.table-manuals { width: 100%; min-width: 1040px; }
.table-manuals th:nth-child(2) { width: 84px; }
.table-manuals th:nth-child(4) { width: 108px; }
.table-manuals th:nth-child(5) { width: 54px; }
.table-manuals th:nth-child(6) { width: 110px; }
.table-manuals th:nth-child(7) { width: 58px; }
.table-manuals th:nth-child(8) { width: 100px; }
.table .cell-sub { display: block; margin-top: 3px; color: var(--text-3); font-size: 11px; line-height: 1.45; font-weight: 400; }
.table-plans td:nth-child(6), .table-plans td:nth-child(7), .table-plans td:nth-child(8) { white-space: nowrap; }

/* ---------- 课程日程编辑器 ---------- */
.schedule-list { display: flex; flex-direction: column; gap: 8px; }
.schedule-item { border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; background: #fff; }
.schedule-item:hover { border-color: var(--border-strong); }
.schedule-item-head { display: flex; align-items: center; gap: 8px; margin-bottom: 9px; }
.schedule-item-head .input[data-field="date"] { width: 92px; }
.schedule-item-head .select[data-field="period"] { width: 82px; }
.schedule-item-head .input[data-field="time"] { width: 118px; }
.schedule-item-head .select[data-field="type"] { width: 116px; }
.schedule-item-head .schedule-remove { margin-left: auto; white-space: nowrap; font-size: 12px; }
.schedule-body { display: grid; grid-template-columns: minmax(0, 1fr) 138px 154px; gap: 8px; }
.schedule-field { min-width: 0; }
.schedule-field label { display: block; margin-bottom: 4px; font-size: 11px; color: var(--text-3); }
.schedule-field .input, .schedule-field .select { width: 100%; }
.schedule-empty { padding: 22px; text-align: center; color: var(--text-3); border: 1px dashed var(--border-strong); border-radius: 8px; font-size: 13px; }
@media (max-width: 900px) {
  .schedule-item-head { flex-wrap: wrap; }
  .schedule-body { grid-template-columns: 1fr; }
}
.course-table { min-width: 900px; }
.course-table th:nth-child(1) { width: 78px; }
.course-table th:nth-child(2) { width: 74px; }
.course-table th:nth-child(3) { width: 104px; }
.course-table th:nth-child(4) { width: 94px; }
.course-table th:nth-child(5) { width: 230px; }
.course-table th:nth-child(6) { width: 118px; }
.course-table th:nth-child(7) { width: 118px; }
.course-table th:last-child,
.course-table td:last-child { width: 58px; white-space: nowrap; }
/* 卡片内直铺表格（未包 table-wrap 时）自动横向滚动 */
.card-body.flush > table.table,
.tab-panel > table.table,
.card-body > table.table { display: block; overflow-x: auto; }
table.table { width: 100%; border-collapse: collapse; font-size: 13px; }
.table th {
  background: #FAFBFC;
  color: var(--text-2);
  font-weight: 500;
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
  font-size: 12.5px;
}
.table td { padding: 11px 14px; border-bottom: 1px solid #F0F1F3; vertical-align: middle; }
.table tbody tr:hover { background: #FBFDFB; }
.table tbody tr.row-focus { background: #F1F8F3; box-shadow: inset 3px 0 0 var(--primary); }
.table .num { font-variant-numeric: tabular-nums; }
.link { color: var(--primary); cursor: pointer; }
.link:hover { text-decoration: underline; }
.link-danger { color: var(--danger); cursor: pointer; }
.link-danger:hover { text-decoration: underline; color: var(--danger); }
.ops { white-space: nowrap; }
.ops a { margin-right: 14px; font-size: 13px; }
.ops a:last-child { margin-right: 0; }
.ops a { color: var(--primary); }
.ops a.link-danger { color: var(--danger); }
/* 表格操作列固定在右侧：宽表横向滚动时操作列常驻可见 */
.table th.col-pin,
.table td.col-pin {
  position: sticky;
  right: 0;
  z-index: 1;
  background: #fff;
  box-shadow: -6px 0 8px -6px rgba(15, 30, 22, .12);
}
.table th.col-pin { background: #FAFBFC; z-index: 2; }
.table tbody tr:hover td.col-pin { background: #FBFDFB; }
.table th.col-pin-2,
.table td.col-pin-2 {
  position: sticky;
  right: 180px;
  z-index: 1;
  background: #fff;
  box-shadow: -6px 0 8px -6px rgba(15, 30, 22, .12);
}
.table th.col-pin-2 { background: #FAFBFC; z-index: 2; }
.table tbody tr:hover td.col-pin-2 { background: #FBFDFB; }
.checkbox { width: 15px; height: 15px; accent-color: var(--primary); vertical-align: middle; }

/* ---------- 标签 ---------- */
.tag {
  display: inline-flex; align-items: center;
  padding: 2px 9px;
  border-radius: 4px;
  font-size: 12px;
  line-height: 18px;
  white-space: nowrap;
}
.tag-green { background: var(--success-bg); color: var(--primary); }
.tag-gray { background: #F1F2F3; color: var(--text-2); }
.tag-orange { background: var(--warning-bg); color: #B97A16; }
.tag-red { background: var(--danger-bg); color: #C0392B; }
.tag-blue { background: var(--info-bg); color: #2D6FB3; }
.tag-gold { background: #F7EFDC; color: #9A7B2F; }

/* ---------- 分页 ---------- */
.pagination { display: flex; justify-content: flex-end; align-items: center; gap: 6px; padding: 14px 20px; }
.page-total { font-size: 12px; color: var(--text-3); margin-right: 8px; }
.page-btn {
  min-width: 28px; height: 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  font-size: 12px;
  background: #fff;
  color: var(--text-2);
  cursor: pointer;
  padding: 0 6px;
}
.page-btn:hover { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary); color: #fff; border-color: var(--primary); }
.page-btn.disabled { opacity: .45; cursor: not-allowed; }

/* ---------- Tabs ---------- */
.tabs { display: flex; gap: 4px; padding: 0 16px; border-bottom: 1px solid var(--border); background: #fff; border-radius: var(--radius) var(--radius) 0 0; overflow-x: auto; }
.tab {
  padding: 14px 18px;
  font-size: 14px;
  color: var(--text-2);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  white-space: nowrap;
  transition: color .15s;
}
.tab:hover { color: var(--primary); }
.tab.active { color: var(--primary); border-color: var(--primary); font-weight: 600; }
.tab-panel { display: none; padding: 20px; }
.tab-panel.active { display: block; }
.tab-panel > * + * { margin-top: 16px; }
.tab-panel .grid-2 > div,
.tab-panel .grid-2-1 > div,
.tab-panel .grid-1-2 > div { display: flex; flex-direction: column; gap: 16px; }

/* ---------- 抽屉 ---------- */
.drawer-mask {
  position: fixed; inset: 0;
  background: rgba(8, 20, 14, .42);
  opacity: 0;
  visibility: hidden;
  transition: opacity .22s;
  z-index: 200;
}
.drawer-mask.show { opacity: 1; visibility: visible; }
.drawer {
  position: fixed;
  top: 0; right: 0;
  transform: translateX(100%);
  width: 640px;
  max-width: 94vw;
  height: 100%;
  background: #fff;
  z-index: 201;
  display: flex;
  flex-direction: column;
  box-shadow: -8px 0 32px rgba(15, 23, 42, .16);
  transition: transform .25s ease;
}
.drawer.open { transform: translateX(0); }
.drawer-header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.drawer-title { font-size: 16px; font-weight: 600; }
.drawer-title .sub { font-size: 12px; color: var(--text-3); font-weight: 400; margin-left: 8px; }
.drawer-close { border: none; background: none; font-size: 18px; color: var(--text-3); cursor: pointer; padding: 4px; }
.drawer-close:hover { color: var(--danger); }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px; }
.drawer-footer {
  display: flex; justify-content: flex-end; gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--border);
  background: #FBFCFC;
  flex-shrink: 0;
}

/* 加宽抽屉（意向预案等复杂表单） */
.drawer-xl { width: 920px; }
.drawer-xl .drawer-body { padding: 24px 28px 28px; }
.drawer-xl .drawer-footer {
  justify-content: space-between;
  padding: 14px 28px;
}
.footer-note { font-size: 12px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.drawer-xl .form-group { margin-bottom: 18px; }

/* ---------- 居中弹窗 ---------- */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(8, 20, 14, .42);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 220;
}
.modal-mask.show { display: flex; }
.modal {
  width: 460px;
  max-width: 92vw;
  background: #fff;
  border-radius: 10px;
  box-shadow: var(--shadow-lg);
  animation: modalIn .18s ease;
}
@keyframes modalIn { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--border); }
.modal-title { font-size: 16px; font-weight: 600; }
.modal-body { padding: 20px; }
.modal-footer { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--border); }

/* ---------- 批量导入弹窗 ---------- */
.import-hint { font-size: 13px; color: var(--text-2); line-height: 1.7; margin-bottom: 14px; }
.import-steps { display: flex; gap: 10px; margin-bottom: 14px; }
.import-step { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--text-2); }
.import-step-no { width: 18px; height: 18px; border-radius: 50%; background: var(--primary-light); color: var(--primary); font-size: 12px; display: inline-flex; align-items: center; justify-content: center; font-weight: 600; flex-shrink: 0; }
.import-actions { margin-bottom: 12px; }
.import-actions .btn { width: 100%; }
#import-upload { margin-bottom: 10px; }

/* ---------- 步骤条 ---------- */
.steps { display: flex; margin: 4px 0 8px; }
.step { flex: 1; text-align: center; position: relative; }
.step::before {
  content: "";
  position: absolute; top: 14px; left: -50%; right: 50%;
  height: 2px;
  background: var(--border-strong);
}
.step:first-child::before { display: none; }
.step.done::before { background: var(--primary); }
.step-circle {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: #F1F2F3;
  color: var(--text-3);
  display: inline-grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
  position: relative;
  z-index: 1;
}
.step.done .step-circle { background: var(--primary); color: #fff; }
.step.active .step-circle { background: var(--primary-light); color: var(--primary); border: 1px solid var(--primary); }
.step-label { font-size: 12.5px; color: var(--text-3); margin-top: 6px; }
.step.active .step-label { color: var(--primary); font-weight: 500; }
.step.done .step-label { color: var(--text-2); }

/* ---------- 审批流程条 ---------- */
.flow-steps { display: flex; align-items: flex-start; }
.flow-step { flex: 1; text-align: center; position: relative; padding-top: 22px; }
.flow-step::before {
  content: "";
  position: absolute; top: 9px; left: -50%; right: 50%;
  height: 2px;
  background: var(--border-strong);
}
.flow-step:first-child::before { display: none; }
.flow-step .fc {
  position: absolute; top: 0; left: 50%; transform: translateX(-50%);
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #F1F2F3;
  border: 2px solid var(--border-strong);
}
.flow-step.done .fc { background: var(--primary); border-color: var(--primary); }
.flow-step.done::before { background: var(--primary); }
.flow-step .ft { font-size: 12.5px; color: var(--text-2); font-weight: 500; }
.flow-step .fs { font-size: 11.5px; color: var(--text-3); margin-top: 2px; }

/* ---------- 日历 ---------- */
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-head div { text-align: center; font-size: 12px; color: var(--text-3); padding: 8px 0 4px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.cal-cell {
  min-height: 88px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 6px;
  background: #fff;
  cursor: pointer;
  transition: border .15s;
}
.cal-cell:hover { border-color: var(--primary); }
.cal-cell.other { background: #FAFBFC; }
.cal-cell.other .date { color: #C3C8CF; }
.cal-cell .date { font-size: 12px; color: var(--text-2); display: flex; justify-content: space-between; align-items: center; }
.cal-cell .date .has { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.cal-course {
  font-size: 11px;
  line-height: 15px;
  background: var(--primary-light);
  color: var(--primary-dark);
  border-radius: 4px;
  padding: 2px 6px;
  margin-top: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cal-course.conflict { background: var(--danger-bg); color: #C0392B; }
.cal-course.offsite { background: #F7EFDC; color: #9A7B2F; }

/* ---------- 时间线 ---------- */
.timeline { padding: 4px 0; }
.tl-item { position: relative; padding: 0 0 20px 22px; }
.tl-item::before {
  content: "";
  position: absolute; left: 6px; top: 6px; bottom: 0;
  width: 2px;
  background: #EAEDF0;
}
.tl-item:last-child::before { display: none; }
.tl-item::after {
  content: "";
  position: absolute; left: 1px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #fff;
  border: 3px solid var(--primary);
}
.tl-title { font-size: 13.5px; font-weight: 500; }
.tl-meta { font-size: 12px; color: var(--text-3); margin-top: 2px; }
.tl-content { font-size: 13px; color: var(--text-2); margin-top: 4px; }

/* ---------- 图表（原型占位） ---------- */
.chart-bars { display: flex; align-items: flex-end; gap: 14px; height: 170px; padding: 12px 4px 0; border-bottom: 1px solid var(--border); }
.chart-bars .cbar { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; height: 100%; justify-content: flex-end; }
.chart-bars .bar { width: 100%; max-width: 34px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, #17A061, #0F7A4D); position: relative; }
.chart-bars .bar.alt { background: linear-gradient(180deg, #D8C38E, #C9A063); }
.chart-bars .bar:hover { opacity: .85; }
.chart-bars .clabel { font-size: 11px; color: var(--text-3); padding-top: 4px; }
.chart-bars .cval {
  position: absolute; top: -20px; left: 50%; transform: translateX(-50%);
  font-size: 10.5px; color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.donut {
  width: 150px; height: 150px;
  border-radius: 50%;
  position: relative;
  margin: 0 auto;
}
.donut-center {
  position: absolute; inset: 26px;
  background: #fff;
  border-radius: 50%;
  display: grid;
  place-items: center;
  text-align: center;
  font-size: 12px;
  color: var(--text-2);
}
.donut-center b { display: block; font-size: 20px; color: var(--text); }
.legend { display: flex; flex-direction: column; gap: 10px; margin-top: 18px; }
.legend-item { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-2); }
.legend-item .sw { width: 10px; height: 10px; border-radius: 3px; }
.legend-item .val { margin-left: auto; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- 待办 ---------- */
.todo-item { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 12px; padding: 13px 20px; border-bottom: 1px solid #F0F1F3; }
.todo-item:last-child { border-bottom: none; }
.todo-item:hover { background: #FBFDFB; }
.todo-type { order: 0; width: auto; min-width: 72px; flex-shrink: 0; white-space: nowrap; text-align: center; }
.todo-name { order: 3; flex: 1 0 100%; font-size: 13.5px; min-width: 0; }
.todo-name .sub { font-size: 12px; color: var(--text-3); }
.todo-time { order: 1; margin-left: auto; font-size: 12px; color: var(--text-3); white-space: nowrap; }
.todo-item > .btn { order: 2; }

/* ---------- 快捷入口 ---------- */
.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.quick-item {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 14px;
  text-align: center;
  cursor: pointer;
  transition: all .15s;
  background: #fff;
}
.quick-item:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-1px); }
.quick-item .qi { font-size: 22px; }
.quick-item .qt { font-size: 13px; font-weight: 500; margin-top: 8px; }
.quick-item .qd { font-size: 11.5px; color: var(--text-3); margin-top: 3px; }

/* ---------- 上传 ---------- */
.upload-box {
  border: 1.5px dashed #C9CED4;
  border-radius: var(--radius);
  padding: 26px;
  text-align: center;
  color: var(--text-3);
  cursor: pointer;
  font-size: 13px;
  transition: border .15s, background .15s;
}
.upload-box:hover { border-color: var(--primary); background: #FAFDFB; color: var(--primary); }
.thumb-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; margin-top: 12px; }
.thumb {
  aspect-ratio: 4/3;
  border-radius: var(--radius-sm);
  background: linear-gradient(135deg, #E8F3EC, #D5E8DC);
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 20px;
  position: relative;
  border: 1px solid #DCEAE1;
}
.thumb .tname { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(8,20,14,.55); color: #fff; font-size: 10.5px; padding: 2px 4px; border-radius: 0 0 var(--radius-sm) var(--radius-sm); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- 描述列表 ---------- */
.desc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 24px; }
.desc-item { display: flex; }
.desc-item .k { width: 100px; color: var(--text-3); font-size: 13px; flex-shrink: 0; }
.desc-item .v { color: var(--text); font-size: 13px; }

/* ---------- 消息 ---------- */
.toast {
  position: fixed; top: 72px; left: 50%;
  transform: translateX(-50%) translateY(-6px);
  background: #2B3330;
  color: #fff;
  padding: 9px 18px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  opacity: 0;
  pointer-events: none;
  transition: all .2s;
  z-index: 300;
  box-shadow: var(--shadow-lg);
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- 空态 ---------- */
.empty { text-align: center; padding: 56px 0; color: var(--text-3); font-size: 13px; }
.empty .eicon { font-size: 34px; margin-bottom: 10px; opacity: .6; }

/* ---------- 登录页 ---------- */
.login-page { display: flex; min-height: 100vh; }
.login-brand {
  flex: 1.15;
  background: linear-gradient(155deg, #0C442D 0%, #0B3B2A 55%, #082D20 100%);
  color: #fff;
  padding: 52px 60px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.login-brand::after {
  content: "";
  position: absolute;
  right: -120px; bottom: -120px;
  width: 380px; height: 380px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.08);
}
.login-brand::before {
  content: "";
  position: absolute;
  right: -40px; bottom: -40px;
  width: 220px; height: 220px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.06);
}
.lb-top { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.login-logo {
  width: 64px; height: 64px;
  object-fit: contain;
  filter: drop-shadow(0 3px 8px rgba(0,0,0,.3));
  flex-shrink: 0;
}
.lb-title { font-size: 24px; font-weight: 700; letter-spacing: .5px; }
.lb-sub { font-size: 13px; color: #9FBCAE; margin-top: 6px; }
.login-campus {
  width: auto;
  margin: 60px -60px 0;
  aspect-ratio: 3 / 2;
  object-fit: cover;
}
.lb-features { display: flex; flex-direction: column; gap: 18px; max-width: 420px; }
.lb-feature { display: flex; gap: 12px; align-items: flex-start; }
.lb-feature .fi {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  display: grid;
  place-items: center;
  font-size: 14px;
  flex-shrink: 0;
}
.lb-feature .ft { font-size: 15px; font-weight: 600; }
.lb-feature .fd { font-size: 12.5px; color: #9FBCAE; margin-top: 2px; }
.lb-bottom { font-size: 12px; color: #7FA08F; }
.login-form { flex: 1; display: flex; align-items: center; justify-content: center; background: #fff; padding: 40px; }
.login-card { width: 360px; }
.login-card .lc-title { font-size: 22px; font-weight: 700; }
.login-card .lc-sub { font-size: 13px; color: var(--text-2); margin: 6px 0 28px; }
.login-row { margin-bottom: 16px; }
.login-row .input { width: 100%; height: 40px; }
.login-extra { display: flex; justify-content: space-between; align-items: center; margin: 4px 0 20px; font-size: 13px; color: var(--text-2); }
.login-extra a { color: var(--primary); }
.btn-login { width: 100%; height: 40px; font-size: 14px; font-weight: 500; }
.login-hint { margin-top: 16px; font-size: 12px; color: var(--text-3); text-align: center; }

/* ---------- 响应式 ---------- */
@media (max-width: 1280px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2-1, .grid-1-2 { grid-template-columns: 1fr; }
}

/* ============================================================
   V2 整改版 · 项目管理
   ============================================================ */
.stage-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  margin-bottom: 16px;
  background: linear-gradient(90deg, #F2F8F4, #FAFCFB);
  border: 1px solid #DDEBE2;
  border-radius: var(--radius);
  color: var(--text-2);
  font-size: 13px;
}
.stage-strip .stage {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}
.stage-strip .stage-no {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: #fff;
  border: 1px solid #C9DED1;
  color: var(--primary);
  font-size: 11px;
  font-weight: 700;
}
.stage-strip .stage.active {
  color: var(--primary);
  font-weight: 600;
}
.stage-strip .stage.active .stage-no {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.stage-strip .stage-arrow {
  color: #A9BDB0;
}
.stage-strip .stage-note {
  margin-left: auto;
  color: var(--text-3);
  font-size: 12px;
  white-space: nowrap;
}

.number-rule {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #DCEAE1;
  border-radius: var(--radius-sm);
  background: #F8FCF9;
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.6;
}
.number-rule strong { color: var(--text); }
.number-rule .ico {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
  background: var(--primary-light);
  color: var(--primary);
  flex-shrink: 0;
  font-weight: 700;
  margin-top: 1px;
}

.auto-number {
  display: flex;
  align-items: center;
  gap: 8px;
}
.auto-number .input { flex: 1; }
.number-preview {
  padding: 2px 7px;
  border-radius: 4px;
  background: var(--primary-light);
  color: var(--primary);
  font-size: 11.5px;
  white-space: nowrap;
}

.workflow-log-note {
  padding: 10px 12px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  background: var(--primary-light);
  color: var(--primary-dark);
  font-size: 12.5px;
  line-height: 1.65;
}

.material-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.material-mini {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 4px;
  background: #F4F6F5;
  color: var(--text-3);
  font-size: 11.5px;
  white-space: nowrap;
}
.material-mini.ok { background: var(--success-bg); color: var(--primary); }
.material-mini.partial { background: var(--warning-bg); color: #B97A16; }
.material-mini.missing { background: #F5F6F7; color: var(--text-3); }

.completion-cell {
  min-width: 210px;
}
.completion-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
}
.completion-top .progress { width: 92px; }
.completion-top .num { font-size: 12px; color: var(--text-2); }

.material-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}
.material-card {
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: #fff;
}
.material-card.ok { border-color: #CFE5D8; background: #FBFEFC; }
.material-card.partial { border-color: #F0D9B2; background: #FFFCF6; }
.material-card .mc-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.material-card .mc-title { font-size: 13px; font-weight: 600; }
.material-card .mc-meta { font-size: 11.5px; color: var(--text-3); margin-top: 6px; line-height: 1.6; }
.material-card .mc-action { margin-top: 10px; }

.notice-card {
  padding: 12px 14px;
  border-radius: var(--radius-sm);
  background: var(--warning-bg);
  color: #8C621D;
  font-size: 12.5px;
  line-height: 1.65;
  border: 1px solid #F3E1BF;
}
.notice-card.info {
  background: var(--info-bg);
  color: #2D5F8A;
  border-color: #D6E6F4;
}

.inline-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.template-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.template-choice {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  background: #fff;
  cursor: pointer;
  transition: .15s;
}
.template-choice:hover { border-color: var(--primary); box-shadow: var(--shadow); }
.template-choice.selected { border-color: var(--primary); background: #F8FCF9; box-shadow: 0 0 0 3px var(--primary-light); }
.template-choice .tc-top { display: flex; justify-content: space-between; gap: 8px; align-items: flex-start; }
.template-choice .tc-title { font-size: 14px; font-weight: 600; }
.template-choice .tc-desc { margin-top: 6px; font-size: 12px; color: var(--text-2); line-height: 1.6; }
.template-choice .tc-file { margin-top: 12px; font-size: 11.5px; color: var(--text-3); }

.course-table td { vertical-align: top; }
.course-table .cell-sub { display: block; color: var(--text-3); font-size: 11px; margin-top: 2px; }

.switch-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid #F0F1F3;
}
.switch-line:last-child { border-bottom: 0; }
.switch-line .sl-title { font-size: 13px; font-weight: 500; }
.switch-line .sl-desc { font-size: 11.5px; color: var(--text-3); margin-top: 2px; line-height: 1.6; }
.switch {
  position: relative;
  width: 38px;
  height: 22px;
  border-radius: 11px;
  background: #D9DDE2;
  border: 0;
  cursor: pointer;
  flex-shrink: 0;
  transition: background .15s;
}
.switch::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
  transition: transform .15s;
}
.switch.on { background: var(--primary); }
.switch.on::after { transform: translateX(16px); }

.form-section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 4px 0 12px;
  font-size: 14px;
  font-weight: 600;
}
.form-section-title .hint { font-size: 11.5px; font-weight: 400; color: var(--text-3); }
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px 20px;
}
.form-group { min-width: 0; }
.form-label {
  display: block;
  margin-bottom: 6px;
  font-size: 12.5px;
  color: var(--text-2);
}
.form-label .required { color: var(--danger); margin-left: 2px; }
.form-tip { margin-top: 5px; font-size: 11.5px; color: var(--text-3); line-height: 1.6; }

.page-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 5px;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: .4px;
}
.page-kicker::before {
  content: "";
  width: 14px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}

.manual-preview-grid {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 20px;
  align-items: start;
}
.paper-cover {
  min-height: 380px;
  border-radius: 4px;
  background: linear-gradient(160deg, #174D36, #0A3624 72%);
  color: #fff;
  padding: 28px 24px;
  position: relative;
  overflow: hidden;
  box-shadow: 0 12px 28px rgba(8, 36, 24, .18);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.paper-cover::after {
  content: "";
  position: absolute;
  right: -62px;
  bottom: -52px;
  width: 220px;
  height: 220px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 50%;
}
.paper-cover::before {
  content: "";
  position: absolute;
  left: -30px;
  top: 140px;
  width: 150px;
  height: 150px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
}
.paper-cover .pc-school { font-size: 13px; letter-spacing: 2px; color: #D6E8DE; }
.paper-cover .pc-title { font-size: 23px; font-weight: 700; line-height: 1.55; text-align: center; margin: 30px 0; position: relative; z-index: 1; }
.paper-cover .pc-sub { font-size: 18px; letter-spacing: 8px; text-align: center; color: #DDEBDD; }
.paper-cover .pc-bottom { text-align: center; font-size: 12px; color: #A9C7B8; }
.toc-list { display: flex; flex-direction: column; gap: 8px; }
.toc-row { display: flex; align-items: center; gap: 10px; font-size: 13px; color: var(--text-2); }
.toc-row .no { width: 22px; color: var(--text-3); font-size: 11px; }
.toc-row .line { flex: 1; border-bottom: 1px dotted #D9DDE2; }
.toc-row .pg { color: var(--text-3); font-variant-numeric: tabular-nums; }
.toc-row.static { color: var(--text-2); }
.toc-row.dynamic { color: var(--primary); font-weight: 500; }

.student-table { font-size: 12.5px; }
.student-table th, .student-table td { padding: 8px 10px; }
.student-table .num { font-variant-numeric: tabular-nums; }

.material-dropzone {
  border: 1.5px dashed #C9CED4;
  border-radius: var(--radius);
  padding: 18px 12px;
  text-align: center;
  color: var(--text-3);
  font-size: 12px;
  cursor: pointer;
  transition: .15s;
}
.material-dropzone:hover { border-color: var(--primary); background: #FAFDFB; color: var(--primary); }

.finance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}
.finance-cell {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: #FBFCFC;
}
.finance-cell .fc-label { font-size: 12px; color: var(--text-3); }
.finance-cell .fc-value { margin-top: 5px; font-size: 19px; font-weight: 700; font-variant-numeric: tabular-nums; }

@media (max-width: 1100px) {
  .manual-preview-grid { grid-template-columns: 1fr; }
  .finance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1100px) {
  .material-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .template-choice-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .stage-strip { flex-wrap: wrap; }
  .stage-strip .stage-note { margin-left: 0; width: 100%; }
}

/* ---------- 进度条 ---------- */
.progress { display: inline-flex; align-items: center; gap: 8px; width: 130px; }
.progress .track { flex: 1; height: 6px; border-radius: 3px; background: #EDF0F2; overflow: hidden; }
.progress .fill { height: 100%; border-radius: 3px; background: linear-gradient(90deg, #17A061, #0F7A4D); }
.progress .fill.warn { background: linear-gradient(90deg, #E8C87E, #C9A063); }
.progress .fill.low { background: linear-gradient(90deg, #E89B8A, #D96A4E); }
.progress .pct { font-size: 12px; color: var(--text-2); font-variant-numeric: tabular-nums; width: 36px; }

/* ---------- 维度得分条 ---------- */
.dim-row { display: flex; align-items: center; gap: 10px; font-size: 13px; margin: 9px 0; }
.dim-row .label { width: 72px; color: var(--text-2); flex-shrink: 0; }
.dim-row .track { flex: 1; height: 8px; border-radius: 4px; background: #EDF0F2; overflow: hidden; }
.dim-row .fill { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #17A061, #0F7A4D); }
.dim-row .val { width: 44px; text-align: right; font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }

/* ---------- 部门树 ---------- */
.dept-tree { border-right: 1px solid var(--border); padding-right: 0; }
.tree-item { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border-radius: var(--radius-sm); cursor: pointer; font-size: 13.5px; color: var(--text-2); }
.tree-item:hover { background: #F2F7F4; }
.tree-item.active { background: var(--primary-light); color: var(--primary); font-weight: 600; }
.tree-item .cnt { margin-left: auto; font-size: 11.5px; color: var(--text-3); }
.tree-group-title { font-size: 11.5px; color: var(--text-3); padding: 10px 12px 4px; }

/* ---------- 流程节点 ---------- */
.flow-node { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border: 1px solid var(--border); border-radius: 10px; background: #fff; font-size: 13px; color: var(--text-2); }
.flow-node.active { border-color: var(--primary); color: var(--primary); background: var(--primary-light); font-weight: 600; }
.flow-node .no { width: 20px; height: 20px; border-radius: 50%; background: #EDF0F2; display: grid; place-items: center; font-size: 11px; color: var(--text-2); }
.flow-node.active .no { background: var(--primary); color: #fff; }
.flow-line { width: 40px; height: 2px; background: var(--border-strong); margin: 0 4px; }
.flow-line.passed { background: var(--primary); }
.flow-cond { font-size: 11.5px; color: var(--text-3); margin-top: 4px; }

/* ---------- 键值详情 ---------- */
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.kv-row { display: flex; align-items: baseline; gap: 10px; font-size: 13.5px; }
.kv-row .k { color: var(--text-3); flex-shrink: 0; }

/* 详情抽屉分区卡片 */
.detail-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  margin-bottom: 14px;
}
.detail-card .card-title { margin: 0 0 12px; }
.detail-card .kv-grid { row-gap: 10px; }
.kv-row .v { color: var(--text); word-break: break-all; }

/* ---------- 筛选区间分隔符 ---------- */
.filter-bar .sep { color: var(--text-3); }

/* ---------- 用户下拉菜单 ---------- */
.user-menu-wrap { position: relative; }
.user-menu {
  position: absolute; top: calc(100% + 10px); right: 0;
  min-width: 168px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  box-shadow: 0 8px 24px rgba(11, 59, 42, .12);
  padding: 6px;
  z-index: 100;
  display: none;
}
.user-menu.open { display: block; }
.user-menu-item {
  display: block;
  padding: 9px 12px;
  border-radius: 7px;
  font-size: 13px;
  color: var(--text);
  cursor: pointer;
}
.user-menu-item:hover { background: var(--bg); color: var(--primary); }
.user-menu-divider { height: 1px; background: var(--border); margin: 5px 4px; }
.user-menu-item.danger { color: var(--danger); }
.user-menu-item.danger:hover { background: var(--danger-bg); color: var(--danger); }

/* ---------- 文档工作室：模板卡片 / 文档预览 / AI 生成 ---------- */
.template-gallery {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.template-file-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.template-file-card:hover {
  transform: translateY(-3px);
  border-color: #B7D3C5;
  box-shadow: 0 14px 34px rgba(11, 59, 42, .12);
}
.template-file-preview {
  height: 250px;
  background: linear-gradient(145deg, #EDF2EE, #E2EAE5);
  padding: 20px 22px 0;
  overflow: hidden;
  position: relative;
}
.template-file-preview .mini-paper {
  width: 178px;
  height: 252px;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 10px 24px rgba(16, 53, 38, .18);
  border-radius: 2px;
  overflow: hidden;
  transform: translateY(16px);
}
.template-file-preview .mini-paper-cover {
  height: 100%;
  background: linear-gradient(155deg, #15553C, #0A3324 72%);
  color: #fff;
  padding: 18px 14px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  overflow: hidden;
}
.template-file-preview .mini-paper-cover::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 46%;
  background: url("campus.png") center bottom / cover no-repeat;
  opacity: .16;
}
.mini-cover-org { font-size: 7px; letter-spacing: 1px; color: #D8E9DF; position: relative; z-index: 1; }
.mini-cover-title { font-size: 12px; font-weight: 700; line-height: 1.55; text-align: center; margin: 26px 0 10px; position: relative; z-index: 1; }
.mini-cover-type { font-size: 8px; letter-spacing: 4px; text-align: center; color: #DDEBDD; position: relative; z-index: 1; }
.mini-cover-bottom { font-size: 6px; color: #B8D1C4; display: flex; justify-content: space-between; position: relative; z-index: 1; }
.template-file-body { padding: 18px 20px 20px; display: flex; flex-direction: column; flex: 1; }
.template-file-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.template-file-title { font-size: 15px; font-weight: 600; color: var(--text); line-height: 1.45; }
.template-file-desc { margin-top: 8px; font-size: 12.5px; color: var(--text-2); line-height: 1.7; min-height: 42px; }
.template-file-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.template-file-meta { margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--border); display: flex; gap: 16px; font-size: 11.5px; color: var(--text-3); }
.template-file-actions { margin-top: 16px; display: flex; gap: 8px; }
.template-file-actions .btn { flex: 1; justify-content: center; }

.pdf-preview-mask {
  position: fixed; inset: 0;
  z-index: 430;
  background: rgba(8, 20, 14, .62);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.pdf-preview-mask.show { display: flex; }
.pdf-preview-dialog {
  width: min(1180px, 96vw);
  height: min(92vh, 980px);
  background: #F3F5F4;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .38);
  animation: modalIn .2s ease;
}
.pdf-preview-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 22px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.pdf-preview-kicker { font-size: 10px; letter-spacing: 1.4px; color: var(--primary); font-weight: 700; }
.pdf-preview-title { margin-top: 4px; font-size: 18px; font-weight: 650; color: var(--text); }
.pdf-preview-meta { margin-top: 4px; font-size: 12px; color: var(--text-3); }
.pdf-preview-body { flex: 1; min-height: 0; background: #DDE3DF; padding: 14px; }
.pdf-preview-body iframe { width: 100%; height: 100%; border: 0; border-radius: 8px; background: #fff; }
.pdf-preview-foot { padding: 10px 22px 12px; background: #fff; border-top: 1px solid var(--border); font-size: 11.5px; color: var(--text-3); }

.docv-mask {
  position: fixed; inset: 0;
  z-index: 420;
  background: rgba(8, 20, 14, .56);
  backdrop-filter: blur(3px);
  display: flex; align-items: center; justify-content: center;
}
.docv {
  width: 96vw; height: 92vh;
  background: #EDF1F3;
  border-radius: 16px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .35);
  animation: modalIn .2s ease;
}
.docv-head {
  background: #fff;
  border-bottom: 1px solid #E1E7E3;
  padding: 14px 20px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  flex-shrink: 0;
}
.docv-title-wrap { min-width: 0; }
.docv-kicker { font-size: 10px; letter-spacing: 1.6px; color: #7C8B84; font-weight: 600; }
.docv-title { font-size: 16px; font-weight: 650; color: #14251D; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docv-sub { font-size: 11.5px; color: #7C8B84; margin-top: 3px; }
.docv-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.docv-tag { font-size: 11px; color: #1F6B4A; background: #E7F2EC; border: 1px solid #CBE3D7; padding: 4px 8px; border-radius: 999px; white-space: nowrap; }
.docv-close { width: 34px; height: 34px; border: 0; background: #F2F5F3; color: #4B5B53; border-radius: 8px; font-size: 22px; line-height: 1; cursor: pointer; }
.docv-close:hover { background: #E6ECE8; }
.docv-body { flex: 1; display: flex; min-height: 0; }
.docv-side {
  width: 176px; flex-shrink: 0;
  background: #F7F9F8;
  border-right: 1px solid #E1E7E3;
  overflow: auto;
  padding: 14px 12px 24px;
}
.docv-thumb {
  width: 100%; border: 0; background: transparent; padding: 0 0 14px; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; gap: 6px;
}
.docv-thumb-sheet {
  width: 116px; height: 164px;
  overflow: hidden; background: #fff;
  border: 1px solid #DCE4DF;
  box-shadow: 0 2px 7px rgba(0, 0, 0, .08);
  display: block; position: relative;
}
.docv-thumb-sheet .doc-page {
  transform: scale(.145);
  transform-origin: top left;
  box-shadow: none;
  border-radius: 0;
}
.docv-thumb.active .docv-thumb-sheet { outline: 2px solid #1F6B4A; outline-offset: 1px; }
.docv-thumb-label { font-size: 10.5px; color: #7C8B84; max-width: 120px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.docv-thumb.active .docv-thumb-label { color: #1F6B4A; font-weight: 600; }
.docv-main { flex: 1; overflow: auto; padding: 26px 34px 60px; scroll-behavior: smooth; }
.doc-pages { display: flex; flex-direction: column; align-items: center; gap: 26px; }

.doc-page {
  width: 794px;
  min-height: 1123px;
  background: #fff;
  position: relative;
  padding: 68px 76px 66px;
  box-shadow: 0 8px 26px rgba(15, 23, 42, .13);
  font-family: "Songti SC", "STSong", "SimSun", serif;
  color: #1F2937;
  line-height: 1.85;
  font-size: 14px;
  flex-shrink: 0;
}
.doc-page.is-cover { padding: 0; background: #0A3324; }
.doc-page-body { min-height: 987px; }
.doc-page.is-cover .doc-page-body { min-height: 1123px; }
.doc-page-no { position: absolute; left: 0; right: 0; bottom: 26px; text-align: center; font-size: 11px; color: #9CA3AF; letter-spacing: .5px; }

.dp-cover {
  min-height: 1123px;
  padding: 78px 80px 66px;
  background: linear-gradient(155deg, #16553C 0%, #0A3324 68%);
  color: #fff;
  display: flex; flex-direction: column;
  position: relative; overflow: hidden;
}
.dp-cover::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 48%;
  background: url("campus.png") center bottom / cover no-repeat;
  opacity: .17;
}
.dp-cover::before {
  content: "";
  position: absolute; right: -120px; top: 120px;
  width: 360px; height: 360px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
}
.dp-cover-top, .dp-cover-main, .dp-cover-bottom { position: relative; z-index: 1; }
.dp-cover-org { font-size: 18px; letter-spacing: 7px; color: #E4F0E8; }
.dp-cover-line { width: 72px; height: 2px; background: #C8A96B; margin-top: 18px; }
.dp-cover-main { margin-top: 230px; text-align: center; }
.dp-cover-pre { font-size: 20px; letter-spacing: 5px; color: #CFE2D6; margin-bottom: 26px; }
.dp-cover-title { font-size: 32px; line-height: 1.65; font-weight: 700; letter-spacing: 2px; }
.dp-cover-type { margin-top: 34px; font-size: 22px; letter-spacing: 10px; color: #E1EEE6; }
.dp-cover-bottom { margin-top: auto; display: flex; justify-content: space-between; align-items: flex-end; font-size: 14px; color: #CFE2D6; }

.dp-h1 { font-family: "Heiti SC", "SimHei", sans-serif; font-size: 23px; font-weight: 700; text-align: center; letter-spacing: 2px; margin: 0 0 30px; padding-bottom: 14px; border-bottom: 1px solid #D8E2DB; }
.dp-h2 { font-family: "Heiti SC", "SimHei", sans-serif; font-size: 16px; font-weight: 700; margin: 22px 0 10px; color: #174D36; }
.dp-p { text-indent: 2em; margin: 0 0 10px; font-size: 14px; text-align: justify; }
.dp-p.dp-lead, .dp-lead { text-indent: 0; font-size: 14px; margin: 0 0 12px; color: #374151; }
.dp-note { background: #F5F8F6; border-left: 3px solid #1F6B4A; padding: 11px 15px; font-size: 12.5px; color: #4B5563; line-height: 1.75; margin-top: 18px; }
.dp-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 12px; margin: 10px 0 14px; }
.dp-table th, .dp-table td { border: 1px solid #94A3B8; padding: 6px 7px; vertical-align: middle; line-height: 1.55; word-break: break-word; }
.dp-table th { background: #EEF4F0; font-weight: 600; text-align: center; color: #1F2937; }
.dp-table td { text-align: left; }
.dp-table.compact { font-size: 10.5px; }
.dp-table.compact th, .dp-table.compact td { padding: 5px 5px; }
.dp-info-table th { width: 84px; white-space: nowrap; }
.dp-info-table td { width: 200px; }
.dp-site { margin-bottom: 14px; }
.dp-site-title { font-size: 14px; font-weight: 700; color: #174D36; margin-bottom: 4px; }
.dp-site .dp-p { font-size: 13px; margin-bottom: 0; }
.dp-person { border-bottom: 1px dashed #D1D9D4; padding: 12px 0; }
.dp-person:last-child { border-bottom: 0; }
.dp-person-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 5px; }
.dp-person-name { font-size: 15px; font-weight: 700; color: #174D36; }
.dp-person-role { font-size: 12px; color: #6B7280; }
.dp-person .dp-p { font-size: 13px; margin: 0; }
.dp-fee-total { font-size: 18px; font-weight: 700; color: #14532D; margin: 8px 0 10px; text-indent: 0; }
.dp-account { margin-top: 20px; border: 1px solid #B7C4BC; background: #FAFCFA; padding: 14px 18px; font-size: 13px; line-height: 2; }
.dp-account-title { font-weight: 700; color: #174D36; margin-bottom: 4px; }
.dp-toc { margin-top: 10px; }
.dp-toc-row { display: flex; align-items: baseline; gap: 10px; padding: 10px 0; border-bottom: 1px dotted #C8D2CB; font-size: 15px; }
.dp-toc-row .no { width: 30px; color: #6B7280; font-size: 12px; }
.dp-toc-row .name { color: #1F2937; }
.dp-toc-row .line { flex: 1; border-bottom: 1px dotted #C8D2CB; transform: translateY(-3px); }
.dp-toc-row .pg { color: #6B7280; font-size: 12px; }
.dp-record-grid { margin-top: 10px; border-top: 1px solid #94A3B8; }
.dp-record-row { height: 54px; border-bottom: 1px solid #CBD5E1; }
.dp-record-tip { margin-top: 14px; font-size: 12px; color: #6B7280; text-align: center; }

.ai-flow-mask {
  position: fixed; inset: 0; z-index: 430;
  background: rgba(8, 20, 14, .58);
  backdrop-filter: blur(4px);
  display: flex; align-items: center; justify-content: center;
}
.ai-flow {
  width: 720px; max-width: calc(100vw - 40px);
  max-height: 92vh; overflow: auto;
  background: #fff; border-radius: 18px;
  box-shadow: 0 30px 90px rgba(0, 0, 0, .38);
  animation: modalIn .2s ease;
}
.ai-flow-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 20px 24px 16px; border-bottom: 1px solid #EDF1EE; }
.ai-flow-kicker { font-size: 10px; letter-spacing: 2px; color: #7C8B84; font-weight: 600; }
.ai-flow-title { font-size: 19px; font-weight: 650; color: #14251D; margin-top: 3px; }
.ai-flow-body { padding: 22px 24px 26px; }
.ai-label { font-size: 11.5px; color: #6B7A72; font-weight: 600; letter-spacing: .4px; margin-bottom: 9px; }
.ai-template-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 20px; }
.ai-template-grid:has(.ai-template-card:only-child) { grid-template-columns: 1fr; }
.ai-template-card { text-align: left; border: 1px solid #DDE5E0; background: #FAFCFB; border-radius: 11px; padding: 14px 15px; cursor: pointer; position: relative; transition: all .16s ease; }
.ai-template-card:hover { border-color: #B7D3C5; background: #F5FAF7; }
.ai-template-card.selected { border-color: #1F6B4A; background: #F1F9F4; box-shadow: 0 0 0 2px rgba(31, 107, 74, .10); }
.ai-template-card.selected::after { content: "✓"; position: absolute; right: 12px; top: 11px; width: 19px; height: 19px; border-radius: 50%; background: #1F6B4A; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; }
.ai-template-title { display: block; font-size: 13.5px; font-weight: 650; color: #1F2937; padding-right: 24px; }
.ai-template-desc { display: block; font-size: 11.5px; color: #7C8B84; line-height: 1.65; margin-top: 5px; }
.ai-template-tag { display: inline-block; margin-top: 7px; font-size: 10.5px; color: #1F6B4A; background: #E7F2EC; padding: 2px 7px; border-radius: 999px; }
.ai-summary { background: #F7F9F8; border: 1px solid #E3EAE6; border-radius: 11px; padding: 13px 15px; }
.ai-summary-row { display: flex; justify-content: space-between; gap: 18px; font-size: 12.5px; color: #6B7A72; padding: 3px 0; }
.ai-summary-row strong { color: #1F2937; font-weight: 600; text-align: right; }
.ai-setup-tip { font-size: 11.5px; color: #8A968F; line-height: 1.7; margin-top: 14px; }
.ai-setup-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }

.ai-progress { text-align: center; padding: 4px 0 0; }
.ai-orb { width: 94px; height: 94px; margin: 6px auto 18px; position: relative; display: flex; align-items: center; justify-content: center; }
.ai-orb::before, .ai-orb::after { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 1px solid rgba(31, 107, 74, .24); }
.ai-orb::before { animation: aiOrbit 2.2s linear infinite; border-top-color: #1F6B4A; border-right-color: #1F6B4A; }
.ai-orb::after { inset: 10px; animation: aiOrbit 1.6s linear infinite reverse; border-bottom-color: #C8A96B; border-left-color: #C8A96B; }
.ai-orb-core { width: 58px; height: 58px; border-radius: 50%; background: linear-gradient(150deg, #1F6B4A, #0F3E2B); color: #fff; display: flex; align-items: center; justify-content: center; font-size: 16px; font-weight: 700; letter-spacing: 1px; box-shadow: 0 8px 22px rgba(31, 107, 74, .28); animation: aiPulse 1.8s ease-in-out infinite; }
@keyframes aiOrbit { to { transform: rotate(360deg); } }
@keyframes aiPulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.06); } }
.ai-progress-head { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; color: #374151; margin-bottom: 9px; }
.ai-progress-head strong { font-weight: 600; }
.ai-progress-head span { font-variant-numeric: tabular-nums; color: #1F6B4A; font-weight: 650; }
.ai-bar { height: 7px; background: #E9EFEB; border-radius: 999px; overflow: hidden; }
.ai-bar span { display: block; width: 0; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #1F6B4A, #48A278); transition: width .18s linear; }
.ai-stages { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 16px; margin: 18px 0 16px; text-align: left; }
.ai-stage { display: flex; align-items: center; gap: 8px; font-size: 12px; color: #9AA6A0; padding: 4px 0; transition: color .2s ease; }
.ai-stage-dot { width: 8px; height: 8px; border-radius: 50%; background: #D8E1DC; flex-shrink: 0; transition: all .2s ease; }
.ai-stage.active { color: #1F2937; font-weight: 600; }
.ai-stage.active .ai-stage-dot { background: #C8A96B; box-shadow: 0 0 0 4px rgba(200, 169, 107, .16); animation: aiPulse 1.2s infinite; }
.ai-stage.done { color: #3E7B5D; }
.ai-stage.done .ai-stage-dot { background: #1F6B4A; }
.ai-log { height: 104px; overflow: hidden; background: #0B1220; border-radius: 10px; padding: 11px 14px; text-align: left; font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 11px; line-height: 1.8; color: #86EFAC; }
.ai-log-line { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; animation: logIn .2s ease; }
@keyframes logIn { from { opacity: 0; transform: translateY(3px); } to { opacity: 1; transform: none; } }

.ai-done { text-align: center; padding: 4px 0 0; }
.ai-done-icon { width: 64px; height: 64px; margin: 0 auto 14px; border-radius: 50%; background: #E7F2EC; color: #1F6B4A; font-size: 30px; display: flex; align-items: center; justify-content: center; }
.ai-done-title { font-size: 19px; font-weight: 650; color: #14251D; }
.ai-done-sub { font-size: 12.5px; color: #7C8B84; margin-top: 6px; }
.ai-mini-wrap { width: 100%; height: 230px; overflow: hidden; margin: 18px auto 0; background: #EEF2EF; border-radius: 12px; display: flex; align-items: flex-start; justify-content: center; padding-top: 14px; }
.ai-mini-doc { width: 176px; height: 248px; overflow: hidden; background: #fff; box-shadow: 0 8px 24px rgba(15, 23, 42, .16); }
.ai-mini-doc .doc-page { transform: scale(.221); transform-origin: top left; box-shadow: none; }
.ai-done-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 9px; margin-top: 18px; }

@media (max-width: 1180px) {
  .template-gallery { grid-template-columns: 1fr 1fr; }
  .doc-page { transform: scale(.88); transform-origin: top center; margin-bottom: -130px; }
  .docv-thumb-sheet .doc-page, .ai-mini-doc .doc-page { transform: scale(.145); margin-bottom: 0; }
}
@media (max-width: 860px) {
  .template-gallery { grid-template-columns: 1fr; }
  .docv-side { display: none; }
  .doc-page { transform: scale(.62); transform-origin: top center; margin-bottom: -420px; }
  .ai-template-grid { grid-template-columns: 1fr; }
}
