/* ============================================================
   职业规划模块样式 - career.css
   集成自「人格测试与知识技能树」（知藤 · Trellis）平台
   配色与版式对齐知择教育志愿填报辅助系统（深色侧栏 + 浅色内容区）
   ============================================================ */

:root {
  --cf-primary: #4f46e5;
  --cf-primary-dark: #4338ca;
  --cf-primary-light: #eef2ff;
  --cf-success: #10b981;
  --cf-warning: #f59e0b;
  --cf-danger: #ef4444;
  --cf-text: #1e293b;
  --cf-text-2: #475569;
  --cf-text-muted: #94a3b8;
  --cf-border: #e2e8f0;
  --cf-bg: #f8fafc;
  --cf-card: #ffffff;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body.cf-body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
  color: var(--cf-text);
  background: var(--cf-bg);
  min-height: 100vh;
}

/* ---------------- 侧边栏（与知择各页一致） ---------------- */
.cf-sidebar {
  width: 260px; background: #0f172a; color: #e2e8f0;
  position: fixed; top: 0; left: 0; height: 100vh;
  overflow-y: auto; z-index: 100; display: flex; flex-direction: column;
}
.cf-sidebar-header { padding: 24px 20px; border-bottom: 1px solid rgba(255,255,255,.08); }
.cf-sidebar-logo { width: 44px; height: 44px; border-radius: 10px; background: #1e293b;
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px; overflow: hidden; }
.cf-sidebar-logo img { width: 100%; height: 100%; object-fit: contain; }
.cf-sidebar-title { font-size: 17px; font-weight: 600; color: #f8fafc; }
.cf-sidebar-subtitle { font-size: 12px; color: #94a3b8; margin-top: 2px; }
.cf-sidebar-nav { flex: 1; padding: 12px 0; }
.cf-nav-label { padding: 10px 20px 4px; font-size: 11px; color: #64748b;
  text-transform: uppercase; letter-spacing: .5px; }
.cf-nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 11px 20px; color: #cbd5e1; text-decoration: none;
  font-size: 14px; transition: background .18s, color .18s;
  border-left: 3px solid transparent; cursor: pointer;
}
.cf-nav-item:hover { background: rgba(255,255,255,.06); color: #f8fafc; }
.cf-nav-item.active { background: rgba(79,70,229,.22); color: #fff;
  border-left-color: var(--cf-primary); font-weight: 600; }
.cf-nav-item .cf-ico { width: 18px; text-align: center; flex-shrink: 0; }

/* ---------------- 主内容区 ---------------- */
.cf-main { margin-left: 260px; padding: 28px 32px 64px; min-height: 100vh; }
.cf-page-header { margin-bottom: 24px; }
.cf-page-header h1 { font-size: 26px; font-weight: 700; color: #0f172a; margin-bottom: 6px; }
.cf-page-header p { font-size: 14px; color: var(--cf-text-2); }

/* ---------------- 卡片 ---------------- */
.cf-card {
  background: var(--cf-card); border-radius: 12px; padding: 22px 24px;
  box-shadow: 0 1px 3px rgba(15,23,42,.07); margin-bottom: 18px;
  border: 1px solid var(--cf-border);
}
.cf-card h2 { font-size: 18px; font-weight: 650; margin-bottom: 6px; color: #0f172a; }
.cf-card h3 { font-size: 15px; font-weight: 600; margin: 16px 0 8px; color: #0f172a; }
.cf-card-sub { font-size: 13px; color: var(--cf-text-muted); margin-bottom: 14px; }

/* ---------------- 按钮 ---------------- */
.cf-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 20px; border-radius: 8px; border: none; cursor: pointer;
  font-size: 14px; font-weight: 550; font-family: inherit;
  background: var(--cf-primary); color: #fff; transition: background .18s, transform .1s;
}
.cf-btn:hover:not(:disabled) { background: var(--cf-primary-dark); }
.cf-btn:active:not(:disabled) { transform: translateY(1px); }
.cf-btn:disabled { opacity: .5; cursor: not-allowed; }
.cf-btn-plain { background: #fff; color: var(--cf-text-2); border: 1px solid var(--cf-border); }
.cf-btn-plain:hover:not(:disabled) { background: #f1f5f9; color: var(--cf-text); }
.cf-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 16px; }

/* ---------------- 提示条 ---------------- */
.cf-notice { background: var(--cf-primary-light); border-left: 3px solid var(--cf-primary);
  padding: 10px 14px; border-radius: 6px; font-size: 13px; color: #3730a3; margin: 10px 0; }
.cf-disclaimer { background: #fffbeb; border-left: 3px solid var(--cf-warning);
  padding: 10px 14px; border-radius: 6px; font-size: 12.5px; color: #92400e;
  line-height: 1.65; margin: 10px 0; }
.cf-loading { color: var(--cf-text-muted); font-size: 13px; padding: 8px 0; }

/* ---------------- 进度条 ---------------- */
.cf-progress-wrap { position: sticky; top: 0; z-index: 20;
  background: rgba(248,250,252,.96); backdrop-filter: blur(6px);
  padding: 12px 0; margin-bottom: 14px; }
.cf-progress-bar { height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.cf-progress-fill { height: 100%; width: 0; border-radius: 99px;
  background: linear-gradient(90deg, var(--cf-primary), #818cf8); transition: width .25s; }
.cf-progress-meta { display: flex; justify-content: space-between;
  font-size: 12.5px; color: var(--cf-text-2); margin-top: 6px; }

/* ---------------- 题目卡 ---------------- */
.cf-question-card { background: #fff; border: 1px solid var(--cf-border);
  border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; transition: border-color .2s; }
.cf-question-card.answered { border-color: #a5b4fc; }
.cf-question-head { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 12px; }
.cf-question-no { flex-shrink: 0; width: 24px; height: 24px; border-radius: 6px;
  background: var(--cf-primary-light); color: var(--cf-primary);
  font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
.cf-question-text { flex: 1; font-size: 14.5px; line-height: 1.6; color: var(--cf-text); }
.cf-question-dim { flex-shrink: 0; font-size: 11px; color: var(--cf-text-muted);
  background: #f1f5f9; padding: 3px 8px; border-radius: 99px; }
.cf-likert { display: flex; gap: 8px; flex-wrap: wrap; }
.cf-likert label {
  flex: 1 1 96px; min-width: 96px; display: flex; align-items: center; gap: 6px;
  padding: 9px 10px; border: 1px solid var(--cf-border); border-radius: 8px;
  cursor: pointer; font-size: 12.5px; color: var(--cf-text-2);
  transition: all .16s; user-select: none;
}
.cf-likert label:hover { border-color: #a5b4fc; background: #fafaff; }
.cf-likert label.checked { border-color: var(--cf-primary); background: var(--cf-primary-light);
  color: var(--cf-primary-dark); font-weight: 600; }
.cf-likert input { display: none; }

/* ---------------- 结果：类型横幅 ---------------- */
.cf-type-banner { display: flex; gap: 20px; flex-wrap: wrap; align-items: center;
  background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff;
  border-radius: 12px; padding: 22px 24px; margin-bottom: 18px; }
.cf-type-code { font-size: 40px; font-weight: 800; letter-spacing: 2px; line-height: 1; }
.cf-type-name { font-size: 15px; opacity: .95; margin-top: 6px; }
.cf-tag { display: inline-block; background: rgba(255,255,255,.2); color: #fff;
  font-size: 12px; padding: 3px 10px; border-radius: 99px; margin: 4px 6px 0 0; }
.cf-tag-grey { background: #f1f5f9; color: var(--cf-text-2); }

/* ---------------- 结果：维度条 ---------------- */
.cf-dim-row { margin-bottom: 16px; }
.cf-dim-row-head { display: flex; justify-content: space-between;
  font-size: 13.5px; margin-bottom: 6px; }
.cf-dim-track { display: flex; height: 26px; border-radius: 8px; overflow: hidden; }
.cf-dim-side { display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 600; color: #fff; transition: width .5s; }
.cf-dim-left { background: var(--cf-primary); }
.cf-dim-right { background: #94a3b8; }
.cf-dim-clarity { font-size: 12px; color: var(--cf-text-muted); margin-top: 4px; }

/* ---------------- 因子得分条 ---------------- */
.cf-factor-bars { margin: 10px 0; }
.cf-factor-item { display: flex; align-items: center; gap: 10px; font-size: 12.5px; margin-bottom: 7px; }
.cf-factor-name { width: 62px; flex-shrink: 0; color: var(--cf-text-2); }
.cf-factor-track { flex: 1; height: 8px; background: #e2e8f0; border-radius: 99px; overflow: hidden; }
.cf-factor-fill { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #6366f1, #a5b4fc); }
.cf-factor-val { width: 40px; text-align: right; color: var(--cf-text-muted); flex-shrink: 0; }

/* ---------------- 职业卡 ---------------- */
.cf-occ-card { border: 1px solid var(--cf-border); border-radius: 10px;
  padding: 16px 18px; margin-bottom: 12px; background: #fff; }
.cf-occ-head { display: flex; justify-content: space-between; align-items: flex-start;
  gap: 12px; margin-bottom: 8px; }
.cf-occ-rank { font-size: 12px; color: var(--cf-text-muted); }
.cf-occ-title { font-size: 16px; font-weight: 650; color: #0f172a; }
.cf-occ-score { text-align: right; flex-shrink: 0; }
.cf-occ-score-val { font-size: 22px; font-weight: 750; color: var(--cf-primary); line-height: 1; }
.cf-occ-band { font-size: 11.5px; padding: 2px 8px; border-radius: 99px;
  display: inline-block; margin-top: 4px; background: var(--cf-primary-light); color: var(--cf-primary-dark); }
.cf-occ-summary { font-size: 13px; color: var(--cf-text-2); line-height: 1.65; margin: 6px 0; }
.cf-occ-meta { font-size: 12px; color: var(--cf-text-muted); margin-top: 6px; }
.cf-reasons { margin: 8px 0 0 18px; font-size: 12.5px; color: var(--cf-text-2); line-height: 1.7; }
.cf-cautions { margin: 8px 0 0 18px; font-size: 12.5px; color: #b45309; line-height: 1.7; }

/* ---------------- 资料出处 ---------------- */
.cf-sources { margin-top: 12px; padding-top: 12px; border-top: 1px dashed var(--cf-border); }
.cf-sources-title { font-size: 12px; font-weight: 600; color: var(--cf-text-2); margin-bottom: 8px; }
.cf-source-item { display: flex; gap: 8px; margin-bottom: 8px; align-items: flex-start; }
.cf-source-tier { flex-shrink: 0; font-size: 10.5px; padding: 2px 7px;
  border-radius: 4px; background: #f1f5f9; color: var(--cf-text-2); }
.cf-source-main { font-size: 12px; line-height: 1.6; }
.cf-source-main a { color: var(--cf-primary); text-decoration: none; }
.cf-source-main a:hover { text-decoration: underline; }
.cf-source-org, .cf-source-used { color: var(--cf-text-muted); font-size: 11.5px; }

/* ---------------- 表单 ---------------- */
.cf-field { margin-bottom: 16px; }
.cf-field > label { display: block; font-size: 13.5px; font-weight: 600;
  color: var(--cf-text); margin-bottom: 7px; }
.cf-field .cf-hint { font-size: 12px; color: var(--cf-text-muted); margin-bottom: 8px; }
.cf-input, .cf-select, .cf-textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--cf-border);
  border-radius: 8px; font-size: 13.5px; font-family: inherit;
  color: var(--cf-text); background: #fff; transition: border-color .18s;
}
.cf-input:focus, .cf-select:focus, .cf-textarea:focus {
  outline: none; border-color: var(--cf-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.1); }
.cf-textarea { resize: vertical; min-height: 68px; }
.cf-grid-2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }

/* ---------------- 选项 chips ---------------- */
.cf-chip-group-title { font-size: 12px; font-weight: 600; color: var(--cf-text-2);
  margin: 10px 0 6px; }
.cf-chips { display: flex; flex-wrap: wrap; gap: 7px; }
.cf-chip { padding: 6px 13px; border: 1px solid var(--cf-border); border-radius: 99px;
  font-size: 12.5px; color: var(--cf-text-2); cursor: pointer;
  background: #fff; transition: all .16s; user-select: none; }
.cf-chip:hover { border-color: #a5b4fc; background: #fafaff; }
.cf-chip.checked { background: var(--cf-primary); border-color: var(--cf-primary);
  color: #fff; font-weight: 550; }

/* ---------------- 步骤指示 ---------------- */
.cf-steps { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.cf-step { flex: 1 1 190px; border: 1px solid var(--cf-border); border-radius: 10px;
  padding: 14px 16px; background: #fff; }
.cf-step-no { font-size: 12px; font-weight: 700; color: var(--cf-primary);
  background: var(--cf-primary-light); width: 22px; height: 22px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center; margin-bottom: 8px; }
.cf-step h4 { font-size: 14px; margin-bottom: 4px; color: #0f172a; }
.cf-step p { font-size: 12.5px; color: var(--cf-text-muted); line-height: 1.6; }
.cf-step.active { border-color: var(--cf-primary); box-shadow: 0 0 0 3px rgba(79,70,229,.08); }

/* ---------------- 统计小卡 ---------------- */
.cf-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; }
.cf-stat { background: #fff; border: 1px solid var(--cf-border); border-radius: 10px;
  padding: 16px; text-align: center; }
.cf-stat-val { font-size: 26px; font-weight: 750; color: var(--cf-primary); line-height: 1.1; }
.cf-stat-label { font-size: 12.5px; color: var(--cf-text-muted); margin-top: 6px; }

/* ---------------- 空状态 ---------------- */
.cf-empty { text-align: center; padding: 44px 20px; color: var(--cf-text-muted); }
.cf-empty-ico { font-size: 38px; margin-bottom: 10px; opacity: .5; }
.cf-empty p { font-size: 13.5px; margin-bottom: 16px; }

/* ---------------- 响应式 ---------------- */
@media (max-width: 900px) {
  .cf-sidebar { transform: translateX(-100%); transition: transform .24s; }
  .cf-sidebar.open { transform: translateX(0); }
  .cf-main { margin-left: 0; padding: 20px 16px 56px; }
  .cf-type-code { font-size: 32px; }
}

/* ---------------- 夜间模式 ---------------- */
body.cf-dark { background: #0b1120; color: #e2e8f0; }
body.cf-dark .cf-card, body.cf-dark .cf-question-card, body.cf-dark .cf-occ-card,
body.cf-dark .cf-step, body.cf-dark .cf-stat { background: #111c33; border-color: #1e293b; }
body.cf-dark .cf-card h2, body.cf-dark .cf-card h3, body.cf-dark .cf-page-header h1,
body.cf-dark .cf-occ-title, body.cf-dark .cf-question-text, body.cf-dark .cf-step h4 { color: #f1f5f9; }
body.cf-dark .cf-input, body.cf-dark .cf-select, body.cf-dark .cf-textarea,
body.cf-dark .cf-chip, body.cf-dark .cf-likert label { background: #0b1120; border-color: #1e293b; color: #cbd5e1; }
body.cf-dark .cf-chip.checked, body.cf-dark .cf-likert label.checked {
  background: var(--cf-primary); border-color: var(--cf-primary); color: #fff; }
body.cf-dark .cf-btn-plain { background: #111c33; color: #cbd5e1; border-color: #1e293b; }
body.cf-dark .cf-notice { background: rgba(79,70,229,.18); color: #c7d2fe; }
body.cf-dark .cf-disclaimer { background: rgba(245,158,11,.14); color: #fcd34d; }
body.cf-dark .cf-progress-wrap { background: rgba(11,17,32,.94); }
body.cf-dark .cf-progress-bar { background: #1e293b; }
