/* ===========================================================================
 * 财务顾问 · 老板板块（独立样式表）
 * ---------------------------------------------------------------------------
 * 为什么单开一个文件：全站铁律 —— 不加进 style.css。
 *   style.css 有 80KB 且多个会话并发在改，动它必然互相覆盖。
 *   本文件在 index.html 里排在 style.css / coach.css 之后加载，
 *   同名选择器后出现者胜出 —— 与 coach.css 同一套做法。
 *
 * 配色：老板板块内部用「墨绿 + 金」做辨识度，与创业教练的「棕琥珀」并列。
 *   品牌橙（--primary #f95901）**没有换**，仍然只用在主行动按钮上 ——
 *   这是用户明确的底线：板块可以有性格，主色不许动。
 *   墨绿取的是"账本 / 对账 / 合规"的心理联想，也让它一眼区别于教练的暖棕。
 *
 * 🔴 三条踩过坑的约束（不要在改版时破坏）：
 *   ① 任何含 absolute 装饰物的卡片，容器必须自带 position: relative ——
 *      否则 overflow:hidden 裁不到装饰，它会按 right:-40% 撑宽 document，
 *      手机端整页缩成 77%（桌面完全看不出来）。
 *   ② `hidden` 属性会被 display:flex/grid 盖掉 → 凡是用 hidden 控制的元素，
 *      本文件都补了 [hidden]{display:none!important}。
 *   ③ 数字/金额用等宽数字（font-variant-numeric: tabular-nums），
 *      否则测算表里的数字列对不齐，一眼就显得业余。
 * =========================================================================== */

/* ===================== ① 老板板块：第二张功能入口卡 ===================== */
/* 全部功能表里的图标底色 —— 墨绿系，与子页身份条一致。
   不复用 style.css 的 .f-green（那是亮绿 #22c55e，跟本功能的墨绿不是一套）。 */
