/* 《宦海浮沉录》网站版基础样式：由 miniprogram/app.wxss 转换（28rpx=14px），加 tabbar/导航/弹窗 */
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; padding: 0; }
body {
  background-color: #f4f5f7;
  color: #1f2d3d;
  font-size: 14px;
  line-height: 1.6;
  font-family: -apple-system, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
  padding-top: 48px;
  padding-bottom: 64px;
}
#navbar {
  position: fixed; top: 0; left: 0; right: 0; height: 48px; z-index: 100;
  background: #1f2d3d; color: #fff;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 16px; font-size: 16px; font-weight: 600;
}
#navbar-user { font-size: 12px; font-weight: 400; color: #c9d4e0; }
#navbar-user a { color: #fff; margin-left: 8px; cursor: pointer; text-decoration: underline; }

.btn.danger { background: #9c2b23; }
.btn:disabled { opacity: .5; }
.btn-hover, .btn:active { opacity: .85; }
/* 人脉页：待处理事项 */
.pending-item {
  padding: 12px 0;
  border-bottom: 1px solid #eee;
}
.pending-item:last-child { border-bottom: none; }
.pending-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 4px;
}
.pending-btns {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}
.btn.small {
  flex: 0 0 auto;
  min-height: 40px;
  padding: 8px 16px;
  font-size: 14px;
  margin-top: 0;
}
.text-input {
  width: 100%; border: 1px solid #dfe4ea; border-radius: 6px; padding: 10px;
  font-size: 14px; margin: 4px 0 8px;
}

.nav-item:active { background: #f4f5f7; }

#tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; height: 56px; z-index: 100;
  background: #faf7ef; border-top: 1px solid #e5ddc9;
  display: flex;
}
.tab-item {
  flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center;
  color: #8a7a5e; font-size: 11px; cursor: pointer;
}
.tab-item .icon { font-size: 20px; }
.tab-item.active { color: #9c2b23; font-weight: 600; }
#toast {
  position: fixed; left: 50%; bottom: 80px; transform: translateX(-50%);
  background: rgba(31,45,61,.92); color: #fff; padding: 10px 18px; border-radius: 6px;
  font-size: 13px; z-index: 200; max-width: 80%; text-align: center;
  transition: opacity .25s;
}
.toast-hidden { opacity: 0; pointer-events: none; }
#modal-root .modal-mask {
  position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 24px;
}
#modal-root .modal-box { background: #fff; border-radius: 10px; padding: 18px; width: 100%; max-width: 420px; }
#modal-root .modal-title { font-size: 16px; font-weight: 600; margin-bottom: 8px; }
#modal-root .modal-content { font-size: 14px; color: #3a4756; margin-bottom: 14px; white-space: pre-wrap; }
#modal-root .modal-btns { display: flex; gap: 12px; margin-top: 16px; }
#modal-root .modal-btns .btn {
  flex: 1;
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  padding: 12px 0;
  margin-top: 0;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  cursor: pointer;
}

