/* ===== 会计求职追踪站 · 冷蓝灰低饱和皮肤 ===== */

:root {
  --primary: #41586f;
  --primary-light: #e7edf4;
  --bg: #eef1f5;
  --card-bg: #ffffff;
  --text: #1f2937;
  --text-secondary: #6b7280;
  --border: #dde3ea;
  --success: #2f7d5d;
  --warning: #a97b32;
  --danger: #b05a52;
  --tag-bg: #ebeef3;
  --shadow: 0 1px 3px rgba(0,0,0,0.06), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-lg: 0 4px 12px rgba(0,0,0,0.08);
  --radius: 10px;
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Microsoft YaHei", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 14px;
}

/* ===== 头部 ===== */
.header {
  background: linear-gradient(135deg, #41586f 0%, #4d6379 100%);
  color: white;
  padding: 20px 0;
  box-shadow: var(--shadow-lg);
}

.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header h1 {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
}

.subtitle {
  font-size: 13px;
  opacity: 0.85;
}

.header-right {
  display: flex;
  align-items: center;
  gap: 16px;
}

.update-time {
  font-size: 13px;
  opacity: 0.9;
  white-space: nowrap;
  cursor: help;
}

/* 超过 4 天没更新：提醒该跑一轮了 */
.update-time.stale {
  opacity: 1;
  font-weight: 600;
  background: #a97b32;
  color: #36290e;
  padding: 3px 9px;
  border-radius: 6px;
}

.btn-refresh {
  background: rgba(255,255,255,0.2);
  color: white;
  border: 1px solid rgba(255,255,255,0.3);
  padding: 8px 16px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  transition: all 0.2s;
}

.btn-refresh:hover {
  background: rgba(255,255,255,0.3);
}

.btn-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ===== 统计栏 ===== */
.stats-bar {
  max-width: 1200px;
  margin: 20px auto 0;
  padding: 0 24px;
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.stat-item {
  background: var(--card-bg);
  padding: 16px 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  text-align: center;
  min-width: 100px;
  flex: 1;
}

.stat-num {
  display: block;
  font-size: 28px;
  font-weight: 700;
  color: var(--primary);
  line-height: 1.2;
}

.stat-label {
  display: block;
  font-size: 12px;
  color: var(--text-secondary);
  margin-top: 4px;
}

/* ===== 筛选栏 ===== */
.filter-bar {
  max-width: 1200px;
  margin: 20px auto 0;
  padding: 0 24px;
}

.filter-row {
  display: flex;
  gap: 12px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.filter-row:last-child {
  margin-bottom: 0;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.filter-group label {
  font-size: 12px;
  color: var(--text-secondary);
  font-weight: 500;
}

.filter-select, .filter-input {
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--card-bg);
  color: var(--text);
  outline: none;
  transition: border-color 0.2s;
  min-width: 120px;
}

.filter-select:focus, .filter-input:focus {
  border-color: var(--primary);
}

/* ===== 多选下拉组件 ===== */
.multi-select {
  position: relative;
  min-width: 130px;
}

.multi-select .ms-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 13px;
  background: var(--card-bg);
  color: var(--text-secondary);
  cursor: pointer;
  transition: border-color 0.2s;
  white-space: nowrap;
}

.multi-select .ms-trigger:hover {
  border-color: var(--primary);
}

.multi-select .ms-label {
  overflow: hidden;
  text-overflow: ellipsis;
}

.multi-select .ms-label.has-selection {
  color: var(--primary);
  font-weight: 500;
}

.multi-select .ms-arrow {
  font-size: 10px;
  color: var(--text-secondary);
}

.multi-select.open .ms-trigger {
  border-color: var(--primary);
}

.multi-select .ms-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  z-index: 100;
  min-width: 160px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: var(--shadow-lg);
  padding: 6px;
}

.multi-select.open .ms-dropdown {
  display: block;
}

.multi-select .ms-actions {
  display: flex;
  gap: 8px;
  padding: 4px 4px 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 4px;
}

.multi-select .ms-action-btn {
  flex: 1;
  padding: 4px 8px;
  font-size: 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.multi-select .ms-action-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
}

.multi-select .ms-options {
  display: flex;
  flex-direction: column;
}

.multi-select .ms-option {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  font-size: 13px;
  cursor: pointer;
  border-radius: 6px;
  color: var(--text);
}

.multi-select .ms-option:hover {
  background: var(--primary-light);
}

.multi-select .ms-option input {
  cursor: pointer;
  accent-color: var(--primary);
}

/* 职位类别模式切换 */
.ms-category-wrapper {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.ms-mode-toggle {
  display: flex;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}

.ms-mode-btn {
  flex: 1;
  padding: 4px 12px;
  font-size: 12px;
  background: var(--card-bg);
  border: none;
  cursor: pointer;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.ms-mode-btn.active {
  background: var(--primary);
  color: white;
}

.ms-mode-toggle .ms-mode-btn + .ms-mode-btn {
  border-left: 1px solid var(--border);
}

.filter-search {
  flex: 1;
  min-width: 200px;
}

.filter-search .filter-input {
  width: 100%;
  min-width: 200px;
}

.btn-reset {
  padding: 8px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s;
  height: 36px;
}

.btn-reset:hover {
  border-color: var(--text-secondary);
  color: var(--text);
}

.sort-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sort-group label {
  font-size: 13px;
  color: var(--text-secondary);
}

.sort-btn {
  padding: 6px 14px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s;
}

.sort-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.sort-btn:hover:not(.active) {
  border-color: var(--primary);
  color: var(--primary);
}

.result-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-secondary);
}

/* ===== 职位列表 ===== */
.job-list {
  max-width: 1200px;
  margin: 20px auto;
  padding: 0 24px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 400px;
}

.loading {
  text-align: center;
  padding: 60px 0;
  color: var(--text-secondary);
  font-size: 15px;
}

.empty {
  text-align: center;
  padding: 60px 0;
  color: var(--text-secondary);
}

.empty-icon {
  font-size: 48px;
  margin-bottom: 12px;
}

/* 职位卡片 */
.job-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px 24px;
  transition: box-shadow 0.2s, transform 0.2s;
  border-left: 4px solid transparent;
}

