/* ============================================================
   工作模拟测评 · 橄榄绿主色 + 雾霾蓝辅助 + 黑白灰
   ============================================================ */
:root {
  --bg: #F4F4F1;
  --bg-deep: #EAEAE5;
  --surface: #FCFCFA;
  --primary: #556B2F;
  --primary-dark: #44571F;
  --primary-soft: #E9EDDC;
  --accent-blue: #8296AA;
  --accent-blue-soft: #E3EAEF;
  --text: #33332F;
  --text-soft: #65655F;
  --text-mute: #9A9A94;
  --border: #DBDBD4;
  --shadow: 0 2px 14px rgba(60, 60, 55, 0.08);
  --radius: 14px;
  --radius-sm: 8px;
  --bubble-mine: #DDE6C8;
  --bubble-other: #FFFFFF;
  --chat-bg: #EFEFEA;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary-dark); text-decoration: none; }
a:hover { color: var(--primary); }

.app {
  max-width: 880px;
  margin: 0 auto;
  padding: 32px 24px 80px;
}

/* 顶部品牌栏 */
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.brand-logo {
  width: 36px; height: 36px; border-radius: 10px;
  background: var(--primary);
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-weight: 700;
  box-shadow: var(--shadow);
}
.brand-title { font-size: 18px; font-weight: 600; letter-spacing: 0.5px; }
.brand-sub { color: var(--text-soft); font-size: 13px; }

/* 登录页品牌：居中 + 橄榄绿标题 + 下方 logo */
.brand-center {
  flex-direction: column;
  text-align: center;
  gap: 14px;
}
.brand-center .brand-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  letter-spacing: 4px;
}
.brand-logo-img {
  height: auto;
  max-width: 240px;
  width: auto;
  object-fit: contain;
}

/* 步骤进度 */
.steps {
  display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap;
}
.step-pill {
  flex: 1; min-width: 110px;
  padding: 10px 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  text-align: center;
  color: var(--text-mute);
  font-size: 13px;
}
.step-pill.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  font-weight: 600;
}
.step-pill.done {
  background: var(--primary-soft);
  border-color: var(--primary-soft);
  color: var(--primary-dark);
}

/* 卡片 */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  margin-bottom: 20px;
}
.card h2 {
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 16px;
}
.card p.lead { color: var(--text-soft); margin-bottom: 20px; }

