/* ==========================================================
   杭州市人才政策智能匹配平台 —— 样式
   设计 token：主色蓝 #1677ff / 圆角 12px / 卡片轻投影 / 侧边栏 216px
   ========================================================== */
:root {
  --primary: #1677ff;
  --primary-dark: #0958d9;
  --primary-soft: #e6f4ff;
  --success: #52c41a;
  --success-soft: #f6ffed;
  --warning: #faad14;
  --danger: #ff4d4f;
  --purple: #722ed1;
  --text: #1f2329;
  --text-2: #5c6673;
  --text-3: #8a94a6;
  --border: #e5e8ef;
  --bg: #f5f7fa;
  --card: #fff;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0, 0, 0, .06), 0 4px 16px rgba(0, 0, 0, .04);
  --shadow-hover: 0 4px 20px rgba(22, 119, 255, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "PingFang SC", "Microsoft YaHei",
    "Helvetica Neue", Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

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

.sidebar {
  width: 216px;
  flex: 0 0 216px;
  background: #fff;
  border-right: 1px solid var(--border);
  padding: 16px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.sidebar .brand {
  font-size: 16px;
  font-weight: 700;
  padding: 8px 10px 16px;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
}
.sidebar .brand small { display: block; font-weight: 400; font-size: 11px; color: var(--text-3); }
.sidebar .brand .logo {
  width: 32px; height: 32px; flex: 0 0 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), #4dabf7);
  color: #fff; display: grid; place-items: center; font-size: 16px;
}
.nav-item {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-2); margin-bottom: 2px; font-size: 14px;
}
.nav-item:hover { background: #f2f5fa; text-decoration: none; color: var(--text); }
.nav-item.active { background: var(--primary-soft); color: var(--primary); font-weight: 600; }

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

.topbar {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 12px 24px;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  position: sticky; top: 0; z-index: 20;
}
.topbar h1 { font-size: 17px; margin: 0; font-weight: 600; }
.content { padding: 20px 24px 60px; flex: 1; }

/* ---------------- 组件 ---------------- */
.card {
  background: var(--card); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: 18px; margin-bottom: 16px;
}
.card-title {
  font-size: 15px; font-weight: 600; margin: 0 0 14px;
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
}

.btn {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: var(--radius-sm);
  border: 1px solid var(--border); background: #fff; color: var(--text);
  cursor: pointer; font-size: 13px; font-family: inherit;
  transition: .15s; white-space: nowrap;
}
.btn:hover { border-color: var(--primary); color: var(--primary); }
.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); color: #fff; }
.btn-danger { color: var(--danger); border-color: #ffccc7; }
.btn-danger:hover { background: #fff2f0; border-color: var(--danger); color: var(--danger); }
.btn-sm { padding: 4px 10px; font-size: 12px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-block { width: 100%; justify-content: center; }

input[type=text], input[type=password], input[type=number], input[type=url],
input[type=date], select, textarea {
  width: 100%; padding: 7px 10px; border: 1px solid var(--border);
  border-radius: var(--radius-sm); font-size: 13px; font-family: inherit;
  background: #fff; color: var(--text); outline: none; transition: .15s;
}
input:focus, select:focus, textarea:focus {
  border-color: var(--primary); box-shadow: 0 0 0 3px rgba(22, 119, 255, .1);
}
textarea { resize: vertical; min-height: 70px; line-height: 1.6; }
label.field { display: block; margin-bottom: 12px; }
label.field > span {
  display: block; font-size: 12px; color: var(--text-2);
  margin-bottom: 5px; font-weight: 500;
}
label.field > span .tip { color: var(--text-3); font-weight: 400; }

.grid { display: grid; gap: 14px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }

.tag {
  display: inline-block; padding: 2px 9px; border-radius: 20px; font-size: 12px;
  background: #f2f5fa; color: var(--text-2); margin: 0 6px 6px 0;
}
.tag-blue { background: var(--primary-soft); color: var(--primary); }
.tag-green { background: var(--success-soft); color: #389e0d; }
.tag-orange { background: #fff7e6; color: #d46b08; }
.tag-red { background: #fff2f0; color: #cf1322; }
.tag-purple { background: #f9f0ff; color: var(--purple); }

.muted { color: var(--text-3); }
.small { font-size: 12px; }
.empty { text-align: center; padding: 50px 20px; color: var(--text-3); }
.empty p { margin: 6px 0; }

/* ---------------- 表格 ---------------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { color: var(--text-2); font-weight: 600; background: #fafbfc; white-space: nowrap; }
tbody tr:hover { background: #fafbfc; }
.table-wrap { overflow-x: auto; }

/* ---------------- 统计卡 ---------------- */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); }
.stat b { display: block; font-size: 24px; font-weight: 700; line-height: 1.2; }
.stat span { font-size: 12px; color: var(--text-3); }

/* ---------------- 政策卡片（员工端） ---------------- */
.policy-card {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px 18px; margin-bottom: 12px; border-left: 3px solid var(--primary);
  transition: .15s; cursor: pointer;
}
.policy-card:hover { box-shadow: var(--shadow-hover); }
.policy-card.dim { border-left-color: #d9d9d9; opacity: .82; }
.pc-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.pc-title { font-size: 15px; font-weight: 600; margin: 0 0 6px; }
.pc-title a { color: var(--text); }
.pc-money { font-size: 18px; font-weight: 700; color: var(--primary); white-space: nowrap; }
.pc-meta { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.pc-reason { font-size: 12px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border); }
.pc-reason div { margin: 2px 0; }
.ok { color: #389e0d; }
.no { color: #cf1322; }
.un { color: var(--text-3); }

.score-badge {
  display: inline-flex; align-items: center; justify-content: center;
  width: 42px; height: 42px; border-radius: 50%;
  background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 13px;
  flex: 0 0 42px;
}
.score-badge.low { background: #fff7e6; color: #d46b08; }

/* ---------------- 滚动条（全站统一细化） ---------------- */
.nice-scroll { scrollbar-width: thin; scrollbar-color: #cfd7e3 transparent; }
.nice-scroll::-webkit-scrollbar { width: 8px; height: 8px; }
.nice-scroll::-webkit-scrollbar-track { background: transparent; }
.nice-scroll::-webkit-scrollbar-thumb { background: #cfd7e3; border-radius: 4px; border: 2px solid #fff; }
.nice-scroll::-webkit-scrollbar-thumb:hover { background: #adb8cc; }
.drawer-bd, .raw-text, .modal, .table-wrap { overscroll-behavior: contain; }

/* ---------------- 筛选面板 ----------------
   面板本身 sticky，内部条件区独立滚动：
   不用滚到页面最底部才能看到下面的筛选项 */
.filter-panel {
  background: #fff; border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 0; position: sticky; top: 68px;
  max-height: calc(100vh - 84px);
  display: flex; flex-direction: column;
}
.fp-head {
  flex: 0 0 auto; padding: 14px 16px 10px;
  border-bottom: 1px solid var(--border);
}
.fp-body {
  flex: 1 1 auto; min-height: 0; overflow-y: auto; overscroll-behavior: contain;
  padding: 12px 10px 12px 16px;
}
.fp-foot {
  flex: 0 0 auto; padding: 10px 16px 14px;
  border-top: 1px solid var(--border); background: #fff;
  border-radius: 0 0 var(--radius) var(--radius);
}
.filter-group { margin-bottom: 12px; }
.filter-group > summary {
  list-style: none; cursor: pointer; display: flex; align-items: center;
  justify-content: space-between; padding: 5px 0;
  font-size: 12px; color: var(--text-3); font-weight: 600; letter-spacing: .5px;
}
.filter-group > summary::-webkit-details-marker { display: none; }
.filter-group > summary::after { content: '▾'; font-size: 10px; color: var(--text-3); transition: .15s; }
.filter-group:not([open]) > summary::after { content: '▸'; }
.filter-group > summary:hover { color: var(--primary); }
.fg-inner { padding: 4px 0 8px; }
.filter-group h4 {
  margin: 0 0 8px; font-size: 12px; color: var(--text-3);
  font-weight: 600; letter-spacing: .5px;
}
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  padding: 4px 11px; border-radius: 16px; border: 1px solid var(--border);
  font-size: 12px; cursor: pointer; background: #fff; user-select: none; transition: .12s;
}
.chip:hover { border-color: var(--primary); color: var(--primary); }
.chip.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.chip-add {
  padding: 4px 9px; border-radius: 16px; border: 1px dashed var(--border);
  background: transparent; font-size: 12px; cursor: pointer; color: var(--text-3);
  font-family: inherit;
}
.chip-add:hover { border-color: var(--primary); color: var(--primary); }

/* ---------------- 解读结果 ---------------- */
.ai-panel { background: linear-gradient(135deg, #f0f7ff, #f6ffed); border: 1px solid #d6e4ff; }
.conf-bar { height: 4px; background: #e5e8ef; border-radius: 3px; overflow: hidden; margin-top: 4px; }
.conf-bar i { display: block; height: 100%; background: var(--success); }
.conf-bar i.mid { background: var(--warning); }
.conf-bar i.low { background: var(--danger); }

/* ---------------- 上传区 ---------------- */
.upload-zone {
  border: 2px dashed #c9d4e5; border-radius: var(--radius); padding: 26px;
  text-align: center; cursor: pointer; transition: .15s; background: #fafcff;
}
.upload-zone:hover, .upload-zone.drag { border-color: var(--primary); background: var(--primary-soft); }
.upload-zone b { display: block; font-size: 14px; margin-bottom: 4px; }
.upload-zone .s { font-size: 12px; color: var(--text-3); }

.file-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  margin-bottom: 8px; font-size: 13px;
}
.file-item .ext {
  background: var(--primary-soft); color: var(--primary); font-size: 11px;
  padding: 2px 6px; border-radius: 4px; font-weight: 600; text-transform: uppercase;
}
.file-item .nm { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------------- 提示 ---------------- */
.toast-wrap { position: fixed; top: 18px; left: 50%; transform: translateX(-50%); z-index: 999; }
.toast {
  background: #1f2329; color: #fff; padding: 9px 18px; border-radius: var(--radius-sm);
  margin-bottom: 8px; font-size: 13px; box-shadow: 0 4px 16px rgba(0, 0, 0, .2);
  animation: slide .2s ease;
}
.toast.ok { background: #389e0d; }
.toast.err { background: #cf1322; }
@keyframes slide { from { opacity: 0; transform: translateY(-8px); } }

.alert { padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13px; margin-bottom: 12px; }
.alert-info { background: var(--primary-soft); color: #0958d9; border: 1px solid #91caff; }
.alert-warn { background: #fff7e6; color: #ad6800; border: 1px solid #ffd591; }
.alert-err { background: #fff2f0; color: var(--danger); border: 1px solid #ffccc7; }
.alert-ok { background: var(--success-soft); color: #389e0d; border: 1px solid #b7eb8f; }

/* ---------------- 登录 ---------------- */
.login-wrap {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #1677ff 0%, #0958d9 55%, #003eb3 100%);
}
.login-box {
  background: #fff; border-radius: 16px; padding: 34px 32px; width: 380px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .18);
}
.login-box h2 { margin: 0 0 4px; font-size: 20px; }
.login-box .sub { color: var(--text-3); font-size: 13px; margin-bottom: 22px; }

/* ---------------- 详情 / 抽屉 ---------------- */
.detail-grid { display: grid; grid-template-columns: 1fr 300px; gap: 16px; align-items: start; }
@media (max-width: 900px) { .detail-grid { grid-template-columns: 1fr; } }
.kv { display: grid; grid-template-columns: 96px 1fr; gap: 8px 12px; font-size: 13px; }
.kv dt { color: var(--text-3); }
.kv dd { margin: 0; word-break: break-all; }

.mask { position: fixed; inset: 0; background: rgba(0, 0, 0, .45); z-index: 200; display: none; }
.mask.show { display: block; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 720px; max-width: 96vw;
  background: var(--bg); z-index: 201; display: none; flex-direction: column;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}
.drawer.show { display: flex; }
.drawer-hd {
  padding: 16px 22px; background: #fff; border-bottom: 1px solid var(--border);
  display: flex; align-items: flex-start; justify-content: space-between; gap: 16px;
}
.drawer-hd h3 { margin: 0 0 6px; font-size: 18px; }
.drawer-bd { flex: 1; overflow-y: auto; padding: 18px 22px 40px; }
.close-x { border: none; background: none; font-size: 24px; cursor: pointer; color: var(--text-3); line-height: 1; padding: 0 4px; }
.close-x:hover { color: var(--text); }

.raw-text {
  background: #fafbfc; border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 14px 16px; white-space: pre-wrap; font-size: 13px; line-height: 1.85;
  max-height: 420px; overflow-y: auto; color: #2b3547;
}

.modal-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .45); display: flex;
  align-items: center; justify-content: center; z-index: 100; padding: 20px;
}
.modal {
  background: #fff; border-radius: var(--radius); padding: 20px;
  width: 100%; max-width: 460px; max-height: 86vh; overflow: auto;
}

/* ---------------- 页内文件预览器 ---------------- */
.viewer-mask {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .58); z-index: 300;
  display: flex; align-items: center; justify-content: center; padding: 22px;
}
.viewer {
  background: #fff; border-radius: var(--radius); width: 100%; max-width: 1080px;
  height: 100%; max-height: 92vh; display: flex; flex-direction: column; overflow: hidden;
  box-shadow: 0 18px 50px rgba(0, 0, 0, .28);
}
.viewer-hd {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 10px 14px; border-bottom: 1px solid var(--border); background: #fff;
}
.viewer-ic { font-size: 18px; }
.viewer-title { font-weight: 600; font-size: 14px; max-width: 46%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.viewer-idx { font-size: 12px; color: var(--text-2); background: #f2f4f7; padding: 2px 8px; border-radius: 10px; }
.viewer-sp { flex: 1; }
.viewer-bd {
  flex: 1; min-height: 0; overflow: auto; background: #f2f4f7;
  display: flex; align-items: center; justify-content: center; padding: 10px;
}
.viewer-bd > iframe { width: 100%; height: 100%; border: 0; background: #fff; border-radius: 6px; }
.viewer-bd > img { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 6px; background: #fff; }
.viewer-text {
  width: 100%; height: 100%; overflow: auto; background: #fff; border-radius: 6px;
  padding: 16px 18px; white-space: pre-wrap; word-break: break-word;
  font-size: 13px; line-height: 1.85; color: #2b3547; font-family: inherit;
}
.viewer-fallback {
  background: #fff; border-radius: 10px; padding: 34px 28px; text-align: center; max-width: 460px;
}
.viewer-fallback .fi { font-size: 46px; margin-bottom: 10px; }
.viewer-fallback p { margin: 6px 0; }
@media (max-width: 720px) {
  .viewer-mask { padding: 8px; }
  .viewer-title { max-width: 100%; }
}

/* ---------------- 待遇档位 ---------------- */
.tier-list { display: flex; flex-direction: column; gap: 12px; margin-bottom: 12px; }
.tier-table { width: 100%; border-collapse: collapse; margin-top: 8px; }
.tier-table th, .tier-table td { border: 1px solid var(--border); padding: 8px 10px; text-align: left; font-size: 13px; }
.tier-table th { background: #f7f9fc; color: var(--text-2); font-weight: 600; }
.tier-table tr.matched { background: #e6f7ec; }
.tier-table tr.matched td:first-child { border-left: 3px solid var(--success); }
.tier-table tr.not-match { opacity: .62; }
.tier-badge { display: inline-block; padding: 1px 8px; border-radius: 10px; font-size: 11px; }
.tier-badge.ok { background: #e6f7ec; color: #1a8a4f; }
.tier-badge.fail { background: #fff1f0; color: #cf1322; }

.my-amount {
  background: linear-gradient(90deg, #e6f7ec, #f6ffed); border: 1px solid #b7eb8f;
  border-radius: 10px; padding: 12px 16px; margin: 10px 0;
}
.my-amount b { font-size: 20px; color: #1a8a4f; }
.my-amount-inline {
  display: inline-block; margin-top: 6px; padding: 2px 8px; border-radius: 10px;
  background: #e6f7ec; color: #1a8a4f; font-size: 12px; font-weight: 600;
}

/* ---------------- 区块标题 ---------------- */
.section-title {
  font-size: 15px; font-weight: 600; margin: 22px 0 12px;
  display: flex; align-items: center; gap: 8px;
  padding-left: 10px; border-left: 4px solid var(--primary);
}
.section-title:first-child { margin-top: 0; }
.section-title .sub { font-size: 12px; font-weight: 400; color: var(--text-3); }

.loading { text-align: center; padding: 50px; color: var(--text-3); }
.spinner {
  width: 26px; height: 26px; border: 3px solid var(--border); border-top-color: var(--primary);
  border-radius: 50%; animation: spin .7s linear infinite; margin: 0 auto 10px;
}
@keyframes spin { to { transform: rotate(360deg); } }

.switchbox { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); cursor: pointer; }
.switchbox input { width: auto; margin: 0; }

/* ---------- 清单字段：占满整行 ---------- */
.form-item.full { grid-column: 1 / -1; }
.list-count { color: var(--primary, #1677ff); }
/* 员工端：必备条件 / 排除情形 */
.req-list { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 7px; }
.req-list li {
  display: flex; gap: 8px; align-items: flex-start; font-size: 13px; line-height: 1.55;
  padding: 8px 10px; border-radius: 8px; background: var(--bg-1, #f6f8fb);
}
.req-list li.require { border-left: 3px solid #1677ff; }
.req-list li.exclude { border-left: 3px solid #fa8c16; background: #fff7e6; }
.req-list .ic { flex: 0 0 auto; font-weight: 700; }
.req-badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 11px;
  padding: 2px 7px; border-radius: 20px; background: #fff7e6; color: #d46b08;
  border: 1px solid #ffd591; font-weight: 600;
}

/* ---------- 三档结果：符合 / 努力可达 / 暂不可达 ---------- */
.bucket-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.bucket-tab {
  flex: 1 1 180px; display: flex; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: var(--radius); background: #fff;
  border: 1px solid var(--border); box-shadow: var(--shadow);
  cursor: pointer; transition: .15s; text-align: left; font-family: inherit;
}
.bucket-tab:hover { box-shadow: var(--shadow-hover); }
.bucket-tab .ic { font-size: 20px; line-height: 1; }
.bucket-tab b { display: block; font-size: 20px; line-height: 1.2; }
.bucket-tab span.t { font-size: 12px; color: var(--text-3); }
.bucket-tab.on { border-color: var(--primary); background: var(--primary-soft); }
.bucket-tab.on.bk-near { border-color: #ffd591; background: #fff7e6; }
.bucket-tab.on.bk-blocked { border-color: #d9d9d9; background: #f5f7fa; }

.bucket-flag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600;
  padding: 2px 9px; border-radius: 20px; margin-bottom: 6px;
}
.bucket-flag.matched { background: var(--success-soft); color: #1a8a4f; }
.bucket-flag.near { background: #fff7e6; color: #d46b08; }
.bucket-flag.blocked { background: #f2f5fa; color: var(--text-3); }

.policy-card.bk-matched { border-left-color: var(--success); }
.policy-card.bk-near { border-left-color: var(--warning); }
.policy-card.bk-blocked { border-left-color: #d9d9d9; }

/* 冲刺提示条 */
.gap-bar {
  margin-top: 10px; padding: 9px 12px; border-radius: var(--radius-sm);
  background: #fff7e6; border: 1px solid #ffd591; font-size: 12.5px; color: #ad6800;
}
.gap-bar .g-title { font-weight: 700; margin-bottom: 4px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.gap-bar .g-chip {
  display: inline-block; padding: 1px 8px; border-radius: 10px; background: #fff; border: 1px solid #ffd591;
  color: #d46b08; font-size: 12px; margin: 2px 4px 0 0;
}
.gap-bar .g-chip.hard { border-color: #ffa39e; color: #cf1322; background: #fff2f0; }
.eta-tag {
  display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 10px;
  background: #e6f4ff; color: var(--primary); font-size: 12px; font-weight: 600;
}

/* 冲刺路线（详情抽屉） */
.gap-item {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 12px 14px; margin-bottom: 10px; background: #fff;
}
.gap-item .g-hd { display: flex; justify-content: space-between; gap: 10px; align-items: center; flex-wrap: wrap; }
.gap-item .g-hd b { font-size: 14px; }
.gap-item .g-line { font-size: 13px; color: var(--text-2); margin-top: 4px; }
.gap-item .g-line em {
  font-style: normal; color: var(--text); font-weight: 600;
  background: #f2f5fa; padding: 1px 7px; border-radius: 6px; margin: 0 2px;
}
.gap-item .g-act {
  margin-top: 8px; padding-top: 8px; border-top: 1px dashed var(--border);
  font-size: 13px; color: #0958d9;
}
.gap-item.unfixable { background: #fff2f0; border-color: #ffccc7; }
.gap-item.unfixable .g-act { color: #cf1322; }
.effort-tag { font-size: 11px; padding: 1px 8px; border-radius: 10px; background: #f2f5fa; color: var(--text-2); }
.effort-tag.easy { background: var(--success-soft); color: #1a8a4f; }
.effort-tag.medium { background: #fff7e6; color: #d46b08; }
.effort-tag.hard { background: #fff2f0; color: #cf1322; }

/* ---------- 核心要点（年限 / 技能职业 / 学历…一眼看全） ---------- */
.pc-facts { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.fact {
  display: inline-flex; align-items: center; gap: 4px; max-width: 100%;
  font-size: 12px; padding: 3px 9px; border-radius: 6px;
  background: #f6f8fb; color: var(--text-2); border: 1px solid #eef1f6;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fact b { color: var(--text); font-weight: 600; }
.fact.money { background: #e6f4ff; border-color: #cfe6ff; color: #0958d9; }
.fact.money b { color: #0958d9; }
.fact.warn { background: #fff7e6; border-color: #ffe0b2; color: #ad6800; }
.fact.warn b { color: #ad6800; }
.fact.ok { background: #f6ffed; border-color: #d9f7be; color: #389e0d; }
.fact.ok b { color: #1a8a4f; }
.fact .ic { opacity: .9; }

.fact-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; }
.fact-card { background: #f6f8fb; border-radius: 8px; padding: 8px 11px; border: 1px solid #eef1f6; }
.fact-card .k { font-size: 11px; color: var(--text-3); display: block; }
.fact-card .v { font-size: 13px; font-weight: 600; color: var(--text); line-height: 1.45; }
.fact-card.hi { background: #e6f4ff; border-color: #cfe6ff; }
.fact-card.hi .v { color: #0958d9; }

/* 摘要最多两行，卡片保持紧凑 */
.pc-summary {
  color: var(--text-2); font-size: 13px; line-height: 1.6; margin: 6px 0 0;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.pc-need {
  margin-top: 8px; font-size: 12px; color: #ad6800;
  background: #fffbf0; border: 1px dashed #ffe0b2; border-radius: 6px; padding: 5px 9px;
}
.pc-more { margin-top: 8px; font-size: 12px; color: var(--primary); }

/* 小屏：筛选面板不再 sticky，改为随页面滚动 */
@media (max-width: 1000px) {
  .filter-panel { position: static !important; max-height: none !important; }
  .fp-body { overflow: visible !important; }
}

/* 材料完整度 */
.prof-bar { height: 5px; border-radius: 3px; background: #e5e8ef; overflow: hidden; margin: 6px 0 10px; }
.prof-bar i { display: block; height: 100%; background: var(--primary); transition: .3s; }
.prof-bar i.full { background: var(--success); }

/* ==========================================================
   政策卡片（员工端实际结构：.pc-top / .pc-cat / .fav / h3）
   ========================================================== */
.policy-card { padding: 15px 17px; }
.policy-card h3 {
  margin: 8px 0 0; font-size: 15px; line-height: 1.55;
  font-weight: 600; color: var(--text); word-break: break-word;
}
.pc-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pc-top .bucket-flag { margin-bottom: 0; }
.pc-cat {
  display: inline-block; padding: 1px 8px; border-radius: 20px;
  background: #f2f5fa; color: var(--text-3); font-size: 11px;
  max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fav {
  margin-left: auto; border: none; background: none; padding: 2px 4px;
  font-size: 19px; line-height: 1; color: #faad14; cursor: pointer;
  opacity: .55; transition: .15s;
}
.fav:hover, .fav:active { opacity: 1; }
.pc-sprint {
  margin-top: 9px; padding: 6px 10px; border-radius: 6px;
  font-size: 12px; color: #ad6800; background: #fffbf0;
  border: 1px dashed #ffe0b2; line-height: 1.55;
}
.pc-facts .fact { max-width: 100%; }
.pc-facts .fact b { word-break: break-word; }

/* ==========================================================
   手机端统一适配
   ========================================================== */
#interpretMode { width: 140px; }

@media (max-width: 720px) {
  body { font-size: 14px; }
  /* AI 解读面板：标题与操作区上下排，避免标题被挤成窄条 */
  .ai-panel > .row { flex-direction: column; align-items: stretch; }
  .ai-panel > .row > .row { width: 100%; }
  #interpretMode { flex: 1 1 auto; width: auto; min-width: 0; }
  .content { padding: 14px 12px 40px; }
  .card { padding: 14px; margin-bottom: 12px; }
  .card-title { flex-wrap: wrap; gap: 8px; }
  .topbar { padding: 10px 12px; flex-wrap: wrap; gap: 6px; }
  .topbar h1 { font-size: 16px; }

  /* 政策卡片更紧凑，事实芯片允许换行 */
  .policy-card { padding: 13px 14px; border-radius: 10px; margin-bottom: 10px; }
  .policy-card h3 { font-size: 14.5px; line-height: 1.5; margin-top: 7px; }
  .pc-facts { gap: 5px; margin-top: 7px; }
  .fact {
    white-space: normal; overflow: visible; text-overflow: clip;
    font-size: 11.5px; padding: 3px 8px; line-height: 1.45;
  }
  .pc-cat { max-width: 48%; }
  .pc-summary { font-size: 12.5px; -webkit-line-clamp: 3; }

  /* 筛选芯片加大点击区域 */
  .chip { padding: 6px 12px; font-size: 12.5px; }
  .filter-group > summary { padding: 8px 0; font-size: 12.5px; }
  .fp-head { padding: 12px 14px 8px; }
  .fp-body { padding: 10px 12px; }
  .fp-foot { padding: 8px 14px 10px; }

  /* 详情抽屉：手机端全屏 */
  .drawer { width: 100%; max-width: 100%; }
  .drawer-hd { padding: 12px 14px 10px; }
  .drawer-hd h3 { font-size: 16px; line-height: 1.45; padding-right: 6px; }
  .drawer-bd { padding: 12px 12px calc(28px + env(safe-area-inset-bottom)); }
  .kv { grid-template-columns: 90px 1fr; gap: 6px 10px; font-size: 12.5px; }
  .section-title { font-size: 14px; margin: 18px 0 10px; }
  .raw-text { padding: 12px; font-size: 12.5px; max-height: 52vh; }
  .tier-table th, .tier-table td { padding: 6px 8px; font-size: 12px; }
  .req-list li { font-size: 12.5px; padding: 7px 9px; }
  .gap-item { padding: 10px 12px; }
  .file-item { flex-wrap: wrap; }

  /* 提示条不要超出屏幕 */
  .toast-wrap { left: 12px; right: 12px; transform: none; top: 12px; }
  .toast { text-align: center; padding: 10px 14px; }

  .to-top { right: 12px; bottom: calc(16px + env(safe-area-inset-bottom)); width: 38px; height: 38px; }
  .login-box { width: 100%; margin: 0 14px; padding: 26px 20px; }
  .modal { max-width: 100%; }
  .viewer { border-radius: 10px; }
}

/* HR 后台：窄屏时侧栏改为顶部横向导航 */
.table-hint { display: none; }
@media (max-width: 820px) {
  .table-hint { display: block; font-size: 11.5px; color: var(--text-3); margin: -2px 0 8px; }
  .layout { flex-direction: column; }
  .sidebar {
    width: 100%; flex: 0 0 auto; height: auto; position: static;
    display: flex; align-items: center; gap: 6px; overflow-x: auto;
    padding: 8px 10px; border-right: none; border-bottom: 1px solid var(--border);
    -webkit-overflow-scrolling: touch;
  }
  .sidebar .brand { display: none; }
  .sidebar .nav-item {
    flex: 0 0 auto; margin: 0; padding: 7px 10px; font-size: 13px;
    white-space: nowrap; background: #f6f8fb;
  }
  .sidebar .nav-item.active { background: var(--primary-soft); }
  .sidebar > div { display: contents; }
  .sidebar #whoami { display: none; }
  .sidebar #btnLogout { margin-left: auto; }
  /* 顶部导航条隐藏滚动条，避免出现灰色横条 */
  .sidebar { scrollbar-width: none; }
  .sidebar::-webkit-scrollbar { display: none; }
  /* 后台表格在手机上改为横向滚动，不再把列挤成竖排文字 */
  .table-wrap table { min-width: 720px; }
  .table-wrap .tbl-policy { min-width: 980px; }
  .table-wrap .tbl-policy th:first-child,
  .table-wrap .tbl-policy td:first-child { min-width: 220px; max-width: 280px; }
  /* 非首列不换行，避免「购房补贴」被挤成竖排单字 */
  .table-wrap .tbl-policy th:not(:first-child),
  .table-wrap .tbl-policy td:not(:first-child) { white-space: nowrap; }
}

