/* 客户案例页专属样式（复用 style.css 的 --accent 等变量） */

/* ---------- 筛选栏 ---------- */
.filter-bar {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px 22px;
  margin-bottom: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.filter-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.filter-label {
  font-size: 13px;
  color: var(--text-sub);
  min-width: 52px;
  flex-shrink: 0;
}

.sort-row { justify-content: flex-start; }
.industry-search {
  font: inherit;
  font-size: 14px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  outline: none;
  min-width: 220px;
  max-width: 360px;
  flex: 1;
}
.industry-search:focus { border-color: var(--accent); }
.sort-select {
  font: inherit;
  font-size: 14px;
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  cursor: pointer;
  outline: none;
}
.sort-select:focus { border-color: var(--accent); }
.result-count {
  margin-left: auto;
  font-size: 13px;
  color: var(--text-sub);
}

/* ---------- 卡片网格 ---------- */
.case-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.case-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  transition: box-shadow 0.2s, transform 0.2s;
}
.case-card:hover {
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}
.case-top {
  display: flex;
  align-items: center;
  gap: 12px;
}
.avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  flex-shrink: 0;
  object-fit: cover;
  background: var(--bg-soft);
}
.avatar.placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #eef6ff, #e2eaf2);
  color: var(--accent);
  font-size: 22px;
  font-weight: 700;
  overflow: hidden;
}
.case-id {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.name-row {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.case-name {
  font-size: 16px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-meta {
  font-size: 12px;
  color: var(--text-sub);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.case-brief {
  font-size: 13px;
  color: var(--text-sub);
  line-height: 1.6;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 42px;
}
.case-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.stat-pill {
  font-size: 12px;
  padding: 3px 10px;
  border-radius: 980px;
  background: var(--bg-soft);
  color: var(--text-sub);
}
.stat-pill.accent { background: #eef6ff; color: var(--accent); }
.stat-pill.factor { background: #fff4e0; color: #b25000; }
.stat-pill.factor.low { background: #e8a33d; color: #4d2000; }
.stat-pill.factor.red { background: #ffd9d9; color: #d70015; }
.stat-pill.factor.high { background: #d7f2df; color: #146c2e; }

.estimate-note {
  font-size: 12px;
  color: var(--text-sub);
  margin-top: 20px;
  text-align: center;
}
.empty-tip {
  text-align: center;
  color: var(--text-sub);
  padding: 60px 0;
  font-size: 15px;
}

@media (max-width: 640px) {
  .case-grid { grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 12px; }
  .case-card { padding: 14px; }
  .avatar { width: 44px; height: 44px; }
}