.f-forest { background: linear-gradient(135deg, #2d8f72, #10493a); }

/* 复用 coach 定义的 .boss-entry 骨架（position:relative 已在那边设好），
   这里只换视觉身份：图标底色、标签色、光晕色改成墨绿系。 */
.boss-entry.fa-entry { background: linear-gradient(135deg, #ffffff 0%, #f3faf7 100%); border-color: #cfe6dd; }
.boss-entry.fa-entry .boss-entry-glow {
  background: radial-gradient(circle, rgba(28, 92, 74, .18) 0%, rgba(28, 92, 74, 0) 70%);
}
.boss-entry.fa-entry .boss-entry-ico {
  background: linear-gradient(135deg, #2d8f72 0%, #10493a 100%);
  box-shadow: 0 6px 14px rgba(16, 73, 58, .32);
}
.boss-entry.fa-entry .boss-entry-tag { color: #17614e; background: #e6f5ef; }
.boss-entry.fa-entry .boss-entry-name { color: var(--text); }
.boss-entry.fa-entry .boss-entry-flow span { background: #f0faf6; border-color: #cfe6dd; color: #17614e; }
.boss-entry.fa-entry .boss-entry-flow i { color: #a8c9bd; }

/* ===================== ② 子页：身份条 ===================== */
.fa-head {
  display: flex; align-items: center; gap: 12px;
  padding: 14px 16px; margin-bottom: 14px;
  background: linear-gradient(135deg, #f4fbf8 0%, #fdfefd 100%);
  border: 1px solid #d5e9e1; border-radius: 16px;
}
.fa-avatar {
  flex: 0 0 auto; width: 44px; height: 44px; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
  background: linear-gradient(135deg, #2d8f72 0%, #10493a 100%);
  box-shadow: 0 5px 12px rgba(16, 73, 58, .28);
}
.fa-head-body { min-width: 0; flex: 1 1 auto; }
.fa-head-name { font-size: 15px; font-weight: 800; color: var(--text); }
.fa-head-desc { font-size: 12px; color: var(--text2); margin-top: 3px; line-height: 1.5; }
.fa-reset {
  flex: 0 0 auto; border: 1px solid #cfe6dd; background: #fff;
  color: #17614e; font-size: 12px; font-weight: 700;
  padding: 6px 11px; border-radius: 10px; cursor: pointer; font-family: inherit;
}
.fa-reset:active { transform: scale(.96); }

/* ===================== ③ 体检表单 ===================== */
.fa-intro {
  position: relative; overflow: hidden;
  padding: 16px 18px; margin-bottom: 14px; border-radius: 18px;
  background: linear-gradient(135deg, #10493a 0%, #1c5c4a 55%, #2d8f72 100%);
  box-shadow: 0 8px 22px rgba(16, 73, 58, .24);
}
.fa-intro::after {
  content: ''; position: absolute; right: -38px; top: -52px;
  width: 150px; height: 150px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, .16) 0%, rgba(255, 255, 255, 0) 70%);
  pointer-events: none;
}
.fa-intro-t { position: relative; font-size: 15.5px; font-weight: 800; color: #fff; letter-spacing: .3px; }
.fa-intro-s {
  position: relative; margin-top: 7px;
  font-size: 12.5px; line-height: 1.75; color: rgba(255, 255, 255, .86);
}
.fa-intro-s b { color: #ffd98a; font-weight: 800; }

/* 分组卡：一组 = 一个问题族 */
.fa-group {
  background: #fff; border: 1px solid #e2efea; border-radius: 16px;
  padding: 15px 16px; margin-bottom: 12px;
}
.fa-group-hd {
  display: flex; align-items: center; gap: 8px; margin-bottom: 13px;
}
.fa-group-n {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: 11px; font-weight: 800; color: #fff;
  background: linear-gradient(135deg, #2d8f72 0%, #10493a 100%);
}
.fa-group-t { font-size: 13.5px; font-weight: 800; color: var(--text); }

.fa-item { margin-bottom: 16px; }
.fa-item:last-child { margin-bottom: 0; }
.fa-q { font-size: 13.5px; font-weight: 700; color: var(--text); line-height: 1.5; }
.fa-q em { font-style: normal; color: var(--primary); margin-left: 2px; }
.fa-hint {
  margin-top: 4px; font-size: 11.5px; color: #8aa79d; line-height: 1.6;
}
.fa-hint.warn { color: #b45309; }

/* 选项 chips：单选用 .fa-chip，多选用 .fa-chip.multi */
.fa-chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.fa-chip {
  border: 1px solid #d5e9e1; background: #fff; color: #2c5a4c;
  font-size: 12.5px; padding: 8px 13px; border-radius: 11px;
  cursor: pointer; font-family: inherit; line-height: 1.35;
  transition: background .14s ease, border-color .14s ease, color .14s ease;
}
.fa-chip:active { transform: scale(.97); }
@media (hover: hover) { .fa-chip:hover { background: #f2faf7; } }
.fa-chip.on {
  background: linear-gradient(135deg, #2d8f72 0%, #17614e 100%);
  border-color: #17614e; color: #fff; font-weight: 700;
  box-shadow: 0 4px 10px rgba(16, 73, 58, .22);
}
.fa-chip.on.warn {
  background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
  border-color: #b45309; box-shadow: 0 4px 10px rgba(180, 83, 9, .24);
}
.fa-chip:disabled { opacity: .45; cursor: not-allowed; }

/* 补充说明文本框 */
.fa-note {
  width: 100%; box-sizing: border-box;
  border: 1px solid #d5e9e1; border-radius: 13px; background: #fbfefd;
  padding: 11px 13px; font-size: 13.5px; line-height: 1.65;
  font-family: inherit; color: var(--text); resize: none; outline: none;
  transition: border-color .15s ease;
}
.fa-note:focus { border-color: #6fbba3; background: #fff; }
.fa-note::placeholder { color: #a9c2ba; }

/* 生成按钮区 */
.fa-submit {
  margin-top: 16px; padding: 16px;
  background: #fff; border: 1px solid #e2efea; border-radius: 16px;
}
.fa-submit .fa-miss {
  font-size: 12px; color: #b45309; line-height: 1.6; margin-bottom: 10px;
}
.fa-submit .fa-miss[hidden] { display: none !important; }
.fa-go {
  width: 100%; border: none; border-radius: 14px;
  background: linear-gradient(135deg, #ff8845 0%, #f94400 100%);
  color: #fff; font-size: 15px; font-weight: 800; font-family: inherit;
  padding: 14px 16px; cursor: pointer;
  box-shadow: 0 6px 16px rgba(249, 89, 1, .3);
  transition: transform .14s ease;
}
.fa-go:active:not(:disabled) { transform: scale(.985); }
.fa-go:disabled { opacity: .5; box-shadow: none; cursor: not-allowed; }
.fa-go-tip {
  margin-top: 9px; font-size: 11px; color: #8aa79d; text-align: center; line-height: 1.6;
}

/* ===================== ④ 体检摘要卡（提交后 / 报告上方） ===================== */
.fa-brief {
  border: 1px solid #d5e9e1; border-radius: 16px; background: #f7fcf9;
  margin-bottom: 14px; overflow: hidden;
}
.fa-brief[hidden] { display: none !important; }
.fa-brief-hd {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 15px; cursor: pointer;
}
.fa-brief-hd .fa-brief-ico { font-size: 15px; }
.fa-brief-hd .fa-brief-t { flex: 1 1 auto; font-size: 13px; font-weight: 800; color: #17614e; }
.fa-brief-hd .fa-brief-x { font-size: 12px; color: #6f9c8c; font-weight: 700; }
.fa-brief-bd { padding: 0 15px 14px; }
.fa-brief-bd[hidden] { display: none !important; }
.fa-brief-row {
  display: flex; gap: 8px; padding: 6px 0;
  border-top: 1px dashed #dceee7; font-size: 12.5px; line-height: 1.6;
}
.fa-brief-row:first-child { border-top: none; }
.fa-brief-k { flex: 0 0 68px; color: #7d9c92; }
.fa-brief-v { flex: 1 1 auto; color: var(--text); word-break: break-word; }

/* ===================== ⑤ 报告区 ===================== */
.fa-plan { margin-bottom: 14px; }
.fa-plan[hidden] { display: none !important; }

/* 生成中的进度卡（渐近，不假报百分比） */
.fa-wait {
  position: relative; overflow: hidden;
  padding: 18px 18px 20px; border-radius: 18px;
  background: #fff; border: 1px solid #d5e9e1;
}
.fa-wait[hidden] { display: none !important; }
.fa-wait-t { font-size: 13.5px; font-weight: 800; color: #17614e; }
.fa-wait-s { margin-top: 6px; font-size: 12px; color: var(--text2); line-height: 1.65; }
.fa-bar {
  margin-top: 14px; height: 6px; border-radius: 999px; background: #e8f4ef; overflow: hidden;
}
.fa-bar i {
  display: block; height: 100%; width: 4%; border-radius: 999px;
  background: linear-gradient(90deg, #2d8f72 0%, #8fd4bb 100%);
}
.fa-wait-step {
  margin-top: 9px; font-size: 11.5px; color: #6f9c8c; text-align: center;
  min-height: 17px;
}

/* 报告正文卡 */
.fa-card {
  position: relative; overflow: hidden;
  background: #fff; border: 1px solid #e2efea; border-radius: 18px;
  padding: 18px 17px 6px;
  box-shadow: 0 4px 16px rgba(16, 73, 58, .05);
}
.fa-card-bd { font-size: 14px; line-height: 1.8; color: var(--text); word-break: break-word; overflow-wrap: anywhere; }

/* 报告里的 Markdown 渲染 */
.fa-card-bd p { margin: 0 0 11px; }
.fa-card-bd p:last-child { margin-bottom: 0; }
.fa-card-bd strong { font-weight: 800; color: #0f3a30; }

.fa-card-bd h2 {
  position: relative;
  font-size: 14.5px; font-weight: 800; color: #0f3a30;
  margin: 24px 0 12px; padding-left: 12px; line-height: 1.5;
}
.fa-card-bd h2::before {
  content: ''; position: absolute; left: 0; top: 3px; bottom: 3px;
  width: 4px; border-radius: 3px;
  background: linear-gradient(180deg, #2d8f72 0%, #8fd4bb 100%);
}
.fa-card-bd h2:first-child { margin-top: 0; }
.fa-card-bd h3, .fa-card-bd h4 {
  font-size: 13px; font-weight: 800; color: #17614e; margin: 16px 0 8px;
}

/* 首节结论：整段放大 + 左侧金条，让"一句话结论"真的像结论 */
.fa-card-bd .fa-lead {
  position: relative;
  margin: 0 0 4px; padding: 14px 15px;
  background: linear-gradient(135deg, #fffaf0 0%, #fff 100%);
  border: 1px solid #f2e2c4; border-radius: 14px;
  font-size: 14.5px; line-height: 1.75; font-weight: 600; color: #4a3520;
}
.fa-card-bd .fa-lead strong { color: #b45309; font-weight: 800; }

.fa-card-bd ul, .fa-card-bd ol { margin: 0 0 12px; padding-left: 20px; }
.fa-card-bd li { margin: 6px 0; }

/* 风险行：按红/黄/绿给底色与左侧色条 */
.fa-card-bd .fa-risk {
  position: relative;
  margin: 0 0 9px; padding: 11px 13px 11px 15px;
  border-radius: 12px; font-size: 13.5px; line-height: 1.7;
  background: #f7fbfa; border: 1px solid #e2efea;
}
.fa-card-bd .fa-risk::before {
  content: ''; position: absolute; left: 0; top: 9px; bottom: 9px;
  width: 3px; border-radius: 3px; background: #b9d6cb;
}
.fa-card-bd .fa-risk.high { background: #fef5f4; border-color: #fadbd6; }
.fa-card-bd .fa-risk.high::before { background: #e5484d; }
.fa-card-bd .fa-risk.mid { background: #fffbf3; border-color: #f5e6c8; }
.fa-card-bd .fa-risk.mid::before { background: #d99a2b; }
.fa-card-bd .fa-risk.ok { background: #f5fbf8; border-color: #d9ebe3; }
.fa-card-bd .fa-risk.ok::before { background: #2d8f72; }

/* 表格：手机端窄，最多 4 列，横向可滚 */
.fa-tablewrap { margin: 0 0 14px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.fa-card-bd table {
  border-collapse: collapse; width: 100%; font-size: 12.5px;
  font-variant-numeric: tabular-nums;
}
.fa-card-bd th, .fa-card-bd td {
  border: 1px solid #e2efea; padding: 8px 10px; text-align: left;
  line-height: 1.6; white-space: nowrap;
}
.fa-card-bd th { background: #f2faf7; color: #17614e; font-weight: 800; }
.fa-card-bd td { color: var(--text); }
.fa-card-bd tr:nth-child(even) td { background: #fafdfc; }

.fa-card-bd code {
  background: #f0faf6; color: #17614e;
  padding: 1px 5px; border-radius: 5px; font-size: 12.5px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.fa-card-bd hr { border: none; border-top: 1px solid #e8f2ee; margin: 16px 0; }

/* 报告底部动作条 */
.fa-actions {
  display: flex; gap: 9px; padding: 14px 0 16px; margin-top: 10px;
  border-top: 1px solid #eef6f2;
}
.fa-act {
  flex: 1 1 0; border: 1px solid #d5e9e1; background: #fff; color: #17614e;
  font-size: 12.5px; font-weight: 700; font-family: inherit;
  padding: 10px 8px; border-radius: 12px; cursor: pointer;
}
.fa-act:active { transform: scale(.97); }
@media (hover: hover) { .fa-act:hover { background: #f2faf7; } }

/* 流式光标 */
.fa-caret {
  display: inline-block; width: 7px; height: 15px; vertical-align: -2px;
  margin-left: 2px; background: #2d8f72;
  animation: faBlink .9s step-end infinite;
}
@keyframes faBlink { 0%, 100% { opacity: 1 } 50% { opacity: 0 } }

/* 错误条 */
.fa-err {
  margin-top: 12px; padding: 11px 14px; border-radius: 12px;
  background: #fef2f2; border: 1px solid #fecaca; color: #b91c1c;
  font-size: 12.5px; line-height: 1.65;
}

/* ===================== ⑥ 追问区 ===================== */
.fa-ask { margin-top: 6px; }
.fa-ask[hidden] { display: none !important; }
.fa-ask-hd {
  display: flex; align-items: center; gap: 8px; margin-bottom: 12px;
  font-size: 13px; font-weight: 800; color: #17614e;
}
.fa-ask-hd .fa-ask-line { flex: 1 1 auto; height: 1px; background: #dceee7; }

.fa-body { display: flex; flex-direction: column; gap: 14px; padding-bottom: 8px; }
.fa-msg { display: flex; gap: 9px; align-items: flex-start; }
.fa-msg-avatar {
  flex: 0 0 auto; width: 30px; height: 30px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center; font-size: 15px;
  background: linear-gradient(135deg, #2d8f72 0%, #10493a 100%);
}
.fa-bubble {
  max-width: calc(100% - 44px);
  padding: 12px 14px; border-radius: 14px;
  font-size: 14px; line-height: 1.75;
  word-break: break-word; overflow-wrap: anywhere;
}
.fa-msg.ai .fa-bubble {
  background: #fff; border: 1px solid #e2efea; border-top-left-radius: 5px;
  color: var(--text); box-shadow: 0 2px 8px rgba(16, 73, 58, .05);
}
.fa-msg.me { flex-direction: row-reverse; }
.fa-msg.me .fa-bubble {
  background: linear-gradient(135deg, #2d8f72 0%, #17614e 100%);
  color: #fff; border-top-right-radius: 5px;
  box-shadow: 0 4px 12px rgba(16, 73, 58, .22);
}
.fa-bubble p { margin: 0 0 10px; }
.fa-bubble p:last-child { margin-bottom: 0; }
.fa-bubble strong { font-weight: 800; }
.fa-msg.ai .fa-bubble strong { color: #0f3a30; }
.fa-bubble h3, .fa-bubble h4 { font-size: 13.5px; font-weight: 800; margin: 13px 0 7px; color: #17614e; }
.fa-bubble h3:first-child, .fa-bubble h4:first-child { margin-top: 0; }
.fa-bubble ul, .fa-bubble ol { margin: 0 0 10px; padding-left: 20px; }
.fa-bubble li { margin: 5px 0; }
.fa-bubble code {
  background: #f0faf6; color: #17614e; padding: 1px 5px; border-radius: 5px;
  font-size: 12.5px; font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}
.fa-msg.me .fa-bubble code { background: rgba(255, 255, 255, .22); color: #fff; }
.fa-bubble .fa-risk { padding: 9px 12px 9px 14px; border-radius: 10px; margin-bottom: 8px; }
.fa-bubble .fa-tablewrap { margin-bottom: 12px; }

/* 思考中三点 */
.fa-dots { display: inline-flex; gap: 4px; align-items: center; height: 18px; }
.fa-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: #7dc4ab;
  animation: faDot 1.1s infinite ease-in-out;
}
.fa-dots i:nth-child(2) { animation-delay: .16s; }
.fa-dots i:nth-child(3) { animation-delay: .32s; }
@keyframes faDot {
  0%, 80%, 100% { transform: scale(.6); opacity: .45; }
  40% { transform: scale(1); opacity: 1; }
}

/* 快捷追问 */
.fa-chips.quick { margin-top: 12px; }

/* 输入区：粘在 TabBar 上方（74px = TabBar 实测高度） */
.fa-composer {
  position: sticky; bottom: 74px; z-index: 40;
  margin: 14px -16px 0; padding: 10px 16px;
  background: rgba(249, 253, 251, .96);
  backdrop-filter: blur(10px);
  border-top: 1px solid #dceee7;
}
.fa-composer[hidden] { display: none !important; }
@media (min-width: 1024px) {
  .fa-composer { bottom: 0; margin-left: 0; margin-right: 0; border-radius: 14px; border: 1px solid #dceee7; }
}
.fa-composer-row { display: flex; gap: 9px; align-items: flex-end; }
.fa-input {
  flex: 1 1 auto; min-width: 0;
  border: 1px solid #cfe6dd; border-radius: 14px; background: #fff;
  padding: 11px 13px; font-size: 14px; line-height: 1.6;
  font-family: inherit; color: var(--text);
  resize: none; max-height: 132px; overflow-y: auto;
  outline: none; transition: border-color .15s ease;
}
.fa-input:focus { border-color: #6fbba3; }
.fa-input::placeholder { color: #a9c2ba; }
.fa-send {
  flex: 0 0 auto; width: 52px; height: 44px; border-radius: 14px; border: none;
  background: linear-gradient(135deg, #ff8845 0%, #f94400 100%);
  color: #fff; font-size: 13px; font-weight: 800; font-family: inherit;
  cursor: pointer; box-shadow: 0 5px 13px rgba(249, 89, 1, .3);
}
.fa-send:disabled { opacity: .45; box-shadow: none; cursor: not-allowed; }
.fa-send:active:not(:disabled) { transform: scale(.96); }
.fa-tip { margin-top: 7px; font-size: 11px; color: #9db5ac; text-align: center; }

/* 底部免责声明（与全站其它子页口径一致） */
.fa-disclaimer {
  margin-top: 18px; padding-top: 14px; border-top: 1px solid #eef6f2;
  font-size: 11px; color: #a0b3ab; line-height: 1.7;
}

/* 轻提示（多选超限、复制失败等），不做弹窗 */
.fa-toast {
  position: fixed; left: 50%; bottom: 130px; transform: translateX(-50%);
  z-index: 90; max-width: 300px;
  padding: 10px 15px; border-radius: 12px;
  background: rgba(16, 73, 58, .94); color: #fff;
  font-size: 12.5px; line-height: 1.6; text-align: center;
  box-shadow: 0 8px 22px rgba(16, 73, 58, .3);
}
.fa-toast[hidden] { display: none !important; }
