/* ===========================================================================
 * 「人事顾问」子页样式（老板板块）
 * ---------------------------------------------------------------------------
 * ⚠️ 独立文件，**不改 style.css**（它 80KB、多人改）。按项目规矩：
 *    新建的 css 排在别人之后加载（见 index.html 里 <link> 的先后）。
 * ⚠️ 所有类名以 hrc- 开头（hr consultant），避免与别的子页撞名。
 * ⚠️ 子页底部必须留 ≥74px（fixed TabBar 实测高），少留会压住最后一块内容，
 *    而且桌面预览完全看不出来，只有手机端截图才明显。
 * =========================================================================== */

/* ---------- 外壳 ---------- */
#sub-hr { padding-bottom: 88px; }
#sub-hr [hidden] { display: none !important; }

/* ---------- 顶部：品牌头卡 ---------- */
.hrc-hero {
  position: relative; overflow: hidden;
  background: linear-gradient(135deg, #ff8a3d 0%, #f95901 55%, #d94a00 100%);
  border-radius: 20px; padding: 18px 18px 16px; color: #fff;
  box-shadow: 0 8px 22px rgba(249, 89, 1, 0.24);
  margin-bottom: 14px;
}
.hrc-hero::after {
  content: ''; position: absolute; right: -46px; top: -52px; width: 168px; height: 168px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.26) 0%, transparent 70%);
  border-radius: 50%; pointer-events: none;
}
.hrc-hero-top { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.hrc-hero-badge {
  width: 38px; height: 38px; border-radius: 12px; flex: none;
  background: rgba(255, 255, 255, 0.94);
  display: flex; align-items: center; justify-content: center;
  font-size: 20px; line-height: 1; box-shadow: 0 3px 10px rgba(120, 40, 0, 0.18);
}
.hrc-hero-title { font-size: 17px; font-weight: 700; letter-spacing: 0.3px; }
.hrc-hero-sub { font-size: 12px; opacity: 0.92; margin-top: 2px; }
.hrc-hero-lead {
  font-size: 13px; line-height: 1.65; opacity: 0.97;
  margin: 0; position: relative; z-index: 1;
}
.hrc-hero-lead b { font-weight: 700; }

/* ---------- 三段页签 ---------- */
.hrc-tabs {
  display: flex; gap: 6px; padding: 4px; margin-bottom: 14px;
  background: #fdf3ec; border-radius: 14px; border: 1px solid #f6e7db;
}
.hrc-tab {
  flex: 1; text-align: center; padding: 9px 4px; border-radius: 11px;
  font-size: 13.5px; font-weight: 600; color: #9a7a63; cursor: pointer;
  transition: background 0.18s, color 0.18s, box-shadow 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.hrc-tab.on {
  background: #fff; color: #d44900; box-shadow: 0 2px 8px rgba(249, 89, 1, 0.14);
}
.hrc-tab-ico { font-size: 14px; margin-right: 3px; }

/* ---------- 首屏场景（点选式，零打字进入） ---------- */
.hrc-sec-label {
  display: flex; align-items: center; gap: 7px;
  font-size: 13.5px; font-weight: 700; color: #5c4030; margin: 4px 2px 10px;
}
.hrc-sec-label i {
  width: 3px; height: 14px; border-radius: 2px; background: #f95901; flex: none;
}
.hrc-sec-label span { font-weight: 400; color: #a98a74; font-size: 12px; }

.hrc-scenes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px; }
.hrc-scene {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff; border: 1px solid #f2e4d8; border-radius: 15px;
  padding: 13px 12px; cursor: pointer;
  transition: transform 0.14s, box-shadow 0.14s, border-color 0.14s;
  -webkit-tap-highlight-color: transparent;
}
.hrc-scene:active { transform: scale(0.975); }
.hrc-scene:hover { border-color: #fbc9a6; box-shadow: 0 5px 16px rgba(249, 89, 1, 0.1); }
.hrc-scene-ico {
  width: 34px; height: 34px; border-radius: 11px; flex: none;
  display: flex; align-items: center; justify-content: center; font-size: 18px;
  background: #fff3ea;
}
.hrc-scene-name { font-size: 14px; font-weight: 650; color: #3d2b1f; margin-bottom: 2px; }
.hrc-scene-desc { font-size: 11.5px; color: #a98a74; line-height: 1.5; }

/* ---------- 快捷问题 chips ---------- */
.hrc-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.hrc-chip {
  font-size: 12.5px; color: #a9551e; background: #fff6ef;
  border: 1px solid #fbdcc3; border-radius: 999px; padding: 7px 13px; cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.hrc-chip:hover { background: #ffefe2; border-color: #f7c59c; }

/* ---------- 对话区 ---------- */
.hrc-chat { display: flex; flex-direction: column; gap: 14px; }
.hrc-row { display: flex; }
.hrc-row.me { justify-content: flex-end; }

.hrc-bubble {
  max-width: 92%; border-radius: 16px; padding: 13px 14px;
  font-size: 14px; line-height: 1.75; color: #3d2b1f;
  word-break: break-word; overflow-wrap: anywhere;
}
.hrc-row.me .hrc-bubble {
  background: linear-gradient(135deg, #ff9346, #f95901); color: #fff;
  border-bottom-right-radius: 5px; max-width: 84%;
  box-shadow: 0 4px 12px rgba(249, 89, 1, 0.2);
}
.hrc-row.ai .hrc-bubble {
  background: #fff; border: 1px solid #f2e4d8; border-bottom-left-radius: 5px; width: 100%;
  box-shadow: 0 2px 10px rgba(160, 110, 70, 0.06);
}

/* 顾问回答里的小节标记（【结论】【马上做】…）—— 前端按标记上色 */
.hrc-sec { margin: 0 0 12px; padding: 11px 13px; border-radius: 12px; }
.hrc-sec:last-child { margin-bottom: 0; }
.hrc-sec-h {
  display: flex; align-items: center; gap: 6px;
  font-size: 13px; font-weight: 700; margin-bottom: 6px;
}
.hrc-sec-b { font-size: 13.5px; line-height: 1.78; }
.hrc-sec-b p { margin: 0 0 7px; }
.hrc-sec-b p:last-child { margin-bottom: 0; }
.hrc-sec-b ol, .hrc-sec-b ul { margin: 0; padding-left: 18px; }
.hrc-sec-b li { margin-bottom: 5px; }
.hrc-sec-b strong { font-weight: 700; }

.hrc-sec.concl { background: #fff6ef; border-left: 4px solid #f95901; }
.hrc-sec.concl .hrc-sec-h { color: #d44900; }
.hrc-sec.concl .hrc-sec-b { font-size: 14.5px; font-weight: 650; color: #3d2b1f; }

.hrc-sec.todo { background: #f3fbf5; border-left: 4px solid #1f9d55; }
.hrc-sec.todo .hrc-sec-h { color: #157a41; }

.hrc-sec.risk { background: #fef4f4; border-left: 4px solid #e04a4a; }
.hrc-sec.risk .hrc-sec-h { color: #c33a3a; }

.hrc-sec.ask { background: #f4f7fe; border-left: 4px solid #4a72d8; }
.hrc-sec.ask .hrc-sec-h { color: #3a5cb8; }

.hrc-sec.nono { background: #fbf4f1; border-left: 4px solid #8a4a2a; }
.hrc-sec.nono .hrc-sec-h { color: #7a3f22; }

.hrc-sec.lawyer { background: #2f2118; border-left: 4px solid #f0a35c; color: #f6e8dc; }
.hrc-sec.lawyer .hrc-sec-h { color: #f6c08a; }
.hrc-sec.lawyer .hrc-sec-b { color: #f0dfd2; }

/* 思考中 / 光标 */
.hrc-thinking { display: flex; align-items: center; gap: 7px; color: #a98a74; font-size: 13px; }
.hrc-dots { display: inline-flex; gap: 3px; }
.hrc-dots i {
  width: 5px; height: 5px; border-radius: 50%; background: #f0955c;
  animation: hrcBlink 1.15s infinite both;
}
.hrc-dots i:nth-child(2) { animation-delay: 0.18s; }
.hrc-dots i:nth-child(3) { animation-delay: 0.36s; }
@keyframes hrcBlink { 0%, 80%, 100% { opacity: 0.28; } 40% { opacity: 1; } }
.hrc-caret {
  display: inline-block; width: 7px; height: 15px; vertical-align: -2px;
  background: #f95901; border-radius: 1px; margin-left: 2px;
  animation: hrcCaret 0.9s steps(2) infinite;
}
@keyframes hrcCaret { 0%, 50% { opacity: 1; } 51%, 100% { opacity: 0; } }

/* 点选按钮（模型给的选项） */
.hrc-picks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 11px; }
.hrc-pick {
  font-size: 13px; font-weight: 600; color: #d44900;
  background: #fff; border: 1.5px solid #fbc9a6; border-radius: 999px;
  padding: 8px 15px; cursor: pointer; transition: background 0.15s, border-color 0.15s;
  -webkit-tap-highlight-color: transparent;
}
.hrc-pick:hover { background: #fff4ec; border-color: #f59b5c; }
.hrc-pick:disabled { opacity: 0.45; cursor: default; }

/* 气泡底部操作 */
.hrc-acts { display: flex; gap: 12px; margin-top: 10px; padding-top: 9px; border-top: 1px dashed #f0e0d2; }
.hrc-act {
  font-size: 12.5px; color: #a98a74; cursor: pointer; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.hrc-act:hover { color: #d44900; }

/* ---------- 输入区（sticky 在 TabBar 之上） ---------- */
.hrc-inputbar {
  position: sticky; bottom: 74px; z-index: 6;
  display: flex; align-items: flex-end; gap: 8px;
  background: linear-gradient(180deg, rgba(255, 251, 247, 0) 0%, #fffbf7 38%);
  padding: 14px 0 8px; margin-top: -8px;
}
.hrc-input {
  flex: 1; min-height: 46px; max-height: 132px; resize: none;
  border: 1.5px solid #f2e0d1; border-radius: 14px; padding: 12px 14px;
  font-size: 14px; line-height: 1.6; color: #3d2b1f; background: #fff;
  font-family: inherit; outline: none; transition: border-color 0.15s;
}
.hrc-input:focus { border-color: #f7b183; }
.hrc-send {
  flex: none; height: 46px; padding: 0 18px; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #ff9346, #f95901); color: #fff;
  font-size: 14.5px; font-weight: 700; cursor: pointer;
  box-shadow: 0 4px 14px rgba(249, 89, 1, 0.28);
  transition: opacity 0.15s, transform 0.12s;
  -webkit-tap-highlight-color: transparent;
}
.hrc-send:active { transform: scale(0.97); }
.hrc-send:disabled { opacity: 0.5; cursor: default; box-shadow: none; }
.hrc-send-note { font-size: 11.5px; color: #bda28f; text-align: right; margin-top: 6px; }

/* ---------- 「算一笔」表单 ---------- */
.hrc-card {
  background: #fff; border: 1px solid #f2e4d8; border-radius: 16px;
  padding: 15px 15px 16px; margin-bottom: 13px;
  box-shadow: 0 2px 10px rgba(160, 110, 70, 0.05);
}
.hrc-field { margin-bottom: 13px; }
.hrc-field:last-child { margin-bottom: 0; }
.hrc-field-l { font-size: 13px; font-weight: 650; color: #5c4030; margin-bottom: 7px; }
.hrc-field-l span { font-weight: 400; color: #bda28f; font-size: 11.5px; margin-left: 5px; }
.hrc-field input[type="date"], .hrc-field input[type="number"], .hrc-field input[type="text"] {
  width: 100%; box-sizing: border-box;
  border: 1.5px solid #f2e0d1; border-radius: 12px; padding: 11px 13px;
  font-size: 15px; color: #3d2b1f; background: #fff; font-family: inherit; outline: none;
}
.hrc-field input:focus { border-color: #f7b183; }
.hrc-field-row { display: flex; gap: 10px; }
.hrc-field-row > * { flex: 1; min-width: 0; }

.hrc-radios { display: flex; flex-wrap: wrap; gap: 8px; }
.hrc-radio {
  font-size: 13px; color: #7a5b46; background: #fdf6f0;
  border: 1.5px solid #f2e4d8; border-radius: 11px; padding: 9px 12px; cursor: pointer;
  transition: all 0.15s; -webkit-tap-highlight-color: transparent;
}
.hrc-radio.on { background: #fff3ea; border-color: #f95901; color: #d44900; font-weight: 650; }
.hrc-radio small { display: block; font-size: 11px; color: #b09a86; }

.hrc-switch-row { display: flex; align-items: center; justify-content: space-between; padding: 9px 0; border-top: 1px dashed #f2e4d8; }
.hrc-switch-row:first-child { border-top: none; padding-top: 0; }
.hrc-switch-l { font-size: 13px; color: #5c4030; }
.hrc-switch-l span { display: block; font-size: 11.5px; color: #bda28f; margin-top: 2px; }
.hrc-switch {
  flex: none; width: 46px; height: 27px; border-radius: 999px; background: #e9d9cc;
  position: relative; cursor: pointer; transition: background 0.18s;
  -webkit-tap-highlight-color: transparent;
}
.hrc-switch::after {
  content: ''; position: absolute; top: 3px; left: 3px; width: 21px; height: 21px;
  border-radius: 50%; background: #fff; transition: transform 0.18s;
  box-shadow: 0 1px 3px rgba(120, 70, 30, 0.28);
}
.hrc-switch.on { background: #f95901; }
.hrc-switch.on::after { transform: translateX(19px); }

/* ---------- 结果：三条路对比 ---------- */
.hrc-total {
  background: linear-gradient(135deg, #fff6ef, #ffe9d8);
  border: 1px solid #fbdcc3; border-radius: 16px; padding: 16px; margin-bottom: 13px;
  text-align: center;
}
.hrc-total-l { font-size: 12.5px; color: #a9551e; margin-bottom: 5px; }
.hrc-total-v { font-size: 30px; font-weight: 800; color: #d44900; letter-spacing: -0.5px; }
.hrc-total-v small { font-size: 15px; font-weight: 600; margin-left: 3px; }
.hrc-total-note { font-size: 12px; color: #a98a74; margin-top: 6px; line-height: 1.6; }

.hrc-route {
  background: #fff; border: 1px solid #f2e4d8; border-radius: 15px;
  padding: 13px 14px; margin-bottom: 10px;
}
.hrc-route.hi { border-color: #fbc9a6; background: #fffaf6; }
.hrc-route-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 9px; }
.hrc-route-n { font-size: 13.5px; font-weight: 700; color: #3d2b1f; }
.hrc-route-tag {
  font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 999px; flex: none;
}
.hrc-route-tag.low { background: #eaf7ef; color: #157a41; }
.hrc-route-tag.mid { background: #fff4e0; color: #a96a00; }
.hrc-route-tag.high { background: #fdecec; color: #b93a3a; }
.hrc-route-sum { font-size: 20px; font-weight: 800; color: #d44900; }
.hrc-route-sum small { font-size: 12.5px; font-weight: 600; color: #a98a74; margin-left: 2px; }
.hrc-item { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; border-top: 1px dashed #f4e8dd; }
.hrc-item:first-child { border-top: none; }
.hrc-item-l { font-size: 12.5px; color: #6b503f; }
.hrc-item-l em { display: block; font-style: normal; font-size: 11px; color: #bda28f; margin-top: 2px; }
.hrc-item-v { font-size: 13px; font-weight: 650; color: #3d2b1f; flex: none; }

.hrc-warn {
  background: #fbf7f2; border: 1px solid #f0e3d6; border-radius: 13px;
  padding: 12px 13px; margin-bottom: 13px;
}
.hrc-warn-h { font-size: 12.5px; font-weight: 700; color: #7a5b46; margin-bottom: 7px; }
.hrc-warn li { font-size: 12.5px; line-height: 1.72; color: #6b503f; margin-bottom: 5px; }

/* ---------- 自查 ---------- */
.hrc-prog { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.hrc-prog-bar { flex: 1; height: 7px; border-radius: 999px; background: #f4e6d9; overflow: hidden; }
.hrc-prog-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, #ffb06b, #f95901); transition: width 0.25s; }
.hrc-prog-t { font-size: 12.5px; color: #a98a74; flex: none; }

.hrc-q { background: #fff; border: 1px solid #f2e4d8; border-radius: 14px; padding: 13px 14px; margin-bottom: 10px; }
.hrc-q-n { font-size: 11.5px; color: #bda28f; margin-bottom: 5px; }
.hrc-q-t { font-size: 13.5px; line-height: 1.68; color: #3d2b1f; margin-bottom: 10px; }
.hrc-q-a { display: flex; gap: 8px; }
.hrc-q-a button {
  flex: 1; font-size: 13px; padding: 9px 4px; border-radius: 11px; cursor: pointer;
  border: 1.5px solid #f2e4d8; background: #fdf9f6; color: #7a5b46; font-family: inherit;
  transition: all 0.15s; -webkit-tap-highlight-color: transparent;
}
.hrc-q-a button.on { border-color: #f95901; background: #fff3ea; color: #d44900; font-weight: 700; }
.hrc-q-a button.warn.on { border-color: #e8a33d; background: #fff8ec; color: #a96a00; }
.hrc-q-a button.high.on { border-color: #e04a4a; background: #fdeeee; color: #b93a3a; }

.hrc-score { text-align: center; padding: 18px 14px; }
.hrc-score-v { font-size: 44px; font-weight: 800; line-height: 1; letter-spacing: -1px; }
.hrc-score-v small { font-size: 16px; font-weight: 600; margin-left: 2px; }
.hrc-score-v.safe { color: #1f9d55; }
.hrc-score-v.watch { color: #d99a00; }
.hrc-score-v.risk { color: #e07a1f; }
.hrc-score-v.danger { color: #d43a3a; }
.hrc-score-s { font-size: 13px; color: #7a5b46; margin-top: 8px; line-height: 1.7; }

.hrc-finding { background: #fff; border: 1px solid #f2e4d8; border-radius: 14px; padding: 13px 14px; margin-bottom: 10px; }
.hrc-finding.high { border-left: 4px solid #e04a4a; }
.hrc-finding.warn { border-left: 4px solid #e8a33d; }
.hrc-finding-h { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; font-weight: 650; color: #3d2b1f; margin-bottom: 8px; }
.hrc-finding-h .hrc-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; margin-top: 6px; }
.hrc-finding.high .hrc-dot { background: #e04a4a; }
.hrc-finding.warn .hrc-dot { background: #e8a33d; }
.hrc-finding-b { font-size: 12.5px; line-height: 1.75; color: #6b503f; }
.hrc-finding-b b { color: #b93a3a; }

.hrc-go {
  width: 100%; border: none; border-radius: 14px; padding: 14px;
  background: linear-gradient(135deg, #ff9346, #f95901); color: #fff;
  font-size: 15px; font-weight: 700; font-family: inherit; cursor: pointer;
  box-shadow: 0 5px 16px rgba(249, 89, 1, 0.24);
  -webkit-tap-highlight-color: transparent;
}
.hrc-go:disabled { opacity: 0.5; box-shadow: none; }

/* ---------- 免责条 ---------- */
.hrc-note {
  display: flex; gap: 7px; font-size: 11.5px; line-height: 1.65; color: #a98a74;
  background: #fdf9f6; border: 1px solid #f4e9de; border-radius: 12px;
  padding: 10px 12px; margin-top: 14px;
}
.hrc-note b { color: #8a6a52; }

/* ---------- 桌面端：两列/更宽 ---------- */
@media (min-width: 768px) {
  #sub-hr { max-width: 720px; padding-bottom: 40px; }
  .hrc-scenes { grid-template-columns: repeat(3, 1fr); }
  .hrc-routes-2col { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
  .hrc-row.ai .hrc-bubble { max-width: 92%; }
}
