/* 伯聘电脑端首页 · AI 能力模块（仅 home.php 使用） */

/* ---------- 搜索框内的 AI 按钮 ---------- */
.h-page-search .h-ai-search-btn {
  flex: none; height: 42px; padding: 0 16px; border: 0; border-radius: 8px;
  background: linear-gradient(135deg, #20d16b, #07a653); color: #fff;
  font-size: 13.5px; font-weight: 600; white-space: nowrap; cursor: pointer;
  box-shadow: 0 4px 12px rgba(7,193,96,.28);
}
.h-page-search .h-ai-search-btn span { font-size: 15px; margin-right: 3px; }
.h-page-search .h-ai-search-btn:hover { filter: brightness(1.07); }

/* ---------- 搜索结果卡片 ---------- */
.h-ai-search-box {
  position: relative; z-index: 5; max-width: 720px; margin-top: 12px;
  background: #fff; border-radius: 12px; box-shadow: 0 12px 34px rgba(0, 24, 12, .22);
  overflow: hidden; text-align: left;
}
.h-ai-search-box[hidden] { display: none; }
.h-ai-search-bar {
  display: flex; align-items: center; gap: 10px; padding: 10px 16px;
  background: linear-gradient(90deg, #eafaf1, #f2faf5); border-bottom: 1px solid #e8e6f6;
  font-size: 13px;
}
.h-ai-search-bar b { color: #07a653; font-size: 13.5px; }
.h-ai-search-bar span { color: #8b9790; font-size: 12px; }
.h-ai-search-bar button {
  margin-left: auto; border: 0; background: transparent; color: #8b9790;
  font-size: 12.5px; cursor: pointer;
}
.h-ai-search-bar button:hover { color: #07a653; }
.h-ai-search-body { padding: 14px 16px 16px; max-height: 460px; overflow-y: auto; }
.h-ai-loading { color: #8b9790; font-size: 13.5px; padding: 12px 2px; }
.h-ai-explain {
  background: #eefaf3; border-left: 3px solid #07a653; border-radius: 0 8px 8px 0;
  padding: 9px 12px; font-size: 12.8px; color: #3f5147; line-height: 1.7; margin-bottom: 12px;
}
.h-ai-explain b { color: #07a653; }
.h-ai-result-title { font-size: 12.5px; color: #8b9790; margin-bottom: 9px; }
.h-ai-result-title b { color: #07a653; font-size: 14px; }
.h-ai-jobs { display: grid; grid-template-columns: repeat(2, 1fr); gap: 9px; }
.h-ai-job {
  display: block; position: relative; padding: 11px 13px; border: 1px solid #e6eaf0;
  border-radius: 9px; text-decoration: none; transition: border-color .15s, box-shadow .15s;
}
.h-ai-job:hover { border-color: #7b8cff; box-shadow: 0 4px 14px rgba(7,193,96,.12); }
.h-ai-job-t { display: block; font-size: 14px; font-weight: 600; color: #17231d; padding-right: 84px; }
.h-ai-job-sal {
  position: absolute; top: 11px; right: 13px; color: #e2553d; font-weight: 700; font-size: 13px;
}
.h-ai-job-meta { display: block; margin-top: 5px; font-size: 12px; color: #98a29c; }
.h-ai-none { font-size: 13px; color: #8b9790; line-height: 1.8; }
.h-ai-none a, .h-ai-more { color: #07a653; text-decoration: none; }
.h-ai-more { display: inline-block; margin-top: 12px; font-size: 13px; font-weight: 600; }
.h-ai-job-meta em { display: block; margin-top: 4px; font-style: normal; color: #07a653; font-size: 11.8px; }

/* 人岗匹配分数 */
.h-ai-job-match { padding-left: 58px !important; min-height: 62px; }
.h-ai-match-score {
  position: absolute; left: 12px; top: 50%; margin-top: -19px;
  width: 38px; height: 38px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #20d16b, #07a653); color: #fff; font-size: 15px; font-weight: 700;
}
.h-ai-match-box { margin-bottom: 14px; }

/* ---------- 左侧筛选栏 AI 引导卡（职位大厅） ---------- */
.h-filter-ai {
  background: linear-gradient(135deg, #eefaf3, #f2faf5); border: 1px solid #c9ecd7; border-radius: 12px;
  padding: 16px 15px; margin-bottom: 16px;
}
.h-filter-ai-hd { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #0a8f4b; }
.h-filter-ai-hd span { font-size: 17px; }
.h-filter-ai p { margin: 8px 0 12px; font-size: 12px; line-height: 1.7; color: #7d8a83; }
.h-filter-ai button {
  display: block; width: 100%; margin-bottom: 8px; padding: 9px; border: 0; border-radius: 8px; cursor: pointer;
  background: linear-gradient(135deg, #20d16b, #07a653); color: #fff; font-size: 12.8px; font-weight: 600;
}
.h-filter-ai button:hover { filter: brightness(1.06); }
.h-filter-ai button.h-filter-ai-match { background: #fff; color: #07a653; border: 1px solid #c9ecd7; }
.h-filter-ai > a { font-size: 12px; color: #07a653; text-decoration: none; }
.h-filter-ai > a:hover { text-decoration: underline; }

/* ---------- 职位详情页 · AI 匹配度卡片 ---------- */
.h-jd-ai-card {
  background: #fff; border: 1px solid #c9ecd7; border-radius: 12px; padding: 16px 15px; margin-bottom: 16px;
  box-shadow: 0 2px 10px rgba(10,143,75,.06);
}
.h-jd-ai-hd { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: #0a8f4b; margin-bottom: 13px; }
.h-jd-ai-hd span { font-size: 17px; }
.h-jd-ai-loading, .h-jd-ai-hint { font-size: 12.5px; color: #8b9790; line-height: 1.7; }
.h-jd-ai-link { display: inline-block; margin-top: 8px; font-size: 12.5px; color: #07a653; text-decoration: none; }
.h-jd-ai-link:hover { text-decoration: underline; }
.h-jd-ai-score { display: flex; align-items: center; gap: 13px; }
.h-jd-ai-ring {
  flex: none; width: 66px; height: 66px; border-radius: 50%; position: relative;
  background: conic-gradient(#20d16b calc(var(--p) * 1%), #eafaf1 0);
  display: flex; flex-direction: column; align-items: center; justify-content: center; color: #0a8f4b;
}
.h-jd-ai-ring::before { content: ""; position: absolute; inset: 6px; background: #fff; border-radius: 50%; }
.h-jd-ai-ring b, .h-jd-ai-ring small { position: relative; }
.h-jd-ai-ring b { font-size: 20px; line-height: 1; }
.h-jd-ai-ring small { font-size: 10px; color: #8b9790; margin-top: 3px; }
.h-jd-ai-level b { display: block; font-size: 14px; color: #1d3327; }
.h-jd-ai-level span { display: block; margin-top: 4px; font-size: 11.8px; line-height: 1.6; color: #8b9790; }
.h-jd-ai-dims { margin-top: 13px; }
.h-jd-ai-dim { display: flex; align-items: center; gap: 7px; margin-bottom: 6px; font-size: 11.5px; color: #7d8a83; }
.h-jd-ai-dim > span { width: 56px; flex: none; }
.h-jd-ai-dim > i { flex: 1; height: 6px; background: #eafaf1; border-radius: 4px; overflow: hidden; }
.h-jd-ai-dim > i em { display: block; height: 100%; background: linear-gradient(90deg, #20d16b, #07a653); border-radius: 4px; }
.h-jd-ai-dim > u { width: 34px; text-align: right; text-decoration: none; flex: none; color: #8b9790; }
.h-jd-ai-tags { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 9px; }
.h-jd-ai-tags span { font-size: 11px; padding: 4px 8px; border-radius: 6px; line-height: 1.4; }
.h-jd-ai-tags span.ok { background: #eef8f2; color: #0a8f5b; }
.h-jd-ai-tags span.gap { background: #fff6ee; color: #b3641a; }
.h-jd-ai-talent { display: block; padding: 10px 0; border-bottom: 1px dashed #eafaf1; }
.h-jd-ai-talent:last-child { border-bottom: none; }
.h-jd-ai-talent:hover .h-jd-ai-talent-hd b { color: #07a653; }
.h-jd-ai-talent-hd { display: flex; align-items: center; gap: 7px; }
.h-jd-ai-talent-hd b { font-size: 13px; color: #25332b; }
.h-jd-ai-talent-hd em { font-style: normal; font-size: 11.5px; color: #8b9790; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-jd-ai-talent-score { flex: none; font-size: 11px; font-weight: 700; color: #fff; background: linear-gradient(135deg, #20d16b, #07a653); padding: 2px 7px; border-radius: 10px; }
.h-jd-ai-talent-meta { margin-top: 4px; font-size: 11.5px; color: #98a29c; }
.h-jd-ai-talent-why { margin-top: 4px; font-size: 11.5px; line-height: 1.5; color: #7d8a83; }

/* ---------- 企业职位优化卡 ---------- */
.h-jd-ai-actions { display: flex; gap: 8px; margin-top: 12px; padding-top: 11px; border-top: 1px solid #eef2f0; }
.h-jd-ai-btn {
  flex: 1; padding: 8px 6px; border: 1px solid #c9ecd7; border-radius: 8px; cursor: pointer;
  background: #fff; color: #07a653; font-size: 12px; font-weight: 600;
}
.h-jd-ai-btn.primary { background: linear-gradient(135deg, #20d16b, #07a653); border-color: transparent; color: #fff; }
.h-jd-ai-btn:hover { filter: brightness(1.05); }
.h-jd-ai-btn[disabled] { opacity: .6; cursor: default; }
.h-jd-ai-advice { margin-top: 12px; padding-top: 11px; border-top: 1px solid #eef2f0; }
.h-jd-ai-advice > b { display: block; font-size: 12px; color: #0a8f4b; margin-bottom: 7px; }
.h-jd-ai-advice ol { margin: 0; padding-left: 16px; }
.h-jd-ai-advice li { font-size: 11.8px; line-height: 1.65; color: #7d8a83; margin-bottom: 5px; }
.h-jd-ai-rewrite { margin-top: 12px; padding-top: 10px; border-top: 1px solid #eef2f0; }
.h-jd-ai-rewrite-hd { display: flex; align-items: center; gap: 6px; margin-bottom: 7px; }
.h-jd-ai-rewrite-hd b { font-size: 12px; color: #0a8f4b; }
.h-jd-ai-rewrite-hd span { font-size: 10.5px; color: #8b9790; }
.h-jd-ai-rewrite-hd button {
  margin-left: auto; padding: 3px 9px; border: 1px solid #c9ecd7; border-radius: 6px;
  background: #fff; color: #07a653; font-size: 11px; cursor: pointer;
}
.h-jd-ai-rewrite textarea {
  width: 100%; min-height: 150px; box-sizing: border-box; resize: vertical;
  padding: 9px; border: 1px solid #eafaf1; border-radius: 8px; background: #f7faf8;
  font-size: 11.8px; line-height: 1.7; color: #3c5245;
}

/* ---------- 简历详情页 AI 卡 ---------- */
.h-rs-ai-advice { margin-top: 13px; padding-top: 11px; border-top: 1px solid #eef2f0; }
.h-rs-ai-advice > b { display: block; font-size: 12px; color: #0a8f4b; margin-bottom: 7px; }
.h-rs-ai-advice-item { display: flex; align-items: flex-start; gap: 7px; font-size: 11.8px; line-height: 1.65; color: #7d8a83; margin-bottom: 6px; }
.h-rs-ai-advice-item i { flex: none; width: 16px; height: 16px; line-height: 16px; text-align: center; font-style: normal; font-size: 10px; color: #20d16b; background: #eafaf1; border-radius: 50%; }
.h-rs-ai-job { display: block; padding: 10px 0; border-bottom: 1px dashed #eafaf1; }
.h-rs-ai-job:last-child { border-bottom: none; }
.h-rs-ai-job:hover .h-rs-ai-job-t span { color: #07a653; }
.h-rs-ai-job-t { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.h-rs-ai-job-t span { font-size: 13.5px; font-weight: 600; color: #25332b; }
.h-rs-ai-job-t b { font-size: 12.5px; color: #ff7a45; white-space: nowrap; }
.h-rs-ai-job-meta { margin-top: 3px; font-size: 11.5px; color: #98a29c; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-rs-ai-job-why { margin-top: 4px; font-size: 11.5px; line-height: 1.5; color: #8b9790; }
.h-rs-ai-job-why em { font-style: normal; font-weight: 700; color: #07a653; margin-right: 4px; }
.h-rs-ai-match-tip { font-size: 11px; color: #8b9790; margin-bottom: 8px; }
.h-rs-ai-match { padding: 9px 0; border-bottom: 1px dashed #eafaf1; }
.h-rs-ai-match:last-child { border-bottom: none; }
.h-rs-ai-match-top { display: flex; align-items: center; gap: 7px; }
.h-rs-ai-match-top b { font-size: 13px; color: #25332b; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.h-rs-ai-match-top:hover b { color: #07a653; }
.h-rs-ai-match-top em { margin-left: auto; font-style: normal; font-size: 12px; color: #ff7a45; white-space: nowrap; }
.h-rs-ai-match-meta { margin-top: 4px; font-size: 11.5px; color: #98a29c; }
.h-rs-ai-match-why { margin-top: 4px; font-size: 11.5px; line-height: 1.5; color: #7d8a83; }

/* ---------- AI 能力展示区块 ---------- */
.h-ai-section { padding: 40px 0 8px; }
.h-ai-hero {
  display: flex; align-items: center; gap: 40px; padding: 38px 44px; border-radius: 18px;
  background: linear-gradient(120deg, #063d28 0%, #0a6b42 48%, #0a8f4b 100%);
  color: #fff; position: relative; overflow: hidden;
}
.h-ai-hero::after {
  content: ""; position: absolute; width: 360px; height: 360px; border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%; right: -90px; top: -190px; box-shadow: 0 0 0 60px rgba(255,255,255,.025), 0 0 0 130px rgba(255,255,255,.015);
}
.h-ai-hero-copy { position: relative; flex: 1; min-width: 0; }
.h-ai-kicker { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; letter-spacing: 1px; color: #a8e6c5; font-weight: 700; }
.h-ai-kicker i { font-style: normal; font-size: 16px; }
.h-ai-hero-copy h2 { margin: 12px 0 10px; font-size: 27px; font-weight: 700; letter-spacing: .5px; }
.h-ai-hero-copy p { margin: 0; font-size: 13.8px; line-height: 1.85; color: rgba(255,255,255,.76); max-width: 560px; }
.h-ai-hero-btns { display: flex; align-items: center; gap: 14px; margin-top: 22px; }
.h-ai-primary {
  border: 0; cursor: pointer; padding: 11px 22px; border-radius: 9px; font-size: 14px; font-weight: 600;
  color: #fff; background: linear-gradient(135deg, #20d16b, #07a653); box-shadow: 0 6px 18px rgba(7,193,96,.34);
}
.h-ai-primary span { margin-right: 4px; }
.h-ai-primary:hover { filter: brightness(1.08); }
.h-ai-ghost {
  padding: 11px 16px; border-radius: 9px; font-size: 13.5px; color: #fff; text-decoration: none;
  border: 1px solid rgba(255,255,255,.32);
}
.h-ai-ghost:hover { background: rgba(255,255,255,.12); }

/* 右侧对话演示 */
.h-ai-hero-demo { position: relative; flex: 0 0 340px; background: rgba(255,255,255,.09); border: 1px solid rgba(255,255,255,.16); border-radius: 14px; padding: 16px; }
.h-ai-demo-q { background: #fff; color: #243247; border-radius: 10px 10px 10px 3px; padding: 10px 13px; font-size: 13px; line-height: 1.6; }
.h-ai-demo-a { margin-top: 12px; }
.h-ai-demo-line { font-size: 12px; line-height: 1.7; color: #b7e8cd; background: rgba(0,0,0,.16); border-radius: 8px; padding: 8px 11px; margin-bottom: 9px; }
.h-ai-demo-line b { color: #fff; }
.h-ai-demo-job { display: flex; justify-content: space-between; align-items: center; background: #fff; color: #243247; border-radius: 7px; padding: 7px 11px; margin-top: 6px; font-size: 12.5px; }
.h-ai-demo-job em { font-style: normal; color: #e2553d; font-weight: 700; }

/* 五项能力 */
.h-ai-feats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-top: 16px; }
.h-ai-feat { background: #fff; border: 1px solid #e9eef0; border-radius: 12px; padding: 16px 14px; text-align: center; }
.h-ai-feat-ico { display: block; font-size: 22px; margin-bottom: 6px; }
.h-ai-feat b { display: block; font-size: 14px; color: #17231d; }
.h-ai-feat p { margin: 5px 0 0; font-size: 11.8px; line-height: 1.6; color: #94a099; }

@media (max-width: 1024px) {
  .h-ai-hero { gap: 24px; padding: 30px 28px; }
  .h-ai-hero-demo { flex-basis: 280px; }
  .h-ai-feats { grid-template-columns: repeat(3, 1fr); }
}
/* 简历详情：个人信息卡靠左，与下方左栏内容同宽；右侧留给操作与 AI 卡片 */
.h-rs-profile-card { max-width: calc(100% - 336px); }
@media (max-width: 900px) {
  .h-rs-profile-card { max-width: 100%; }
}

@media (max-width: 760px) {
  .h-page-search { flex-wrap: wrap; height: auto; padding: 8px; }
  .h-page-search .h-ai-search-btn, .h-page-search button[type=submit] { flex: 1; }
  .h-ai-search-box { margin-top: 10px; }
  .h-ai-jobs { grid-template-columns: 1fr; }
  .h-ai-hero { flex-direction: column; align-items: stretch; padding: 26px 20px; }
  .h-ai-hero-copy h2 { font-size: 22px; }
  .h-ai-hero-demo { flex-basis: auto; }
  .h-ai-feats { grid-template-columns: repeat(2, 1fr); }
}

/* 职位大厅：AI 搜索说明 + AI 推荐双结果 */
.h-ai-search-note {
  display: flex; align-items: center; flex-wrap: wrap; gap: 6px 10px;
  margin: 0 0 12px; padding: 10px 13px;
  background: linear-gradient(100deg, #eafaf1, #f6fdf9);
  border: 1px solid #d9f1e4; border-radius: 10px;
  font-size: 12.5px; color: #4b5a52;
}
.h-ai-search-note b { color: #0a8f4b; }
.h-ai-search-note em { font-style: normal; color: #7d8a83; }
.h-ai-search-note small { margin-left: auto; color: #9aa5a0; font-size: 11px; }
.h-ai-rec-block {
  margin: 0 0 14px; border: 1px solid #d9f1e4; border-radius: 12px;
  overflow: hidden; background: #fff;
}
/* AI推荐：与普通职位列表同款卡片，改为分页浏览 */
.h-ai-rec-list { max-height: none; overflow: visible; }
.h-ai-rec-hd {
  display: flex; align-items: center; gap: 7px; padding: 11px 14px;
  background: linear-gradient(100deg, #eafaf1, #f6fdf9);
  border-bottom: 1px solid #e6f2ec;
}
.h-ai-rec-hd .h-ai-rec-logo {
  width: 20px; height: 20px; flex: none; border-radius: 6px;
  background: #07c160; color: #fff; font-size: 13px;
  display: inline-flex; align-items: center; justify-content: center;
}
.h-ai-rec-hd b { font-size: 14px; color: #123326; }
.h-ai-rec-hd > span:last-child { font-size: 11.5px; color: #7d8a83; }
/* AI推荐：原企业 logo 位置显示匹配分数 */
.h-ai-score-logo {
  background: linear-gradient(145deg, #0acb68, #079d50) !important;
  color: #fff !important; font-size: 13px !important; font-weight: 700;
  display: flex !important; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.1;
}
.h-ai-score-logo b { font-size: 21px; line-height: 1; }
.h-ai-score-logo small { font-size: 9px; font-weight: 400; margin-top: 1px; opacity: .9; }
.h-ai-score-badge {
  flex: none; padding: 1px 7px; border-radius: 4px;
  background: #eafaf1; color: #0a8f4b; font-size: 11px; font-weight: 700;
}
.h-ai-rec-src {
  display: inline-block; padding: 1px 6px;
  background: #eafaf1; color: #0a8f4b; border-radius: 5px;
  font-size: 10px; font-weight: 500;
}
.h-ai-reason { margin-top: 8px; font-size: 11.5px; color: #0a8f4b; }
.h-ai-reason i { margin-left: 6px; font-style: normal; color: #9aa5a0; }
/* ---------- 人才库 AI推荐卡片（home_talents.php） ---------- */
/* 头像位置显示匹配分数：覆盖 .htc-avatar 的尺寸与排布 */
.h-talent-card .htc-avatar.h-ai-score-logo {
  width: 46px; height: 46px; border-radius: 11px;
  background: linear-gradient(145deg, #0acb68, #079d50) !important;
  color: #fff !important; font-size: 13px !important; font-weight: 700;
  display: flex !important; flex-direction: column; align-items: center; justify-content: center;
  line-height: 1.1;
}
.h-talent-card .htc-avatar.h-ai-score-logo b { font-size: 20px; line-height: 1; }
.h-talent-card .htc-avatar.h-ai-score-logo small { font-size: 9px; font-weight: 400; opacity: .9; }
/* 来源标签放到卡片头部右侧（替代原状态标签位置） */
.h-talent-card .htc-hd .h-ai-rec-src { flex: none; margin-left: auto; }
.h-talent-card .h-ai-reason { margin: 9px 0 2px; }

@media (max-width: 760px) {
  .h-ai-search-note small { margin-left: 0; }
  .h-ai-rec-hd > span:last-child { flex-basis: 100%; }
}