.job-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-1px);
}

.job-card.type-central {
  border-left-color: #b05a52;
}

.job-card.type-state {
  border-left-color: #a97b32;
}

.job-card.type-private {
  border-left-color: #2f7d5d;
}

.job-card.type-listed {
  border-left-color: #6b5b95;
}

.job-card.type-other {
  border-left-color: #6b7280;
}

.job-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

.job-title {
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.5;
  flex: 1;
}

.job-title a {
  color: inherit;
  text-decoration: none;
}

.job-title a:hover {
  color: var(--primary);
}

.job-date {
  font-size: 12px;
  color: var(--text-secondary);
  white-space: nowrap;
  background: var(--tag-bg);
  padding: 3px 8px;
  border-radius: 4px;
}

.job-card-body {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  margin-bottom: 10px;
}

.job-field {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
}

.job-field-label {
  color: var(--text-secondary);
  white-space: nowrap;
}

.job-field-value {
  color: var(--text);
  font-weight: 500;
}

.job-card-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

/* ===== 智能推荐徽章 ===== */
.job-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  line-height: 1.6;
}

.badge-ai {
  background: linear-gradient(135deg, #6b5b95, #64788f);
  color: #fff;
}

.badge-gov {
  background: #e4efe9;
  color: #2c6049;
}

.badge-high {
  background: #f6efe0;
  color: #7a5a2c;
}

.badge-mid {
  background: #e6ecf4;
  color: #3d4a66;
}

/* 优选（好企业池） */
.badge-pref {
  background: linear-gradient(135deg, #a97b32, #a97b32);
  color: #fff;
}

/* 外包/中介需甄别 */
.badge-warn {
  background: #f2e3e1;
  color: #8f4a42;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 4px;
  font-size: 12px;
  font-weight: 500;
}

.tag-type-central {
  background: #f1e6e4;
  color: #b05a52;
}

.tag-type-state {
  background: #f7efe1;
  color: #a97b32;
}

.tag-type-private {
  background: #e6f1ec;
  color: #2f7d5d;
}

.tag-type-listed {
  background: #efecf4;
  color: #6b5b95;
}

.tag-type-other {
  background: #ebeef3;
  color: #6b7280;
}

.tag-campus {
  background: var(--primary-light);
  color: var(--primary);
}

.tag-major {
  background: #e8f0f6;
  color: #3c5a78;
}

.tag-class {
  background: #efecf4;
  color: #6b5b95;
}

.tag-source {
  background: #ebeef3;
  color: #6b7280;
}

.tag-category {
  background: #f6eee4;
  color: #94593a;
  font-weight: 600;
}

/* 方向标签 */
.tag-dir-op {
  background: #e8f0f6;
  color: #3c5a78;
  font-weight: 600;
}

.tag-dir-admin {
  background: #efecf4;
  color: #6b5b95;
  font-weight: 600;
}

.tag-dir-legal {
  background: #e6f1ec;
  color: #2f7d5d;
  font-weight: 600;
}

.tag-dir-ai {
  background: #f1e6e4;
  color: #b05a52;
  font-weight: 600;
}

.tag-dir-other {
  background: #ebeef3;
  color: #6b7280;
  font-weight: 600;
}

/* 统计栏方向色块 */
.stat-dir-op .stat-num { color: #3c5a78; }
.stat-dir-admin .stat-num { color: #6b5b95; }
.stat-dir-legal .stat-num { color: #2f7d5d; }
.stat-dir-ai .stat-num { color: #b05a52; }

/* 新鲜度标签 */
.job-fresh {
  font-size: 12px;
  padding: 3px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.job-fresh.fresh-new {
  background: #e6f1ec;
  color: #2f7d5d;
  font-weight: 600;
}

.job-fresh.fresh-old {
  background: var(--tag-bg);
  color: var(--text-secondary);
}

/* 收藏按钮 */
.job-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.fav-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s;
}

.fav-btn:hover {
  border-color: #a97b32;
  color: #a97b32;
}

.fav-btn.fav-active {
  background: #f7efe1;
  border-color: #a97b32;
  color: #a97b32;
}

/* 关注按钮 */
.watch-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s;
}

.watch-btn:hover {
  border-color: #5b7b9c;
  color: #5b7b9c;
}

.watch-btn.watch-active {
  background: #e8f0f6;
  border-color: #5b7b9c;
  color: #5b7b9c;
}

.card-faved {
  border-left-color: #a97b32 !important;
  background: #f7efe1;
}

.card-watched {
  border-left-color: #5b7b9c !important;
  background: #e8f0f6;
}

.card-hidden {
  opacity: 0.55;
  border-left-color: var(--border) !important;
  background: var(--card-bg) !important;
}

/* 隐藏/恢复按钮 */
.hide-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: 14px;
  cursor: pointer;
  line-height: 1;
  transition: all 0.2s;
}

.hide-btn:hover {
  border-color: #b05a52;
  color: #b05a52;
}

.hide-btn.hide-restore {
  border-color: #22c55e;
  color: #22c55e;
  font-weight: 700;
}

.hide-btn.hide-restore:hover {
  background: #f0fdf4;
  border-color: #16a34a;
  color: #16a34a;
}

/* 投了按钮 */
.apply-btn {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: #f6eee4;
  color: #b45309;
  font-size: 12px;
  padding: 0 10px;
  height: 32px;
  cursor: pointer;
  transition: all 0.2s;
  font-weight: 600;
}

.apply-btn:hover {
  background: #b45309;
  color: #fff;
  border-color: #b45309;
}

/* ===== 云同步弹层 ===== */
.sync-modal {
  position: fixed; inset: 0; background: rgba(0, 0, 0, .4);
  display: flex; align-items: center; justify-content: center; z-index: 999;
}
.sync-modal-box {
  background: #fff; border-radius: 14px; padding: 24px 28px;
  width: 460px; max-width: 92vw; box-shadow: 0 10px 40px rgba(0, 0, 0, .18);
  position: relative;
}
.sync-modal-box h3 { font-size: 17px; margin-bottom: 6px; }
.sync-tip { font-size: 12px; color: #777; margin-bottom: 16px; line-height: 1.6; }
.sync-row { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.sync-label { width: 70px; font-size: 13px; color: #444; flex-shrink: 0; }
.sync-input {
  flex: 1; border: 1px solid #d5dbe2; border-radius: 8px; padding: 8px 10px;
  font-size: 13px; font-family: monospace;
}
.sync-input:focus { outline: none; border-color: #1a5fa8; }
.sync-status { font-size: 12px; color: #1a5fa8; }
.btn-copy { background: #fff; border: 1px solid #1a5fa8; color: #1a5fa8; border-radius: 8px; padding: 7px 14px; font-size: 13px; cursor: pointer; }
.btn-copy:hover { background: #eef4fb; }
.btn-close { position: absolute; top: 10px; right: 14px; background: none; border: none; font-size: 15px; color: #999; cursor: pointer; }

/* ===== 本轮更新小结 ===== */
.batch-summary {
  max-width: 1200px;
  margin: 16px auto 0;
  padding: 0 24px;
}
.batch-summary-inner {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #e6f1ec, #d1fae5);
  border: 1px solid #a7f3d0;
  border-radius: 12px;
  padding: 12px 18px;
  font-size: 13px;
  color: #065f46;
}
.batch-title {
  font-weight: 700;
  font-size: 14px;
  white-space: nowrap;
}
.batch-text {
  flex: 1;
  min-width: 200px;
}
.batch-text b {
  font-size: 15px;
  color: #047857;
}
.btn-batch-toggle {
  padding: 6px 14px;
  background: #fff;
  border: 1px solid #34d399;
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: #047857;
  font-weight: 600;
  transition: all 0.2s;
  white-space: nowrap;
  height: 32px;
}
.btn-batch-toggle:hover {
  border-color: #2f7d5d;
  color: #065f46;
}
.btn-batch-toggle.active {
  background: #2f7d5d;
  border-color: #2f7d5d;
  color: #fff;
}

/* 只看已隐藏按钮 */
.btn-hide-toggle {
  padding: 8px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s;
  height: 36px;
  white-space: nowrap;
}

.btn-hide-toggle:hover {
  border-color: #b05a52;
  color: #b05a52;
}

.btn-hide-toggle.active {
  background: #f1e6e4;
  border-color: #b05a52;
  color: #b05a52;
  font-weight: 600;
}

/* 只看收藏按钮 */
.btn-fav-toggle {
  padding: 8px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s;
  height: 36px;
  white-space: nowrap;
}

.btn-fav-toggle:hover {
  border-color: #a97b32;
  color: #a97b32;
}

.btn-fav-toggle.active {
  background: #f7efe1;
  border-color: #a97b32;
  color: #b45309;
  font-weight: 600;
}

/* 只看优选按钮 */
.btn-pref-toggle {
  padding: 8px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 6px;
  cursor: pointer;
  color: var(--text-secondary);
  font-size: 13px;
  transition: all 0.2s;
}

.btn-pref-toggle:hover {
  border-color: #a97b32;
  color: #a97b32;
}

.btn-pref-toggle.active {
  background: #f7efe1;
  border-color: #a97b32;
  color: #a97b32;
}

/* 只看关注按钮 */
.btn-watch-toggle {
  padding: 8px 16px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text-secondary);
  transition: all 0.2s;
  height: 36px;
  white-space: nowrap;
}

.btn-watch-toggle:hover {
  border-color: #5b7b9c;
  color: #5b7b9c;
}

.btn-watch-toggle.active {
  background: #e8f0f6;
  border-color: #5b7b9c;
  color: #4d6379;
  font-weight: 600;
}

/* ===== 分页 ===== */
.pagination {
  max-width: 1200px;
  margin: 0 auto 40px;
  padding: 0 24px;
  display: flex;
  justify-content: center;
  gap: 6px;
}

.page-btn {
  padding: 8px 14px;
  border: 1px solid var(--border);
  background: var(--card-bg);
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
  color: var(--text);
  transition: all 0.2s;
}

.page-btn:hover:not(.disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.page-btn.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}

.page-btn.disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

/* ===== 底部 ===== */
.footer {
  text-align: center;
  padding: 24px;
  color: var(--text-secondary);
  font-size: 12px;
  border-top: 1px solid var(--border);
  margin-top: 20px;
}

/* ===== 链接状态徽章 ===== */
.link-badge {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 6px;
  vertical-align: middle;
  cursor: help;
}

.link-active {
  background: #2f7d5d;
  box-shadow: 0 0 4px rgba(5, 150, 105, 0.4);
}

.link-expired {
  background: #b05a52;
  box-shadow: 0 0 4px rgba(220, 38, 38, 0.4);
}

.link-unknown {
  background: #d1d5db;
}

/* 薪资高亮 */
.job-field-value.salary {
  color: #b05a52;
  font-weight: 600;
}

/* ===== 响应式 ===== */
@media (max-width: 768px) {
  .header-inner {
    flex-direction: column;
    gap: 12px;
    text-align: center;
  }

  .stats-bar {
    gap: 8px;
  }

  .stat-item {
    min-width: 80px;
    padding: 12px;
  }

  .stat-num {
    font-size: 22px;
  }

  .filter-row {
    flex-direction: column;
    align-items: stretch;
  }

  .filter-select, .filter-input {
    width: 100%;
    min-width: auto;
  }

  .job-card {
    padding: 16px;
  }

  .job-card-header {
    flex-direction: column;
  }

  .job-card-body {
    gap: 6px 16px;
  }
}

/* ===== 偏好面板（行为学习） ===== */
.pref-box { width: 680px; }
.pref-body { max-height: 66vh; overflow-y: auto; margin-right: -8px; padding-right: 8px; }
.pref-foot { margin-top: 14px; padding-top: 12px; border-top: 1px solid #eef1f5; min-height: 20px; }

.pref-intro {
  background: #e8f0f6;
  border-left: 3px solid #41586f;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 13.5px;
  line-height: 1.7;
  color: #33414e;
}
.pref-sec { margin-bottom: 20px; }
.pref-sec-title {
  font-size: 13px; font-weight: 600; color: #1f2937; margin-bottom: 10px;
  display: flex; align-items: center; gap: 8px;
}
.pref-hint { font-size: 11px; font-weight: 400; color: #9aa3af; }
.pref-badge {
  background: #efecf4; color: #5d5490; border-radius: 10px;
  padding: 1px 8px; font-size: 11px; font-weight: 500;
}

.pref-modes { display: flex; gap: 10px; }
.pref-mode {
  flex: 1; min-width: 0; text-align: left; background: #f8fafc; border: 1px solid #e2e8f0;
  border-radius: 10px; padding: 12px 14px; cursor: pointer; font: inherit;
  display: flex; flex-direction: column; gap: 5px;
}
.pref-mode b { font-size: 13px; color: #334155; }
.pref-mode span { font-size: 12px; color: #64748b; line-height: 1.5; }
.pref-mode:hover { border-color: #b9c3d4; }
.pref-mode.active { background: #efecf4; border-color: #5d5490; }
.pref-mode.active b { color: #5d5490; }

.pref-stats { display: flex; gap: 10px; }
.pref-stat {
  flex: 1; background: #f8fafc; border-radius: 10px; padding: 10px;
  text-align: center; display: flex; flex-direction: column; gap: 2px;
}
.pref-stat b { font-size: 18px; color: #1f2937; }
.pref-stat span { font-size: 11px; color: #94a3b8; }
.pref-ev { margin-top: 8px; font-size: 11px; color: #64748b; }
.pref-tip {
  margin-top: 8px; font-size: 12px; color: #7a5a2c;
  background: #f7efe1; border: 1px solid #fde68a; border-radius: 8px; padding: 7px 10px;
}
.pref-empty { font-size: 12px; color: #94a3b8; padding: 14px; background: #f8fafc; border-radius: 10px; text-align: center; }

.pref-row {
  display: flex; gap: 12px; align-items: flex-start; justify-content: space-between;
  border: 1px solid #eef1f5; border-radius: 10px; padding: 10px 12px; margin-bottom: 8px;
  border-left: 3px solid #94a3b8;
}
.pref-row.up { border-left-color: #16a34a; background: #f6fdf8; }
.pref-row.down { border-left-color: #b05a52; background: #fffafa; }
.pref-row-main { flex: 1; min-width: 0; }
.pref-row-title { font-size: 13px; color: #1f2937; font-weight: 500; }
.pref-w { font-size: 12px; font-weight: 600; color: #5d5490; }
.pref-drift { font-size: 11px; color: #b45309; margin-left: 6px; }
.pref-row-exp { font-size: 11px; color: #64748b; margin-top: 3px; line-height: 1.5; }
.pref-row-act { display: flex; gap: 6px; align-items: center; flex-shrink: 0; }
.pref-ok, .pref-no {
  border-radius: 7px; padding: 5px 11px; font-size: 12px; cursor: pointer; font: inherit;
  font-size: 12px;
}
.pref-ok { background: #5d5490; color: #fff; border: 1px solid #5d5490; }
.pref-ok:hover { background: #7e22ce; }
.pref-no { background: #fff; color: #64748b; border: 1px solid #d5dbe2; }
.pref-no:hover { background: #f1f5f9; }
.pref-state { font-size: 11px; padding: 3px 8px; border-radius: 6px; }
.pref-state.ok { background: #e4efe9; color: #2c6049; }
.pref-state.no { background: #f1f5f9; color: #64748b; }

.pref-hard { background: #f8fafc; border-radius: 10px; padding: 12px; }
.pref-hard-row { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #334155; cursor: pointer; flex-wrap: wrap; }
.pref-hard-list { margin-top: 8px; font-size: 11px; color: #94a3b8; line-height: 1.8; }

.pref-danger {
  background: #fff; color: #8f4a42; border: 1px solid #fecaca;
  border-radius: 8px; padding: 8px 14px; font-size: 12px; cursor: pointer; font: inherit;
}
.pref-danger:hover { background: #f1e6e4; }

#btnPrefBrain { position: relative; }
#btnPrefBrain.pref-on { background: #efecf4 !important; }
.pref-dot {
  position: absolute; top: -6px; right: -6px; min-width: 15px; height: 15px;
  background: #b05a52; color: #fff; border-radius: 8px; font-size: 10px;
  line-height: 15px; text-align: center; padding: 0 4px;
}

/* ===== 云同步自检 ===== */
.sync-diag { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 10px; padding: 10px 12px; margin-bottom: 12px; }
.diag-head { font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.diag-head.ok { color: #2c6049; }
.diag-head.bad { color: #8f4a42; }
.diag-grid { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 11px; }
.diag-grid div { display: flex; gap: 6px; align-items: baseline; }
.diag-grid span { color: #94a3b8; }
.diag-grid b { color: #334155; font-weight: 600; word-break: break-all; }
.diag-tips {
  margin-top: 8px; padding-top: 8px; border-top: 1px solid #e2e8f0;
  font-size: 12px; color: #7a5a2c; line-height: 1.7;
}
.diag-tips b { color: #b45309; }
.diag-err {
  margin-top: 7px; font-size: 11px; color: #64748b; background: #fff;
  border: 1px dashed #cbd5e1; border-radius: 7px; padding: 6px 8px;
  word-break: break-all; line-height: 1.6;
}

/* ===== agent 分析区块 ===== */
.pref-agent { background: #fdfbff; border: 1px solid #f0e6ff; border-radius: 12px; padding: 12px; }
.pref-agent-status {
  font-size: 12px; color: #5d5490; background: #efecf4; border: 1px solid #e6ecf4;
  border-radius: 8px; padding: 7px 10px; margin-bottom: 10px;
}
.pref-agent-status.warn { color: #7a5a2c; background: #f7efe1; border-color: #fde68a; }

.pref-cfg { margin-bottom: 10px; }
.pref-cfg-row { display: flex; align-items: center; gap: 8px; margin-bottom: 7px; }
.pref-cfg-row label { width: 62px; font-size: 12px; color: #64748b; flex-shrink: 0; }
.pref-cfg-row input {
  flex: 1; border: 1px solid #e2e8f0; border-radius: 7px; padding: 6px 9px;
  font-size: 12px; font-family: inherit; color: #1f2937; background: #fff;
}
.pref-cfg-row input:focus { outline: none; border-color: #a855f7; }
.pref-cfg-act { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.pref-cfg-act .pref-hint { flex: 1; min-width: 160px; }

.pref-agent-bar { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.pref-mini {
  background: #fff; color: #5d5490; border: 1px solid #cdd6e4; border-radius: 7px;
  padding: 5px 11px; font-size: 12px; cursor: pointer; font-family: inherit;
}
.pref-mini:hover { background: #efecf4; }
.pref-mini:disabled { color: #94a3b8; border-color: #e2e8f0; cursor: default; }

.pref-report { background: #fff; border: 1px solid #e6ecf4; border-radius: 10px; padding: 10px 12px; margin-bottom: 10px; }
.pref-report-head { font-size: 11px; color: #94a3b8; margin-bottom: 5px; }
.pref-report-body { font-size: 13px; color: #334155; line-height: 1.75; white-space: pre-wrap; }

.pref-sub {
  font-size: 12px; font-weight: 600; color: #334155; margin: 12px 0 8px;
  display: flex; align-items: center; gap: 8px;
}
.pref-propose.conflict { border-left-color: #a97b32; background: #fffdf5; }
.pref-hyp {
  background: #fff; border: 1px dashed #cdd6e4; border-radius: 10px;
  padding: 8px 11px; margin-bottom: 7px;
}
.pref-hyp-text { font-size: 12px; color: #334155; line-height: 1.6; }
.pref-hyp-next { font-size: 11px; color: #94a3b8; margin-top: 3px; }

.pref-log { margin-top: 10px; border-top: 1px solid #f0e6ff; padding-top: 8px; }
.pref-log-line { font-size: 11px; color: #94a3b8; line-height: 1.9; }
.pref-log-line span { color: #c4b5fd; margin-right: 7px; }

/* 卡片上的个性化加/减分标签 */
.badge-pref-up { background: #efecf4; color: #5d5490; cursor: help; }
.badge-pref-down { background: #f1f5f9; color: #64748b; cursor: help; }

/* 空结果兜底提示（2026-10-04）：严格条件筛不出东西时，说清卡在哪并给放宽后的打底岗位 */
.fallback-note { background:#fff8e1; border:1px solid #ffe082; border-radius:10px; padding:12px 16px; margin-bottom:12px; font-size:13px; line-height:1.6; color:#6d4c41; }
.fallback-note .fn-head { font-weight:700; color:#8d6e63; margin-bottom:4px; }
.fallback-note .fn-body { color:#795548; }