/* 表单 */
.field { margin-bottom: 16px; }
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-soft);
  margin-bottom: 6px;
  font-weight: 500;
}
.input, .textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: #fff;
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.2s, box-shadow 0.2s;
}
.input:focus, .textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(85, 107, 47, 0.15);
}
.textarea { min-height: 180px; resize: vertical; line-height: 1.7; }
.counter { text-align: right; color: var(--text-mute); font-size: 12px; margin-top: 6px; }
.counter.ok { color: var(--primary-dark); font-weight: 500; }
.counter.need { color: #C07A6E; }

/* 按钮 */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 11px 24px;
  background: var(--primary);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 2px 8px rgba(85, 107, 47, 0.3);
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn:disabled { background: #B3B3AE; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-ghost {
  background: transparent;
  color: var(--text-soft);
  border: 1px solid var(--border);
  box-shadow: none;
}
.btn-ghost:hover { background: var(--bg); color: var(--text); transform: none; }
.btn-row { display: flex; gap: 12px; justify-content: flex-end; margin-top: 16px; }

/* 提示信息 */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
  font-size: 14px;
}
.alert-error { background: #F4E3DD; color: #8C4F47; border: 1px solid #E5C9C0; }
.alert-success { background: #E9EDDC; color: #4A5A33; border: 1px solid #CBD6B6; }
.alert-info { background: #E3EAEF; color: #4A5A68; border: 1px solid #C9D5DE; }

/* 背景资料小卡片（一行三个，与任务卡片区分） */
.bg-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 22px;
}
@media (max-width: 640px) {
  .bg-cards { grid-template-columns: 1fr; }
}
.bg-card {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  cursor: pointer;
  transition: all 0.2s;
}
.bg-card:hover {
  border-color: var(--primary);
  background: var(--surface);
}
.bg-card h3 {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--primary-dark);
}
.bg-card p {
  font-size: 12px;
  color: var(--text-mute);
  line-height: 1.4;
}

/* ========== 首页四张卡片 ========== */
.welcome {
  background: linear-gradient(135deg, var(--surface) 0%, var(--bg) 100%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 36px 32px;
  margin-bottom: 24px;
  box-shadow: var(--shadow);
}
.welcome h1 {
  font-size: 24px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--text);
}
.welcome p { color: var(--text-soft); }

.cards-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 24px;
}
@media (max-width: 640px) {
  .cards-grid { grid-template-columns: 1fr; }
}
.scene-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: all 0.2s;
  position: relative;
  overflow: hidden;
}
.scene-card:hover:not(.locked) {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(60, 60, 55, 0.12);
  border-color: var(--primary);
}
.scene-card.locked {
  opacity: 0.55;
  cursor: not-allowed;
}
.scene-card .num {
  width: 32px; height: 32px;
  background: var(--primary-soft);
  color: var(--primary-dark);
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600;
  margin-bottom: 12px;
}
.scene-card h3 {
  font-size: 16px;
  font-weight: 600;
  margin-bottom: 6px;
}
.scene-card p {
  font-size: 13px;
  color: var(--text-soft);
  line-height: 1.5;
}
.scene-card .status {
  position: absolute;
  top: 16px; right: 16px;
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 10px;
  background: var(--bg-deep);
  color: var(--text-soft);
}
.scene-card.done .status { background: var(--primary-soft); color: var(--primary-dark); }
.scene-card.active .status { background: var(--primary); color: #fff; }
.scene-card.locked .status { background: #E6E6E1; color: var(--text-mute); }
.scene-card.skipped {
  opacity: 0.62;
  border-style: dashed;
  border-color: var(--text-mute);
}
.scene-card.skipped .status { background: #E6E6E1; color: var(--text-mute); }
.scene-card.skipped:hover { border-color: var(--accent-blue); opacity: 0.8; transform: none; box-shadow: none; }
/* 已作答（含写了但还没到"完成"标准的草稿）：绿色 = 已作答 可修改 */

/* ========== 微信窗口式样 ========== */
.chat-window {
  background: var(--chat-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 16px;
}
.chat-header {
  background: #F4F4F0;
  padding: 14px 18px;
  border-bottom: 1px solid #E2E2DC;
  display: flex;
  align-items: center;
  gap: 12px;
}
.chat-header .title { font-size: 15px; font-weight: 600; color: var(--text); }
.chat-header .meta { font-size: 12px; color: var(--text-mute); }

.chat-body {
  padding: 16px;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.chat-msg {
  display: flex;
  gap: 10px;
  align-items: flex-start;
}
.chat-sys {
  align-self: center;
  text-align: center;
  font-size: 13px;
  color: var(--text-mute, #999);
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 8px 14px;
  max-width: 90%;
  line-height: 1.6;
}
.chat-done {
  align-self: center;
  text-align: center;
  font-size: 13px;
  color: var(--text-mute, #999);
  background: rgba(0, 0, 0, 0.06);
  border-radius: 8px;
  padding: 8px 14px;
  max-width: 90%;
  line-height: 1.6;
}
.chat-msg.mine { flex-direction: row-reverse; align-items: center; }
.chat-msg.mine .chat-name { display: none; }
.chat-avatar {
  width: 40px; height: 40px;
  border-radius: 6px;
  background: var(--accent-blue);
  flex-shrink: 0;
  overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px;
  color: #fff;
  font-weight: 500;
}
.chat-avatar img { width: 100%; height: 100%; object-fit: cover; }
.chat-name { font-size: 11px; color: var(--text-mute); margin-bottom: 4px; }
.chat-bubble {
  background: var(--bubble-other);
  padding: 10px 14px;
  border-radius: 8px;
  max-width: 78%;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.04);
  word-wrap: break-word;
  position: relative;
}
.chat-bubble.mine {
  background: var(--bubble-mine);
  color: #3A4426;
}
.chat-msg.mine .chat-name { text-align: right; }
.chat-time {
  text-align: center;
  font-size: 11px;
  color: var(--text-mute);
  margin: 8px 0;
  position: relative;
}
.chat-time::before, .chat-time::after {
  content: '';
  display: inline-block;
  width: 60px; height: 1px;
  background: #D9D9D3;
  vertical-align: middle;
  margin: 0 10px;
}
.chat-system {
  text-align: center;
  font-size: 11px;
  color: var(--text-mute);
  background: rgba(255,255,255,0.5);
  padding: 4px 10px;
  border-radius: 8px;
  align-self: center;
}

/* 角色人物卡 */
.person-card {
  display: flex;
  align-items: center;
  gap: 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 16px;
}
.person-card .avatar {
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--accent-blue);
  flex-shrink: 0;
}
.person-card .avatar img { width: 100%; height: 100%; object-fit: cover; }
.person-card .info h3 { font-size: 17px; font-weight: 600; margin-bottom: 4px; }
.person-card .info p { color: var(--text-soft); font-size: 13px; line-height: 1.5; }

/* 私聊输入区 */
.chat-input-area {
  background: #F4F4F0;
  padding: 14px;
  border-top: 1px solid #E2E2DC;
}
.chat-input-area textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  resize: none;
  min-height: 70px;
  color: var(--text);
}

/* 角色提示框 */
.role-tip {
  background: var(--bg);
  border-left: 3px solid var(--primary);
  padding: 12px 14px;
  border-radius: 4px;
  font-size: 13.5px;
  color: var(--text-soft);
  margin-bottom: 16px;
}

/* 完成页 */
.done-card {
  text-align: center;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 48px 32px;
  box-shadow: var(--shadow);
}
.done-card .check {
  width: 72px; height: 72px;
  border-radius: 50%;
  background: var(--primary-soft);
  margin: 0 auto 20px;
  display: flex; align-items: center; justify-content: center;
  color: var(--primary-dark);
  font-size: 36px;
}
.done-card h1 { font-size: 22px; font-weight: 600; margin-bottom: 12px; }
.done-card p { color: var(--text-soft); margin-bottom: 6px; }

/* 加载遮罩 */
.mask {
  position: fixed; inset: 0;
  background: rgba(255,255,255,0.6);
  display: flex; align-items: center; justify-content: center;
  z-index: 9999;
  backdrop-filter: blur(2px);
}
.mask .spinner {
  width: 36px; height: 36px;
  border: 3px solid var(--primary-soft);
  border-top-color: var(--primary);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* 响应式微调 */
@media (max-width: 600px) {
  .app { padding: 20px 14px 60px; }
  .card { padding: 20px; }
  .chat-bubble { max-width: 88%; }
}

/* ========== 弹窗（模拟2 内容按键 / 交卷二次确认） ========== */
.modal-mask {
  position: fixed; inset: 0;
  background: rgba(40, 40, 36, 0.45);
  display: flex; align-items: center; justify-content: center;
  z-index: 9000;
  padding: 20px;
}
.modal {
  background: var(--surface);
  border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.18);
  width: 100%;
  max-width: 760px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.modal.modal-sm { max-width: 440px; }
.modal-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 15px 22px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.modal-head h3 { font-size: 16px; font-weight: 600; color: var(--primary-dark); }
.modal-close {
  background: none; border: none;
  font-size: 22px; color: var(--text-mute);
  cursor: pointer; line-height: 1; padding: 2px 6px;
  font-family: inherit;
}
.modal-close:hover { color: var(--text); }
.modal-body {
  padding: 20px 24px;
  overflow-y: auto;
  font-size: 14px;
  line-height: 1.8;
  color: var(--text);
}
.modal-foot {
  padding: 14px 22px;
  border-top: 1px solid var(--border);
  display: flex; gap: 12px; justify-content: flex-end;
  flex-shrink: 0;
}

/* 财务数据表格（任务背景附件） */
.fin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
  margin: 8px 0 20px;
}
.fin-table th, .fin-table td {
  border: 1px solid var(--border);
  padding: 5px 10px;
  text-align: right;
  line-height: 1.5;
}
.fin-table th { background: var(--bg-deep); font-weight: 600; text-align: center; }
.fin-table td:first-child, .fin-table th:first-child { text-align: left; }
.fin-table tr.total td { font-weight: 600; background: var(--primary-soft); }
.fin-caption { font-size: 12px; color: var(--text-mute); margin: 2px 0 6px; }

/* 倒计时告急（<5分钟变红） */
.timer-danger { color: #A94442 !important; font-weight: 700; }

/* 目录页模拟卡片副标题 */
.sim-card-time { font-size: 13px; color: var(--text-mute); margin-top: 4px; }