/* ===== 共享样式：表格 / 卡片 ===== */

/* 公司 Avatar (首字母圆形 / Logo) */
.company-cell { display: flex; align-items: center; gap: 10px; min-width: 0; }
.company-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 800;
  font-size: 13px;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0,0,0,.12);
  position: relative;
  overflow: hidden;
  background: var(--bg-card, #fff);
}
/* 真实 logo 容器: 透明背景 + 居中 */
.company-avatar.logo { background: #fff; }
.company-avatar.logo img {
  width: 80%;
  height: 80%;
  object-fit: contain;
  display: block;
}
/* onerror 回退首字 */
.company-avatar.letter-fallback { color: white; }
.company-avatar::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  pointer-events: none;
}
.company-info { display: flex; flex-direction: column; min-width: 0; }
.company-name {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}
.company-sub {
  font-size: 10px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 180px;
}

/* 连续同公司标记（视觉合并） */
.company-cell.dup .company-avatar {
  opacity: 0.35;
  background: var(--text-faint) !important;
  box-shadow: none;
}
.company-cell.dup .company-name { color: var(--text-soft); font-weight: 500; }
.company-cell.dup .company-sub { display: none; }

/* 加载更多按钮 */
.btn-load-more, .btn-load-all {
  display: inline-block;
  margin-left: 6px;
  padding: 3px 10px;
  border: 1px solid var(--accent, #5b8def);
  border-radius: 4px;
  background: transparent;
  color: var(--accent, #5b8def);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all .15s ease;
}
.btn-load-more:hover, .btn-load-all:hover {
  background: var(--accent, #5b8def);
  color: white;
}
.btn-load-all {
  border-color: var(--text-faint, #999);
  color: var(--text-faint, #999);
}
.btn-load-all:hover {
  background: var(--text-faint, #999);
  color: white;
}

/* 薪资渐变高亮 */
.salary-cell {
  font-size: 17px;
  font-weight: 800;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  -webkit-background-clip: text; -webkit-text-fill-color: transparent;
  background-clip: text;
  font-feature-settings: "tnum";
  white-space: nowrap;
}
.salary-cell .unit { font-size: 11px; font-weight: 500; -webkit-text-fill-color: var(--text-soft); margin-left: 2px; }
.salary-cell.empty { color: var(--text-faint); -webkit-text-fill-color: var(--text-faint); font-weight: 500; font-size: 13px; }

/* Chip 化字段 */
.chip-sm {
  display: inline-flex; align-items: center; gap: 4px;
  background: var(--card-2);
  color: var(--text-soft);
  padding: 3px 8px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
  border: 1px solid var(--border);
}
.chip-sm.location { color: #3b82f6; }
.chip-sm.degree { color: #8b5cf6; }
.chip-sm.experience { color: #f59e0b; }
.chip-sm.industry { color: #10b981; }
.chip-sm.jobtype { background: linear-gradient(135deg, rgba(99,102,241,.08), rgba(139,92,246,.08)); color: var(--accent); border-color: transparent; }
.chip-sm.source { font-weight: 600; }
.chip-sm.source.boss { background: linear-gradient(135deg, #dbeafe, #e0e7ff); color: #3730a3; }
.chip-sm.source.liep { background: linear-gradient(135deg, #d1fae5, #a7f3d0); color: #065f46; }
.chip-sm.source.zhilian { background: linear-gradient(135deg, #fce7f3, #fbcfe8); color: #9f1239; }

/* 岗位名称（主信息） */
.job-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 280px;
}
.job-tags { display: flex; gap: 4px; flex-wrap: wrap; }
.job-tag {
  display: inline-block;
  background: rgba(99,102,241,.08);
  color: var(--accent);
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 10px;
  font-weight: 600;
}
.job-tag.danger { background: rgba(239,68,68,.08); color: #ef4444; }
.job-tag.success { background: rgba(16,185,129,.08); color: #10b981; }

/* 链接按钮 */
.btn-link {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 5px 12px;
  background: var(--accent);
  color: white;
  border-radius: 8px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
  transition: all .2s ease;
  white-space: nowrap;
}
.btn-link:hover {
  background: var(--accent-2);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(99,102,241,.3);
}

/* 表格整体优化 */
.data-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 6px;
  padding: 4px 0;
}
.data-table thead th {
  background: transparent;
  color: var(--text-faint);
  font-weight: 700;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: .6px;
  padding: 8px 12px;
  text-align: left;
  position: sticky; top: 0; z-index: 5;
  border-bottom: 1px solid var(--border);
}
.data-table tbody tr {
  background: var(--card-solid);
  border: 1px solid var(--border);
  transition: all .2s ease;
  cursor: pointer;
}
.data-table tbody tr:hover {
  border-color: var(--accent);
  box-shadow: 0 8px 20px -4px rgba(99,102,241,.15);
  transform: translateY(-1px);
}
.data-table tbody td {
  padding: 14px 12px;
  font-size: 13px;
  border: none;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody td:first-child {
  border-left: 1px solid var(--border);
  border-top-left-radius: 12px;
  border-bottom-left-radius: 12px;
}
.data-table tbody td:last-child {
  border-right: 1px solid var(--border);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
}
.data-table tbody tr:hover td { border-color: var(--accent); }

/* 紧凑表格（雷达样本） */
.data-table.compact tbody td { padding: 10px 10px; font-size: 12px; }
.data-table.compact .job-name { font-size: 13px; max-width: 200px; }
.data-table.compact .company-name { max-width: 130px; font-size: 12px; }

/* 主题适配：深色 */
[data-theme="dark"] .chip-sm { background: rgba(20,27,56,.5); }
[data-theme="dark"] .chip-sm.location { color: #60a5fa; background: rgba(59,130,246,.15); }
[data-theme="dark"] .chip-sm.degree { color: #a78bfa; background: rgba(139,92,246,.15); }
[data-theme="dark"] .chip-sm.experience { color: #fbbf24; background: rgba(245,158,11,.15); }
[data-theme="dark"] .chip-sm.industry { color: #34d399; background: rgba(16,185,129,.15); }
[data-theme="dark"] .chip-sm.source.boss { background: rgba(59,130,246,.15); color: #bfdbfe; }
[data-theme="dark"] .chip-sm.source.liep { background: rgba(16,185,129,.15); color: #a7f3d0; }
[data-theme="dark"] .chip-sm.source.zhilian { background: rgba(236,72,153,.15); color: #fbcfe8; }
[data-theme="dark"] .job-tag { background: rgba(99,102,241,.15); }
