/* ==========================================================================
   爱招聘 · AI 招聘系统 — 设计系统
   ========================================================================== */
:root {
  --bg: #f5f6fb;
  --panel: #ffffff;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e7e9f2;
  --line-soft: #f0f2f8;
  --primary: #4f46e5;
  --primary-2: #6366f1;
  --primary-soft: #eef2ff;
  --violet: #8b5cf6;
  --green: #10b981;
  --green-soft: #ecfdf5;
  --amber: #f59e0b;
  --amber-soft: #fffbeb;
  --red: #ef4444;
  --red-soft: #fef2f2;
  --blue: #2563eb;
  --blue-soft: #eff6ff;
  --sidebar: #101728;
  --sidebar-2: #0b1120;
  --radius: 15px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 10px 30px -22px rgba(15, 23, 42, .28);
  --shadow-lg: 0 24px 70px -28px rgba(15, 23, 42, .38);
  --font: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", -apple-system,
          BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-size: 14px;
  line-height: 1.55;
}
a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
::selection { background: rgba(99, 102, 241, .18); }

::-webkit-scrollbar { width: 9px; height: 9px; }
::-webkit-scrollbar-thumb { background: #cfd5e4; border-radius: 9px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #b3bcd2; background-clip: content-box; }
::-webkit-scrollbar-track { background: transparent; }

/* ------------------------------- 启动 ------------------------------- */
.boot { height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; }
.boot-logo {
  width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-size: 24px; font-weight: 700;
  box-shadow: 0 18px 40px -18px rgba(99, 102, 241, .8);
  animation: pulse 1.6s ease-in-out infinite;
}
.boot-text { color: var(--muted); font-size: 13px; letter-spacing: .04em; }
@keyframes pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(.94); } }

/* ------------------------------- 布局 ------------------------------- */
.app { display: flex; min-height: 100vh; }