.tag.red { background: #fdecea; color: #9c2b23; }
.tag.green { background: #e9f7ef; color: #1e7e34; }
.popup-layer {
  position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 250;
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.popup-box { background: #faf7ef; border-radius: 10px; padding: 20px; max-width: 480px; width: 100%; max-height: 80vh; overflow-y: auto; }
.alert-bar { background: #fff7e6; border: 1px solid #f0d48a; border-radius: 6px; padding: 8px 12px; font-size: 13px; margin-bottom: 10px; color: #8a5a00; }
.progress { height: 8px; background: #eef1f5; border-radius: 4px; overflow: hidden; }
.progress > div { height: 100%; background: #1f6feb; border-radius: 4px; }
table.plain { width: 100%; border-collapse: collapse; font-size: 13px; }
table.plain th, table.plain td { padding: 6px 8px; border-bottom: 1px solid #eef1f5; text-align: left; }

/* ===== 来自小程序 app.wxss 的共享样式（rpx 已 ÷2 转 px） ===== */
page {
  background-color: #f4f5f7;
  color: #1f2d3d;
  font-size: 14px;
  line-height: 1.6;
}

.page {
  padding: 12px 12px 80px;
}

.card {
  background: #ffffff;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
  box-shadow: 0 1px 5px rgba(31, 45, 61, 0.06);
}

.card-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
/* 身份卡玩家姓名 */
.char-name {
  font-size: 17px;
  font-weight: 700;
  color: #1f2d3d;
  margin: 2px 0 4px;
}

.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 4px;
}

.row:last-child {
  margin-bottom: 0;
}

.muted {
  color: #7a8699;
  font-size: 12px;
}

.label {
  color: #7a8699;
  font-size: 12px;
}

.value {
  font-size: 13px;
}

.btn {
  background: #1f6feb;
  color: #ffffff;
  border-radius: 6px;
  padding: 10px 0;
  text-align: center;
  font-size: 15px;
  margin-top: 8px;
}

.btn.ghost {
  background: #eef2f7;
  color: #1f2d3d;
}

.btn.disabled {
  background: #c9d1dc;
}

.btn.small {
  padding: 5px 10px;
  font-size: 12px;
  margin: 0;
  border-radius: 7px;
}

/* Phase 14E：任务行动改成紧凑按钮网格（不再是一列巨大的文字卡片） */
.action-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.action-btn {
  width: 48%;
  box-sizing: border-box;
  background: #eef2f7;
  border-radius: 6px;
  padding: 8px 7px;
  margin-top: 7px;
  min-height: 48px;
}

.action-btn:active {
  background: #dde5f0;
  transform: scale(0.98);
}

.action-btn.disabled {
  background: #f2f4f7;
  opacity: 0.65;
}

.action-btn .name {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.3;
}

.action-btn .meta {
  font-size: 11px;
  color: #7a8699;
  margin-top: 3px;
  line-height: 1.3;
}

.action-btn.primary {
  background: #1f6feb;
  color: #ffffff;
}

.action-btn.primary .meta {
  color: rgba(255, 255, 255, 0.82);
}

.grid-2 {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
}

.grid-2 .cell {
  width: 48%;
  background: #f7f9fc;
  border-radius: 5px;
  padding: 6px;
  margin-top: 6px;
  box-sizing: border-box;
}

/* Phase 14F-B：任务卡默认精简 + 决策按钮三级视觉权重（中性暖白，不用大面积浅蓝） */
.task-item {
  background: #fffdfa;
  border: 0.5px solid #eceff3;
  border-radius: 7px;
  padding: 9px;
  margin-top: 8px;
}

.task-item.active {
  border-color: #dfe4ea;
  background: #fffcf7;
}

.task-flag {
  display: inline-block;
  margin-top: 4px;
  font-size: 11px;
  color: #8a6d3b;
  background: #fbf3e4;
  border-radius: 4px;
  padding: 1px 6px;
}

.action-btn.decision-primary {
  background: #1f6feb;
  color: #ffffff;
  min-height: 55px;
}

.action-btn.decision-primary .meta {
  color: rgba(255, 255, 255, 0.85);
}

.action-btn.decision-normal {
  background: #f2f4f7;
  color: #1f2d3d;
}

.action-btn.decision-weak {
  background: #fbfbfc;
  color: #7a8699;
  border: 0.5px dashed #e3e7ec;
}

.action-btn.decision-weak .name {
  font-weight: 500;
}

.tag {
  display: inline-block;
  background: #eef2f7;
  color: #43536b;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 11px;
  margin-right: 4px;
  margin-bottom: 4px;
}

.bar {
  height: 7px;
  border-radius: 4px;
  background: #e6eaf0;
  overflow: hidden;
  margin-top: 3px;
}

.bar-inner {
  height: 100%;
  background: #1f6feb;
}

.bar-inner.warn {
  background: #e8a33d;
}

.bar-inner.danger {
  background: #d9534f;
}

.section {
  margin-bottom: 12px;
}

.divider {
  height: 0.5px;
  background: #e6eaf0;
  margin: 8px 0;
}

.empty {
  color: #9aa5b5;
  font-size: 13px;
  padding: 8px 0;
}

.pill {
  font-size: 11px;
  color: #ffffff;
  background: #43536b;
  border-radius: 10px;
  padding: 2px 8px;
}

.pill.ok {
  background: #2f9e6f;
}

.pill.warn {
  background: #e8a33d;
}

.pill.danger {
  background: #d9534f;
}

.nav-grid {
  display: flex;
  flex-wrap: wrap;
}

.nav-item {
  width: 25%;
  text-align: center;
  padding: 8px 0;
}

.nav-item .icon {
  display: block;
  font-size: 17px;
}

.nav-item .text {
  font-size: 12px;
  color: #43536b;
}

/* Phase 14F §10/§11：年度报告弹窗（覆盖层，不改变页面布局） */
.mask {
  position: fixed;
  left: 0;
  right: 0;
  top: 0;
  bottom: 0;
  background: rgba(31, 45, 61, 0.45);
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}

.modal {
  width: 100%;
  max-height: 84vh;
  overflow-y: auto;
  background: #ffffff;
  border-radius: 9px;
  padding: 14px 12px;
  box-sizing: border-box;
}

/* Phase 14F §8：本月重点的可选标签 */
/* 问题11（2026-09-30，用户拍板）：可点的 chip 一律做成实按钮样——明确边框+底色+阴影；
   纯展示的文字改用 .pill/.tag，不再用 .chip，避免"像阴影文字"。 */
.chip-row {
  display: flex;
  flex-wrap: wrap;
  margin-top: 6px;
}

.chip {
  background: #fbf6ec;
  color: #3b3125;
  border: 0.5px solid #d9c9a6;
  border-radius: 12px;
  padding: 5px 12px;
  font-size: 13px;
  font-weight: 600;
  margin: 0 6px 6px 0;
  box-shadow: 0 1px 3px rgba(120, 90, 40, 0.14);
}

.chip.active {
  background: #1f6feb;
  color: #ffffff;
  border-color: #1f6feb;
}

/* 问题11：可点 chip 的按压态（wxml 侧对可点 chip 加 hover-class="chip-hover"） */
.chip-hover {
  background: #f3e8d0;
  border-color: #c9a86f;
  box-shadow: none;
  opacity: 0.92;
}

/* 问题11：不可点置灰——明确灰样；按压时不给反馈 */
.chip.off {
  background: #f0efeb;
  color: #a9a49a;
  border: 0.5px solid #e2e0d8;
  box-shadow: none;
  font-weight: 400;
}

.chip.off.chip-hover {
  background: #f0efeb;
  border-color: #e2e0d8;
  opacity: 1;
}

/* 问题11：可点但次要的操作（如"放弃"）——中性按钮样，明确可点，不是禁用灰 */
.chip.secondary {
  background: #f7f9fc;
  color: #5a6b82;
  border: 0.5px solid #cfd8e3;
  font-weight: 500;
  box-shadow: none;
}

/* Phase 14F §5：人生时间线（故事，不是数据表） */
.timeline-item {
  border-left: 2px solid #dfe4ea;
  padding: 0 0 9px 9px;
  margin-left: 3px;
}

.timeline-date {
  color: #7a8699;
  font-size: 11px;
}

.timeline-title {
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
}

/* POST-WORK-REFINE-FIX-01：晋升/任职变动弹窗使用不透明遮罩，长文案可读 */
.promotion-mask { background: rgba(15, 23, 42, 0.72); }
.promotion-sheet { background: #ffffff; box-shadow: 0 6px 20px rgba(15, 23, 42, 0.25); }
.promotion-sheet .sheet-title { font-size: 20px; font-weight: 600; color: #b8860b; }


/* ================================================================
   CORE-LOOP-F §22：体制美学视觉
   视觉方向：档案袋 / 公文 / 任免通知 / 印章 / 工作简报 / 考核材料 /
             仿宋·宋体风格 / 米白纸张 / 档案卡 / 公示材料
   说明：本轮只改视觉，不动任何玩法规则、不改任何数据绑定。
   ================================================================ */

/* 纸张底：米白档案纸，替代原来的冷灰背景 */
page {
  background-color: #f5f1e8;
  background-image: linear-gradient(180deg, #f7f4ec 0%, #f2ede2 100%);
  color: #1f2a37;
  font-family: "Songti SC", "STSong", "SimSun", "Source Han Serif SC", serif;
}

/* 卡片 = 档案卡：细边框 + 左侧装订暗纹，去掉浮夸投影 */
.card {
  background: #fffdf8;
  border: 0.5px solid #d9cfba;
  border-left: 3px solid #b99a5b;
  border-radius: 4px;
  box-shadow: 0 0.5px 2px rgba(90, 76, 48, 0.08);
}

/* 卡片标题 = 公文小标题：宋体加粗 + 字距 */
.card-title {
  color: #2a2116;
  letter-spacing: 0.5px;
  font-family: "Songti SC", "STSong", "SimSun", "Source Han Serif SC", serif;
  font-weight: 700;
}

/* 数值区保持无衬线，便于快速读数 */
.value,
.label,
.muted {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
}

.label {
  color: #8a7a5e;
}

.muted {
  color: #7d7361;
}

.value {
  color: #23303f;
}

/* 主按钮 = 印章红（任免通知的落款色），次级按钮 = 纸灰 */
.btn {
  /* UI/UX 优化轮 §13/§14：内容保持公文风，操作控件适度游戏化
     —— 保留公文红与正式配色，但改为中等偏大圆角 + 层次 + 按压反馈 */
  background: linear-gradient(180deg, #a83228 0%, #8f261f 100%);
  color: #fffaf2;
  letter-spacing: 1px;
  /* 参考图 §十七：主要按钮圆角 12~16px（375px 设计稿下 14px ≈ 14px），不做成药丸形 */
  border-radius: 14px;
  padding: 11px 0;
  font-weight: 600;
  box-shadow: 0 3px 7px rgba(122, 33, 26, 0.26), inset 0 0.5px 0 rgba(255, 255, 255, 0.18);
  transition: transform 90ms ease, box-shadow 90ms ease, background 90ms ease;
}

/* §16：统一交互状态 —— 默认 / 点击（hover-class）/ 不可用 / 处理中 */
.btn-hover {
  transform: translateY(0.5px) scale(0.985);
  box-shadow: 0 1px 3px rgba(122, 33, 26, 0.22), inset 0 0.5px 0 rgba(255, 255, 255, 0.12);
  opacity: 0.94;
}

.btn.busy {
  background: #b9a08c;
  color: #fffaf2;
  box-shadow: none;
}

.btn.ghost {
  background: #efe8da;
  color: #3b3125;
  border: 0.5px solid #d9cfba;
  box-shadow: none;
  border-radius: 9px;
}

.btn.disabled {
  background: #cfc6b4;
  color: #fbf8f2;
  box-shadow: none;
}

/* 分割线 = 公文横线 */
.divider {
  border-top: 0.5px solid #ded4bf;
}

/* 标签 = 公示材料的方签 */
.pill {
  border-radius: 2px;
  border: 0.5px solid #d9cfba;
  background: #f6f1e6;
  color: #6b5a3d;
  letter-spacing: 0.5px;
}

.pill.ok {
  border-color: #a8bd97;
  background: #eef4e8;
  color: #43602f;
}

.pill.warn {
  border-color: #d8b271;
  background: #fbf3e2;
  color: #7a5410;
}

.pill.danger {
  border-color: #cf8f88;
  background: #fbecea;
  color: #8c2b23;
}

/* 进度条 = 报表里的实心条 */
.bar {
  background: #e8e0cf;
  border-radius: 1px;
}

.bar-inner {
  background: #9c2b23;
  border-radius: 1px;
}

/* 弹窗 = 正式公文纸 */
.modal,
.sheet {
  background: #fffdf8;
  border: 0.5px solid #d9cfba;
  border-radius: 8px;
  /* UI/UX 参考重做轮 §二十七：弹层必须是不透明卡面，不能透出下层列表 */
  padding: 12px 11px;
  width: 100%;
  box-sizing: border-box;
  opacity: 1;
}

/* 晋升 / 任职 / 调动 = 任免通知的仪式感 */
.promotion-mask {
  background: rgba(28, 22, 14, 0.82);
}

.promotion-sheet {
  background: #fffdf6;
  border: 1px solid #b99a5b;
  border-radius: 3px;
  box-shadow: 0 8px 24px rgba(28, 22, 14, 0.35);
  position: relative;
  overflow: hidden;
  /* FIX-I C-72：任免通知内容再长，弹层限高滚动，「继续」按钮吸底首屏可见 */
  max-height: 84vh;
  overflow-y: auto;
}

.promotion-sticky-actions {
  position: sticky;
  bottom: 0;
  background: #fffdf6;
  padding: 6px 0 2px;
}

.promotion-sheet::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: linear-gradient(90deg, #9c2b23 0%, #b99a5b 100%);
}

.promotion-sheet .sheet-title {
  font-size: 21px;
  font-weight: 700;
  color: #9c2b23;
  letter-spacing: 2px;
  font-family: "Songti SC", "STSong", "SimSun", serif;
}

/* 印章样式：可用于任免通知的落款（文末红章） */
.seal {
  display: inline-block;
  border: 1.5px solid #9c2b23;
  color: #9c2b23;
  border-radius: 2px;
  padding: 3px 7px;
  font-size: 11px;
  letter-spacing: 1.5px;
  transform: rotate(-6deg);
  opacity: 0.85;
}

/* 档案卡：用于人生档案 / 履历的条目 */
.archive-card {
  background: #fbf8f0;
  border: 0.5px solid #ded4bf;
  border-radius: 3px;
  padding: 10px;
  margin-bottom: 8px;
}

.archive-card .archive-title {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.5px;
  color: #2a2116;
}

.archive-card .archive-note {
  font-size: 12px;
  color: #7d7361;
}

/* 时间线 = 档案编号线 */
.timeline-item {
  border-left: 2px solid #cbb68d;
  padding: 0 0 9px 9px;
  margin-left: 3px;
}

.timeline-date {
  color: #8a7a5e;
  font-size: 11px;
  letter-spacing: 0.5px;
}

.timeline-title {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
  color: #2a2116;
}

/* 任免通知落款：印章行 */
.seal-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 4px 0 2px;
}

/* 年度考核 / 公示材料：考核表样式 */
.exam-sheet {
  background: #fbf8f0;
  border: 0.5px solid #ded4bf;
  border-radius: 3px;
  padding: 10px;
}

.exam-sheet .exam-title {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #2a2116;
  text-align: center;
}

/* 公示材料：居中标题 + 落款 */
.notice-sheet {
  background: #fffdf6;
  border: 0.5px solid #d9cfba;
  border-radius: 2px;
  padding: 12px 10px;
}

.notice-sheet .notice-title {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #9c2b23;
  text-align: center;
}

/* ============================================================
 * POSITION-TASK-REFACTOR-02 §39：公文 / 档案视觉规范
 *
 * 视觉方向（指令原文）：档案 · 公文 · 任免通知 · 印章 · 考察材料 · 年度考核 · 履历档案
 *
 * 统一色板（只允许这四色，避免页面各写一套颜色）：
 *   公文红  #9c2b23   印章 / 红头 / 公文标题
 *   档案纸  #fbf8f0   档案卡、年度考核表底
 *   公文纸  #fffdf6   任免通知、公示、履历正文底
 *   边框线  #ded4bf   纸张边线与分隔
 * 字体：公文与档案类一律用衬线（Songti/STSong/SimSun），正文仍用系统无衬线。
 * ============================================================ */

/* 公文纸：任免通知 / 履历正文 / 分享卡 */
.doc-paper {
  background: #fffdf6;
  border: 0.5px solid #ded4bf;
  border-radius: 2px;
  padding: 12px 10px;
}

/* 红头：公文纸顶部的红色分隔 */
.doc-head {
  border-bottom: 2px double #9c2b23;
  padding-bottom: 5px;
  margin-bottom: 7px;
}

.doc-title {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 16px;
  font-weight: 700;
  letter-spacing: 1.5px;
  color: #9c2b23;
  text-align: center;
}

.doc-meta {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 11px;
  color: #7a8699;
  letter-spacing: 0.5px;
}

/* 履历档案封面 */
.dossier-cover {
  background: #fbf8f0;
  border: 0.5px solid #ded4bf;
  border-left: 4px solid #9c2b23;
  border-radius: 2px;
  padding: 10px;
  margin-bottom: 8px;
}

.dossier-cover .dossier-title {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #2a2116;
}

/* 年度考核表 */
.annual-sheet {
  background: #fbf8f0;
  border: 0.5px solid #ded4bf;
  border-radius: 2px;
  padding: 10px;
}

.annual-sheet .annual-head {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 1px;
  color: #2a2116;
  border-bottom: 0.5px solid #ded4bf;
  padding-bottom: 4px;
  margin-bottom: 5px;
}

/* 考察材料条目（民主推荐 / 考察 / 公示 / 任前谈话） */
.exam-item {
  background: #fbf8f0;
  border: 0.5px solid #ded4bf;
  border-radius: 2px;
  padding: 8px 9px;
  margin-bottom: 6px;
}

.exam-item .exam-step {
  font-family: "Songti SC", "STSong", "SimSun", serif;
  font-size: 13px;
  font-weight: 700;
  color: #2a2116;
  letter-spacing: 0.5px;
}

/* 印章：大号落款印章 + 落款行 */
.seal-lg {
  display: inline-block;
  border: 2.5px solid #9c2b23;
  color: #9c2b23;
  border-radius: 3px;
  padding: 5px 10px;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 2px;
  transform: rotate(-6deg);
  opacity: 0.88;
}

.seal-foot {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: 7px;
  padding-top: 5px;
  border-top: 0.5px solid #ded4bf;
}