.sidebar {
  width: 238px; flex: 0 0 238px; position: sticky; top: 0; height: 100vh;
  background: linear-gradient(180deg, var(--sidebar) 0%, var(--sidebar-2) 100%);
  color: #aeb6d0; display: flex; flex-direction: column; z-index: 30;
}
.side-logo { display: flex; align-items: center; gap: 11px; padding: 22px 20px 18px; }
.logo-mark {
  width: 36px; height: 36px; border-radius: 11px; display: grid; place-items: center;
  background: linear-gradient(135deg, #6366f1, #8b5cf6); color: #fff; font-weight: 700; font-size: 17px;
  box-shadow: 0 10px 24px -10px rgba(99, 102, 241, .9);
}
.logo-text b { display: block; color: #fff; font-size: 15px; letter-spacing: .02em; }
.logo-text span { font-size: 11px; color: #6f7a99; letter-spacing: .12em; }

.side-nav { flex: 1; overflow-y: auto; padding: 6px 12px 12px; }
.nav-group { font-size: 10.5px; letter-spacing: .16em; color: #59617d; padding: 18px 10px 8px; text-transform: uppercase; }
.nav-item {
  display: flex; align-items: center; gap: 11px; padding: 9px 11px; border-radius: 9px;
  color: #a9b1cb; font-size: 13.5px; cursor: pointer; position: relative; margin-bottom: 2px;
  transition: background .16s, color .16s;
}
.nav-item svg { width: 17px; height: 17px; opacity: .78; }
.nav-item:hover { background: rgba(255, 255, 255, .05); color: #fff; }
.nav-item.active { background: rgba(99, 102, 241, .16); color: #fff; }
.nav-item.active::before {
  content: ""; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px;
  border-radius: 0 3px 3px 0; background: linear-gradient(180deg, #818cf8, #a78bfa);
}
.nav-item .nav-badge {
  margin-left: auto; font-size: 10.5px; background: #ef4444; color: #fff;
  border-radius: 20px; padding: 1px 6px; font-weight: 600;
}
.nav-item .nav-count { margin-left: auto; font-size: 11px; color: #6c7592; }

.side-foot { padding: 14px; border-top: 1px solid rgba(255, 255, 255, .06); }
.mode-card {
  background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 11px; padding: 11px 12px; margin-bottom: 12px;
}
.mode-card b { display: flex; align-items: center; gap: 6px; color: #e2e6f5; font-size: 12px; font-weight: 600; }
.mode-card span { display: block; color: #737d9c; font-size: 11px; margin-top: 4px; line-height: 1.5; }
.mode-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--amber); }
.mode-dot.on { background: #34d399; box-shadow: 0 0 0 3px rgba(52, 211, 153, .15); }

.side-user { display: flex; align-items: center; gap: 10px; cursor: pointer; border-radius: 10px; padding: 6px; }
.side-user:hover { background: rgba(255, 255, 255, .05); }
.side-user .meta { min-width: 0; }
.side-user .meta b { display: block; color: #e7eaf7; font-size: 12.5px; font-weight: 600; }
.side-user .meta span { display: block; color: #6c7592; font-size: 11px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  height: 62px; display: flex; align-items: center; gap: 16px; padding: 0 28px;
  background: rgba(255, 255, 255, .82); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
.crumb { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 7px; }
.crumb b { color: var(--ink); font-weight: 600; }
.top-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.icon-btn {
  width: 34px; height: 34px; border-radius: 9px; border: 1px solid transparent; background: transparent;
  display: grid; place-items: center; cursor: pointer; color: var(--muted); position: relative;
}
.icon-btn:hover { background: #f1f3fa; color: var(--ink); }
.icon-btn svg { width: 18px; height: 18px; }
.icon-btn .dot {
  position: absolute; top: 7px; right: 7px; width: 6px; height: 6px; border-radius: 50%;
  background: var(--red); border: 1.5px solid #fff;
}
.avatar {
  width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center;
  background: linear-gradient(135deg, #eef2ff, #e0e7ff); color: var(--primary);
  font-weight: 600; font-size: 12.5px; border: 1px solid #dfe4ff;
}
.avatar.lg { width: 42px; height: 42px; border-radius: 13px; font-size: 15px; }

.view { padding: 26px 28px 60px; max-width: 1360px; width: 100%; margin: 0 auto; animation: fade .22s ease; }
@keyframes fade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* ------------------------------- 页头 ------------------------------- */
.page-head { display: flex; align-items: flex-end; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 23px; font-weight: 700; letter-spacing: -.01em; margin: 0; line-height: 1.25; }
.page-sub { color: var(--muted); font-size: 13px; margin-top: 5px; }
.page-actions { margin-left: auto; display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.back-link { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); font-size: 12.5px; cursor: pointer; margin-bottom: 8px; }
.back-link:hover { color: var(--primary); }

/* ------------------------------- 按钮 ------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  height: 36px; padding: 0 14px; border-radius: 9px; border: 1px solid var(--line);
  background: #fff; color: var(--ink-2); font-size: 13px; font-weight: 500; cursor: pointer;
  transition: all .15s; white-space: nowrap;
}
.btn:hover { border-color: #d4d9e8; background: #fbfcff; }
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn svg { width: 15px; height: 15px; }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  border-color: transparent; color: #fff;
  box-shadow: 0 8px 20px -10px rgba(79, 70, 229, .8);
}
.btn-primary:hover { filter: brightness(1.05); background: linear-gradient(135deg, var(--primary), var(--primary-2)); }
.btn-soft { background: var(--primary-soft); color: var(--primary); border-color: transparent; }
.btn-soft:hover { background: #e6ebff; }
.btn-danger { color: var(--red); border-color: #fecaca; background: #fff; }
.btn-danger:hover { background: var(--red-soft); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f1f3fa; color: var(--ink); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12px; border-radius: 8px; }
.btn-lg { height: 42px; padding: 0 20px; font-size: 14px; border-radius: 11px; }
.btn-block { width: 100%; }
.btn-loading { position: relative; color: transparent !important; pointer-events: none; }
.btn-loading::after {
  content: ""; position: absolute; width: 15px; height: 15px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-soft.btn-loading::after, .btn-ghost.btn-loading::after { border-color: rgba(79,70,229,.25); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ------------------------------- 卡片 ------------------------------- */
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.card-head { display: flex; align-items: center; gap: 10px; padding: 16px 18px 0; }
.card-title { font-size: 14.5px; font-weight: 600; margin: 0; }
.card-sub { color: var(--muted); font-size: 12px; }
.card-body { padding: 16px 18px 18px; }
.card-foot { padding: 12px 18px; border-top: 1px solid var(--line-soft); display: flex; align-items: center; gap: 8px; }
.card-hover { transition: transform .18s, box-shadow .18s, border-color .18s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); border-color: #dfe3f0; }

.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.split { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 18px; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 16px; }

/* ------------------------------- 统计卡 ------------------------------- */
.stat { padding: 17px 18px; position: relative; overflow: hidden; }
.stat-label { color: var(--muted); font-size: 12.5px; display: flex; align-items: center; gap: 6px; }
.stat-value { font-size: 30px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; line-height: 1.1; }
.stat-value small { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 3px; }
.stat-delta { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; margin-top: 8px; color: var(--muted); }
.stat-delta.up { color: var(--green); }
.stat-delta.down { color: var(--red); }
.stat-icon {
  position: absolute; right: 16px; top: 16px; width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; background: var(--primary-soft); color: var(--primary);
}
.stat-icon svg { width: 17px; height: 17px; }

/* ------------------------------- 表格 ------------------------------- */
.table-wrap { overflow-x: auto; border-radius: 12px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th {
  text-align: left; font-weight: 500; color: var(--muted); font-size: 11.5px;
  letter-spacing: .02em; padding: 10px 14px; border-bottom: 1px solid var(--line);
  background: #fbfcff; white-space: nowrap; position: sticky; top: 0;
}
.tbl td { padding: 12px 14px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.tbl tbody tr:last-child td { border-bottom: none; }
.tbl tbody tr { transition: background .12s; }
.tbl tbody tr:hover { background: #fafbff; }
.tbl tbody tr.row-click { cursor: pointer; }
.tbl .num { font-variant-numeric: tabular-nums; }
.cell-main { display: flex; align-items: center; gap: 10px; min-width: 0; }
.cell-title { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.tbl-empty { padding: 44px 0; text-align: center; color: var(--muted); font-size: 13px; }

/* ------------------------------- 徽标 ------------------------------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px;
  border-radius: 6px; font-size: 11.5px; font-weight: 500; white-space: nowrap;
  background: #f1f5f9; color: var(--ink-2);
}
.badge-dot { width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.badge-green { background: var(--green-soft); color: #047857; }
.badge-amber { background: var(--amber-soft); color: #b45309; }
.badge-red { background: var(--red-soft); color: #b91c1c; }
.badge-blue { background: var(--blue-soft); color: #1d4ed8; }
.badge-indigo { background: var(--primary-soft); color: #4338ca; }
.badge-purple { background: #f5f3ff; color: #6d28d9; }
.badge-slate { background: #f1f5f9; color: #475569; }

.grade {
  display: inline-grid; place-items: center; width: 26px; height: 26px; border-radius: 8px;
  font-weight: 700; font-size: 12.5px; letter-spacing: 0;
}
.grade-S { background: linear-gradient(135deg, #7c3aed, #a855f7); color: #fff; }
.grade-A { background: linear-gradient(135deg, #059669, #10b981); color: #fff; }
.grade-B { background: linear-gradient(135deg, #2563eb, #3b82f6); color: #fff; }
.grade-C { background: linear-gradient(135deg, #d97706, #f59e0b); color: #fff; }
.grade-D { background: #e2e8f0; color: #64748b; }
.grade-label { font-size: 12px; color: var(--muted); }

/* ------------------------------- 表单 ------------------------------- */
.field { margin-bottom: 14px; }
.label { display: block; font-size: 12px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.label .req { color: var(--red); margin-left: 2px; }
.input, .textarea, .select {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; background: #fff;
  padding: 9px 11px; font-size: 13px; color: var(--ink); font-family: inherit;
  transition: border-color .15s, box-shadow .15s; outline: none;
}
.input:focus, .textarea:focus, .select:focus {
  border-color: #a5b4fc; box-shadow: 0 0 0 3px rgba(99, 102, 241, .12);
}
.input::placeholder, .textarea::placeholder { color: #a9b2c4; }
.textarea { resize: vertical; min-height: 88px; line-height: 1.6; }
.select { appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 30px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }
.hint { font-size: 11.5px; color: var(--faint); margin-top: 5px; line-height: 1.55; }
.form-section { font-size: 12px; font-weight: 600; color: var(--ink); margin: 18px 0 10px; display: flex; align-items: center; gap: 8px; }
.form-section::after { content: ""; flex: 1; height: 1px; background: var(--line-soft); }
.inline { display: flex; align-items: center; gap: 8px; }
.check { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); cursor: pointer; }
.check input { width: 15px; height: 15px; accent-color: var(--primary); }

/* ------------------------------- 筛选条 ------------------------------- */
.toolbar { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; margin-bottom: 14px; }
.search {
  position: relative; flex: 0 1 260px; min-width: 180px;
}
.search input { padding-left: 32px; height: 34px; }
.search svg { position: absolute; left: 10px; top: 9px; width: 16px; height: 16px; color: var(--faint); }
.chip-row { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.chip {
  height: 30px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line);
  background: #fff; color: var(--muted); font-size: 12.5px; cursor: pointer;
  display: inline-flex; align-items: center; gap: 5px; transition: all .14s;
}
.chip:hover { color: var(--ink); border-color: #d7dcec; }
.chip.active { background: var(--primary-soft); border-color: #c7d2fe; color: var(--primary); font-weight: 500; }
.chip .n { font-size: 11px; opacity: .7; }
.toggle { display: inline-flex; background: #f1f3fa; border-radius: 9px; padding: 3px; }
.toggle button {
  border: none; background: transparent; height: 27px; padding: 0 11px; border-radius: 7px;
  font-size: 12.5px; color: var(--muted); cursor: pointer;
}
.toggle button.active { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(15,23,42,.1); }

/* ------------------------------- 岗位卡片 ------------------------------- */
.job-card { padding: 17px 18px; display: flex; flex-direction: column; gap: 12px; cursor: pointer; }
.job-top { display: flex; align-items: flex-start; gap: 10px; }
.job-title { font-size: 15px; font-weight: 650; margin: 0; }
.job-meta { color: var(--muted); font-size: 12px; margin-top: 3px; display: flex; gap: 7px; flex-wrap: wrap; }
.job-salary { color: var(--primary); font-weight: 650; font-size: 14.5px; white-space: nowrap; }
.job-stats { display: flex; gap: 18px; padding-top: 10px; border-top: 1px dashed var(--line); }
.job-stat b { display: block; font-size: 16px; font-weight: 650; }
.job-stat span { font-size: 11px; color: var(--muted); }
.job-tags { display: flex; gap: 5px; flex-wrap: wrap; }
.tag {
  font-size: 11px; color: var(--muted); background: #f6f7fb; border: 1px solid var(--line-soft);
  padding: 2px 7px; border-radius: 5px;
}

/* ------------------------------- 详情页 ------------------------------- */
.detail-head {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px; display: flex; gap: 18px; align-items: flex-start; box-shadow: var(--shadow);
  margin-bottom: 18px;
}
.detail-name { font-size: 22px; font-weight: 700; margin: 0; display: flex; align-items: center; gap: 9px; }
.detail-meta { color: var(--muted); font-size: 12.5px; margin-top: 5px; display: flex; gap: 10px; flex-wrap: wrap; }
.detail-actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }

.score-ring {
  --p: 0; --c: #4f46e5;
  width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 auto;
  background: conic-gradient(var(--c) calc(var(--p) * 1%), #eef0f7 0);
  position: relative;
}
.score-ring::after {
  content: ""; position: absolute; inset: 6px; background: #fff; border-radius: 50%;
}
.score-ring .ring-in { position: relative; z-index: 1; text-align: center; line-height: 1; }
.score-ring b { font-size: 22px; font-weight: 700; letter-spacing: -.03em; }
.score-ring span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 3px; letter-spacing: .06em; }

.kv { display: grid; grid-template-columns: 76px 1fr; gap: 9px 12px; font-size: 12.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; color: var(--ink-2); }

.section-title { font-size: 13px; font-weight: 600; margin: 0 0 11px; display: flex; align-items: center; gap: 8px; }
.section-title .sub { font-weight: 400; color: var(--muted); font-size: 11.5px; }
.section-title .right { margin-left: auto; }

/* 双专家 */
.experts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.expert { border: 1px solid var(--line); border-radius: 12px; padding: 14px; background: #fcfdff; }
.expert-head { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.expert-avatar {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center;
  font-size: 11px; font-weight: 700;
}
.expert-hrd .expert-avatar { background: #f5f3ff; color: #7c3aed; }
.expert-biz .expert-avatar { background: #ecfdf5; color: #059669; }
.expert-head b { font-size: 12.5px; }
.expert-score { margin-left: auto; font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.expert p { margin: 0; font-size: 12px; color: var(--muted); line-height: 1.65; }

/* 维度条 */
.dim-row { display: grid; grid-template-columns: 74px 1fr 38px; align-items: center; gap: 10px; margin-bottom: 10px; }
.dim-name { font-size: 12px; color: var(--ink-2); }
.dim-track { height: 7px; background: #eef0f7; border-radius: 6px; overflow: hidden; }
.dim-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, #818cf8, #6366f1); transition: width .6s ease; }
.dim-num { font-size: 12px; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.dim-evidence { grid-column: 2 / 4; font-size: 11px; color: var(--faint); margin-top: -5px; margin-bottom: 6px; }

/* 列表块 */
.bullet-list { margin: 0; padding: 0; list-style: none; }
.bullet-list li {
  position: relative; padding-left: 18px; font-size: 12.5px; color: var(--ink-2);
  margin-bottom: 8px; line-height: 1.6;
}
.bullet-list li::before {
  content: ""; position: absolute; left: 3px; top: 7px; width: 6px; height: 6px;
  border-radius: 50%; background: #a5b4fc;
}
.bullet-list.warn li::before { background: #fca5a5; }
.bullet-list.ok li::before { background: #6ee7b7; }
.match-item { border-left: 2px solid #bbf7d0; padding: 2px 0 2px 10px; margin-bottom: 9px; }
.match-item b { font-size: 12.5px; font-weight: 600; display: block; }
.match-item span { font-size: 11.5px; color: var(--muted); }
.match-item.gap { border-left-color: #fde68a; }
.match-item.risk { border-left-color: #fecaca; }

/* 追问树 */
.tree { position: relative; }
.tree::before {
  content: ""; position: absolute; left: 15px; top: 8px; bottom: 8px; width: 1px;
  background: linear-gradient(180deg, #e0e7ff, #ede9fe, transparent);
}
.anchor {
  position: relative; background: #fff; border: 1px solid var(--line); border-radius: 12px;
  margin-bottom: 12px; margin-left: 0; padding: 14px 16px 14px 42px;
}
.anchor::before {
  content: attr(data-i); position: absolute; left: 4px; top: 14px; width: 24px; height: 24px;
  border-radius: 50%; background: #eef2ff; color: var(--primary); font-size: 11px;
  font-weight: 700; display: grid; place-items: center; border: 3px solid var(--bg);
}
.anchor-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.anchor-title { font-size: 13px; font-weight: 600; }
.stage-tag { font-size: 10.5px; color: var(--muted); background: #f6f7fb; padding: 2px 7px; border-radius: 5px; }
.q-item { margin-top: 10px; padding: 10px 12px; background: #fbfcff; border-radius: 9px; border: 1px solid var(--line-soft); }
.q-line { display: flex; gap: 8px; align-items: flex-start; }
.lvl { flex: 0 0 auto; font-size: 10px; font-weight: 700; border-radius: 5px; padding: 2px 5px; margin-top: 1px; }
.lvl1 { background: #eef2ff; color: #4338ca; }
.lvl2 { background: #ecfdf5; color: #047857; }
.lvl3 { background: #fdf4ff; color: #a21caf; }
.q-text { font-size: 12.5px; color: var(--ink); line-height: 1.6; }
.q-goal { font-size: 11px; color: var(--faint); margin-top: 4px; padding-left: 2px; }
.star-tag { font-size: 10px; color: #6d28d9; background: #f5f3ff; padding: 1px 5px; border-radius: 4px; margin-right: 4px; }
.dim-tag { font-size: 10px; color: #0f766e; background: #f0fdfa; padding: 1px 5px; border-radius: 4px; }

/* 时间线 */
.timeline { position: relative; padding-left: 18px; }
.timeline::before { content: ""; position: absolute; left: 4px; top: 4px; bottom: 4px; width: 1px; background: var(--line); }
.tl-item { position: relative; padding-bottom: 14px; }
.tl-item:last-child { padding-bottom: 0; }
.tl-item::before {
  content: ""; position: absolute; left: -18px; top: 4px; width: 9px; height: 9px;
  border-radius: 50%; background: #fff; border: 2px solid #c7d2fe;
}
.tl-item b { font-size: 12.5px; font-weight: 500; display: block; }
.tl-item span { font-size: 11px; color: var(--faint); }

/* ------------------------------- 弹窗 / 抽屉 ------------------------------- */
.mask {
  position: fixed; inset: 0; background: rgba(15, 23, 42, .42); backdrop-filter: blur(3px);
  z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 5vh 20px;
  animation: fade .16s ease; overflow-y: auto;
}
.modal {
  background: #fff; border-radius: 17px; width: 100%; max-width: 640px;
  box-shadow: var(--shadow-lg); animation: pop .2s cubic-bezier(.16, 1, .3, 1);
  margin: auto;
}
.modal.wide { max-width: 900px; }
.modal.narrow { max-width: 440px; }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-head { display: flex; align-items: flex-start; gap: 12px; padding: 20px 22px 0; }
.modal-head h3 { margin: 0; font-size: 16px; font-weight: 650; }
.modal-head p { margin: 3px 0 0; font-size: 12px; color: var(--muted); }
.modal-close { margin-left: auto; border: none; background: transparent; cursor: pointer; color: var(--faint); padding: 4px; border-radius: 7px; }
.modal-close:hover { background: #f1f3fa; color: var(--ink); }
.modal-body { padding: 18px 22px; }
.modal-foot { padding: 0 22px 20px; display: flex; gap: 8px; justify-content: flex-end; }

.drawer-mask { position: fixed; inset: 0; background: rgba(15, 23, 42, .38); z-index: 110; animation: fade .16s; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 620px; max-width: 96vw; background: #fff;
  z-index: 111; box-shadow: -20px 0 60px -30px rgba(15, 23, 42, .4); display: flex; flex-direction: column;
  animation: slide .22s cubic-bezier(.16, 1, .3, 1);
}
@keyframes slide { from { transform: translateX(24px); opacity: .6; } to { transform: none; opacity: 1; } }
.drawer-head { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.drawer-body { flex: 1; overflow-y: auto; padding: 20px 22px; }
.drawer-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; }

/* ------------------------------- Tabs ------------------------------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 16px; overflow-x: auto; }
.tab {
  border: none; background: transparent; padding: 9px 13px; font-size: 13px; color: var(--muted);
  cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap;
  display: flex; align-items: center; gap: 6px;
}
.tab:hover { color: var(--ink); }
.tab.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 500; }
.tab .n { font-size: 10.5px; background: #f1f3fa; color: var(--muted); border-radius: 10px; padding: 0 5px; }
.tab.active .n { background: var(--primary-soft); color: var(--primary); }

/* ------------------------------- 空状态 / 骨架 ------------------------------- */
.empty { text-align: center; padding: 48px 20px; color: var(--muted); }
.empty-icon {
  width: 48px; height: 48px; border-radius: 14px; background: #f4f6fc; display: grid;
  place-items: center; margin: 0 auto 12px; color: #a5b0c8;
}
.empty b { display: block; color: var(--ink-2); font-size: 13.5px; margin-bottom: 4px; }
.empty p { margin: 0; font-size: 12px; }
.skeleton {
  background: linear-gradient(90deg, #f1f4fa 25%, #e8ecf6 37%, #f1f4fa 63%);
  background-size: 400% 100%; animation: shimmer 1.3s infinite; border-radius: 8px;
}
@keyframes shimmer { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.loading-block { padding: 40px; display: grid; place-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; }
.spinner {
  width: 22px; height: 22px; border-radius: 50%; border: 2px solid #e0e7ff;
  border-top-color: var(--primary); animation: spin .8s linear infinite;
}

/* ------------------------------- 上传 ------------------------------- */
.dropzone {
  border: 1.5px dashed #cfd6e8; border-radius: 13px; padding: 30px 18px; text-align: center;
  cursor: pointer; transition: all .16s; background: #fcfdff;
}
.dropzone:hover, .dropzone.drag { border-color: #a5b4fc; background: #f7f8ff; }
.dropzone .dz-icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--primary-soft); color: var(--primary);
  display: grid; place-items: center; margin: 0 auto 10px;
}
.dropzone b { font-size: 13px; color: var(--ink-2); }
.dropzone p { margin: 5px 0 0; font-size: 11.5px; color: var(--faint); }
.file-list { margin-top: 12px; display: flex; flex-direction: column; gap: 6px; }
.file-row {
  display: flex; align-items: center; gap: 8px; padding: 7px 10px; border: 1px solid var(--line-soft);
  border-radius: 8px; font-size: 12px; background: #fbfcff;
}
.file-row .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-row .size { color: var(--faint); font-size: 11px; }

/* ------------------------------- 漏斗 / 图表 ------------------------------- */
.funnel { display: flex; flex-direction: column; gap: 9px; }
.funnel-step { display: flex; align-items: center; gap: 10px; }
.funnel-label { width: 62px; font-size: 12px; color: var(--muted); flex: 0 0 auto; }
.funnel-track { flex: 1; height: 30px; border-radius: 8px; background: #f5f7fc; overflow: hidden; position: relative; }
.funnel-fill {
  height: 100%; border-radius: 8px; background: linear-gradient(90deg, #6366f1, #a78bfa);
  display: flex; align-items: center; padding-left: 10px; color: #fff; font-size: 11.5px;
  font-weight: 600; min-width: 34px; transition: width .7s ease;
}
.funnel-num { width: 42px; text-align: right; font-size: 12.5px; font-weight: 600; }

.bars { display: flex; align-items: flex-end; gap: 6px; height: 110px; padding-top: 8px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 5px; height: 100%; justify-content: flex-end; }
.bar {
  width: 100%; max-width: 22px; border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, #a5b4fc, #6366f1); min-height: 3px; transition: height .5s;
}
.bar-col span { font-size: 9.5px; color: var(--faint); white-space: nowrap; }
.bar-col:hover .bar { filter: brightness(1.08); }

.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut {
  width: 116px; height: 116px; border-radius: 50%; flex: 0 0 auto; position: relative;
  background: conic-gradient(#7c3aed 0 20%, #10b981 20% 45%, #3b82f6 45% 70%, #f59e0b 70% 85%, #cbd5e1 85% 100%);
}
.donut::after { content: ""; position: absolute; inset: 15px; background: #fff; border-radius: 50%; }
.donut-center { position: absolute; inset: 0; display: grid; place-items: center; z-index: 1; }
.donut-center b { font-size: 18px; font-weight: 700; }
.donut-center span { font-size: 9.5px; color: var(--muted); display: block; text-align: center; }
.legend { display: flex; flex-direction: column; gap: 6px; font-size: 12px; }
.legend-row { display: flex; align-items: center; gap: 7px; }
.legend-dot { width: 8px; height: 8px; border-radius: 2px; }
.legend-row b { margin-left: auto; font-weight: 600; }

.progress { height: 6px; background: #eef0f7; border-radius: 6px; overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #818cf8, #6366f1); }

/* ------------------------------- 登录 ------------------------------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.05fr .95fr; }
.login-left {
  background: radial-gradient(1200px 600px at 10% 0%, #312e81 0%, transparent 55%),
              radial-gradient(900px 600px at 90% 100%, #4c1d95 0%, transparent 55%),
              linear-gradient(160deg, #111827, #0b1020);
  color: #fff; padding: 52px 56px; display: flex; flex-direction: column; position: relative; overflow: hidden;
}
.login-left::after {
  content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .07); right: -160px; bottom: -180px;
}
.login-brand { display: flex; align-items: center; gap: 11px; font-weight: 600; font-size: 15px; }
.login-hero { margin-top: auto; margin-bottom: auto; max-width: 470px; }
.login-hero h1 { font-size: 34px; line-height: 1.32; margin: 0 0 16px; letter-spacing: -.01em; font-weight: 700; }
.login-hero h1 em { font-style: normal; background: linear-gradient(90deg, #a5b4fc, #c4b5fd); -webkit-background-clip: text; background-clip: text; color: transparent; }
.login-hero p { color: #9aa4c0; font-size: 13.5px; line-height: 1.85; margin: 0 0 26px; }
.login-points { display: flex; flex-direction: column; gap: 12px; }
.login-point { display: flex; gap: 11px; align-items: flex-start; }
.login-point .ico {
  width: 30px; height: 30px; border-radius: 9px; background: rgba(129, 140, 248, .14);
  color: #a5b4fc; display: grid; place-items: center; flex: 0 0 auto;
}
.login-point b { font-size: 12.5px; display: block; color: #e5e7f5; }
.login-point span { font-size: 11.5px; color: #78829e; }
.login-foot { color: #5b6480; font-size: 11px; }
.login-right { display: grid; place-items: center; padding: 30px; background: #fff; }
.login-box { width: 100%; max-width: 356px; }
.login-box h2 { font-size: 23px; margin: 0 0 6px; }
.login-box > p { color: var(--muted); font-size: 12.5px; margin: 0 0 24px; }
.login-box .input { height: 42px; border-radius: 10px; }
.demo-box {
  margin-top: 20px; border: 1px dashed #dbe1f0; border-radius: 11px; padding: 12px 14px;
  background: #fbfcff; font-size: 11.5px; color: var(--muted); line-height: 1.8;
}
.demo-box b { color: var(--ink-2); }
.demo-box code { background: #eef2ff; color: #4338ca; padding: 1px 5px; border-radius: 4px; font-size: 11px; }

/* ------------------------------- 聊天 ------------------------------- */
.chat-fab {
  position: fixed; right: 26px; bottom: 24px; height: 46px; padding: 0 17px; border-radius: 24px;
  background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff; border: none; cursor: pointer;
  display: flex; align-items: center; gap: 8px; box-shadow: 0 16px 34px -14px rgba(79, 70, 229, .8);
  z-index: 60; font-size: 13px; font-weight: 500; transition: transform .16s;
}
.chat-fab:hover { transform: translateY(-2px); }
.chat-panel {
  position: fixed; right: 26px; bottom: 24px; width: 372px; height: 540px; max-height: 76vh;
  background: #fff; border-radius: 17px; box-shadow: var(--shadow-lg); z-index: 70;
  display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line);
  animation: pop .2s cubic-bezier(.16, 1, .3, 1);
}
.chat-head {
  padding: 14px 16px; background: linear-gradient(135deg, #4f46e5, #7c3aed); color: #fff;
  display: flex; align-items: center; gap: 9px;
}
.chat-head b { font-size: 13.5px; }
.chat-head span { display: block; font-size: 10.5px; opacity: .78; }
.chat-body { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; background: #fbfcff; }
.msg { max-width: 86%; font-size: 12.5px; line-height: 1.68; padding: 10px 13px; border-radius: 12px; white-space: pre-wrap; word-break: break-word; }
.msg.ai { background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 4px; color: var(--ink-2); }
.msg.user { background: linear-gradient(135deg, #4f46e5, #6366f1); color: #fff; align-self: flex-end; border-bottom-right-radius: 4px; }
.msg.typing { color: var(--muted); display: flex; gap: 4px; align-items: center; }
.chat-sugs { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px 10px; background: #fbfcff; }
.chat-sug { font-size: 11px; border: 1px solid var(--line); background: #fff; border-radius: 14px; padding: 4px 9px; cursor: pointer; color: var(--muted); }
.chat-sug:hover { border-color: #c7d2fe; color: var(--primary); }
.chat-input { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--line); background: #fff; }
.chat-input input { flex: 1; border: 1px solid var(--line); border-radius: 10px; padding: 9px 11px; font-size: 12.5px; outline: none; }
.chat-input input:focus { border-color: #a5b4fc; }

/* ------------------------------- Toast ------------------------------- */
.toast-root { position: fixed; top: 20px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  background: #0f172a; color: #fff; padding: 9px 15px; border-radius: 9px; font-size: 12.5px;
  box-shadow: 0 14px 34px -16px rgba(15, 23, 42, .7); animation: toastIn .2s ease;
  display: flex; align-items: center; gap: 8px; max-width: 520px;
}
.toast.ok { background: #065f46; }
.toast.err { background: #991b1b; }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

/* ------------------------------- 其他 ------------------------------- */
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 11.5px; }
.nowrap { white-space: nowrap; }
.right { margin-left: auto; }
.mt-0 { margin-top: 0; } .mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; }
.mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; } .mb-8 { margin-bottom: 8px; } .mb-12 { margin-bottom: 12px; }
.flex { display: flex; } .items-center { align-items: center; } .gap-8 { gap: 8px; } .gap-12 { gap: 12px; }
.flex-wrap { flex-wrap: wrap; }
.w-full { width: 100%; }
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }
.copy-btn { font-size: 11px; color: var(--muted); border: 1px solid var(--line); background: #fff; border-radius: 6px; padding: 2px 7px; cursor: pointer; }
.copy-btn:hover { color: var(--primary); border-color: #c7d2fe; }
.pill { font-size: 10.5px; padding: 2px 7px; border-radius: 20px; background: #f1f5f9; color: var(--muted); }
.row-actions { display: flex; gap: 4px; }
.icon-sm { width: 15px; height: 15px; }
.alert {
  display: flex; gap: 10px; padding: 11px 13px; border-radius: 10px; font-size: 12px;
  background: var(--amber-soft); color: #92400e; border: 1px solid #fde68a; line-height: 1.6;
}
.alert.info { background: var(--blue-soft); color: #1e40af; border-color: #bfdbfe; }
.alert.ok { background: var(--green-soft); color: #065f46; border-color: #a7f3d0; }
.mail-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); font-size: 12px; }
.mail-item:last-child { border-bottom: none; }
.mail-item .sub { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-dot { width: 7px; height: 7px; border-radius: 50%; margin-top: 6px; flex: 0 0 auto; }

/* ------------------------------- 响应式 ------------------------------- */
@media (max-width: 1180px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .sidebar { width: 68px; flex-basis: 68px; }
  .logo-text, .nav-item span, .nav-count, .nav-badge, .nav-group,
  .side-foot .mode-card, .side-user .meta { display: none; }
  .side-logo { justify-content: center; padding: 18px 0; }
  .nav-item { justify-content: center; padding: 11px 0; }
  .nav-item.active::before { left: -12px; }
  .side-foot { display: flex; justify-content: center; }
  .side-user { justify-content: center; }
  .side-user > svg { display: none; }
  .login { grid-template-columns: 1fr; }
  .login-left { display: none; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 680px) {
  .view { padding: 18px 14px 80px; }
  .topbar { padding: 0 14px; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid-3, .grid-2, .form-grid, .form-grid-3 { grid-template-columns: 1fr; }
  .stat { padding: 14px; }
  .stat-value { font-size: 25px; }
  .stat-icon { width: 28px; height: 28px; right: 12px; top: 12px; }
  .stat-icon svg { width: 14px; height: 14px; }
  .detail-head { flex-wrap: wrap; }
  .detail-actions { margin-left: 0; width: 100%; justify-content: flex-start; }
  .experts { grid-template-columns: 1fr; }
  .chat-panel { right: 10px; left: 10px; width: auto; bottom: 10px; }
  .page-title { font-size: 20px; }
  .modal { max-width: 100%; }
}

/* ------------------------------- 弹出菜单 ------------------------------- */
.popover {
  position: fixed; min-width: 210px; background: #fff; border: 1px solid var(--line);
  border-radius: 12px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 150;
  animation: pop .15s cubic-bezier(.16, 1, .3, 1);
}
.pop-user { display: flex; gap: 10px; align-items: center; padding: 8px 8px 4px; }
.pop-user b { display: block; font-size: 12.5px; }
.pop-user span { display: block; font-size: 11px; color: var(--muted); }
.menu-item {
  display: flex; align-items: center; gap: 9px; width: 100%; border: none; background: transparent;
  padding: 8px 9px; border-radius: 7px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; text-align: left;
}
.menu-item:hover { background: #f5f7fc; }
.menu-item.danger { color: var(--red); }
.menu-item.danger:hover { background: var(--red-soft); }

/* ------------------------------- 工作台补充 ------------------------------- */
.todo-row { display: flex; gap: 11px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.todo-row:last-child { border-bottom: none; }
.todo-row b { font-size: 12.5px; font-weight: 600; display: block; }
.todo-icon { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; flex: 0 0 auto;
  background: var(--primary-soft); color: var(--primary); }
.todo-icon.interview { background: #ecfeff; color: #0891b2; }
.todo-icon.confirm { background: var(--green-soft); color: var(--green); }
.date-chip { width: 36px; height: 38px; border-radius: 9px; background: #f5f7fc; display: flex; flex-direction: column;
  align-items: center; justify-content: center; flex: 0 0 auto; line-height: 1.1; }
.date-chip b { font-size: 14px; font-weight: 700; }
.date-chip span { font-size: 9px; color: var(--muted); }
.urgent-job { display: flex; gap: 10px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-soft); }
.urgent-job:last-child { border-bottom: none; }
.urgent-job b { font-size: 12.5px; display: block; }

/* ------------------------------- 细节修正 ------------------------------- */
.card > .tabs { padding: 4px 18px 0; }
.card > .tabs .tab:first-child { padding-left: 0; }
.tbl td.nowrap, .tbl td .nowrap { white-space: nowrap; }
.tbl { table-layout: auto; }
.page-actions .search { flex: 0 0 220px; }

@media (max-width: 820px) {
  .apply-grid { grid-template-columns: 1fr !important; }
  .apply-grid .card[style*="sticky"] { position: static !important; }
}

/* ------------------------------- 网页录音 ------------------------------- */
.rec-panel { border: 1px solid var(--line); border-radius: 13px; padding: 14px 16px; background: #fff; }
.rec-dot { width: 8px; height: 8px; border-radius: 50%; background: #cbd5e1; display: inline-block; }
.rec-stage { display: flex; align-items: center; gap: 18px; padding: 16px 2px 12px; }
.rec-btn {
  width: 56px; height: 56px; border-radius: 50%; border: none; cursor: pointer; flex: 0 0 auto;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(135deg, #4f46e5, #7c3aed);
  box-shadow: 0 12px 26px -12px rgba(79, 70, 229, .9);
  transition: transform .15s, background .15s;
}
.rec-btn:hover { transform: translateY(-1px); }
.rec-btn.recording { background: linear-gradient(135deg, #ef4444, #dc2626); animation: recPulse 1.4s ease-in-out infinite; }
.rec-square { width: 16px; height: 16px; border-radius: 3px; background: #fff; display: block; }
@keyframes recPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, .35); }
  50% { box-shadow: 0 0 0 12px rgba(239, 68, 68, 0); }
}
.rec-time { font-size: 20px; font-weight: 700; letter-spacing: .04em; font-variant-numeric: tabular-nums; min-width: 62px; }
.rec-wave { display: flex; align-items: center; gap: 3px; height: 40px; flex: 1; max-width: 240px; }
.rec-wave i { width: 4px; height: 8%; border-radius: 3px; background: linear-gradient(180deg, #a5b4fc, #6366f1); transition: height .08s linear; }
.rec-live { margin-top: 10px; }
