/* 销服数据链条导航 —— 现代简洁风格（浅色卡片 + 顶部导航 + 搜索筛选） */
:root {
  --brand: #1f6feb;
  --brand-dark: #1550b8;
  --brand-soft: #eaf1ff;
  --bg: #f5f7fb;
  --card: #ffffff;
  --text: #1b2333;
  --text-2: #5b6577;
  --text-3: #8a93a5;
  --line: #e6eaf2;
  --radius: 14px;
  --shadow-sm: 0 1px 2px rgba(20, 32, 60, .05);
  --shadow: 0 4px 16px rgba(20, 32, 60, .07);
  --shadow-lg: 0 12px 32px rgba(20, 32, 60, .12);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
    "Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }

/* ---------------------------------------------------------- 顶部导航 */
.topbar {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.topbar-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  gap: 28px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #3b82f6, #1f6feb 60%, #1550b8);
  color: #fff;
  font-weight: 700;
  font-size: 17px;
  display: grid;
  place-items: center;
  box-shadow: 0 3px 10px rgba(31, 111, 235, .32);
}

.brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.brand-text strong { font-size: 15px; letter-spacing: .2px; }
.brand-text small { font-size: 11px; color: var(--text-3); letter-spacing: .3px; }

.mainnav {
  display: flex;
  align-items: center;
  gap: 4px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
}
.mainnav::-webkit-scrollbar { display: none; }

.nav-item {
  padding: 7px 14px;
  border-radius: 999px;
  font-size: 13.5px;
  color: var(--text-2);
  white-space: nowrap;
  transition: all .18s ease;
  cursor: pointer;
  border: 1px solid transparent;
}
.nav-item:hover { background: var(--brand-soft); color: var(--brand-dark); }
.nav-item.active {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 3px 10px rgba(31, 111, 235, .28);
}
.nav-item .nav-count {
  font-size: 11px;
  opacity: .7;
  margin-left: 5px;
}

.topbar-actions { flex-shrink: 0; }

.icon-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--text-2);
  border-radius: 9px;
  padding: 7px 14px;
  font-size: 13px;
  cursor: pointer;
  transition: all .18s ease;
}
.icon-btn:hover { border-color: var(--brand); color: var(--brand); }

/* ---------------------------------------------------------- Hero */
.hero {
  background:
    radial-gradient(900px 260px at 12% -40%, #dbe8ff 0%, transparent 70%),
    radial-gradient(700px 220px at 88% -30%, #e6f0ff 0%, transparent 70%),
    linear-gradient(180deg, #fbfcff 0%, var(--bg) 100%);
  border-bottom: 1px solid var(--line);
}

.hero-inner {
  max-width: 1320px;
  margin: 0 auto;
  padding: 40px 24px 32px;
}

.hero h1 {
  margin: 0 0 6px;
  font-size: 27px;
  letter-spacing: -.4px;
}

.hero p {
  margin: 0 0 20px;
  color: var(--text-2);
  font-size: 14px;
}

.searchbox {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 620px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
  transition: border-color .18s, box-shadow .18s;
}
.searchbox:focus-within {
  border-color: var(--brand);
  box-shadow: 0 0 0 4px rgba(31, 111, 235, .12);
}
.search-icon {
  padding: 0 6px 0 14px;
  color: var(--text-3);
  font-size: 17px;
}
.searchbox input {
  flex: 1;
  border: 0;
  outline: 0;
  background: transparent;
  padding: 11px 8px;
  font-size: 14px;
  color: var(--text);
}
.clear-btn {
  border: 0;
  background: transparent;
  color: var(--text-3);
  font-size: 12.5px;
  padding: 0 14px;
  cursor: pointer;
}
.clear-btn:hover { color: var(--brand); }

.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}
.stat-pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 14px;
  font-size: 12.5px;
  color: var(--text-2);
  box-shadow: var(--shadow-sm);
}
.stat-pill b { color: var(--brand); font-size: 14px; margin-right: 3px; }

/* ---------------------------------------------------------- 布局 */
.container {
  max-width: 1320px;
  margin: 0 auto;
  padding: 26px 24px 60px;
  display: grid;
  grid-template-columns: 208px minmax(0, 1fr);
  gap: 26px;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: 86px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}

.filter-block + .filter-block {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px dashed var(--line);
}

.filter-block h3 {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-3);
  letter-spacing: .8px;
  text-transform: uppercase;
}

.chips { display: flex; flex-wrap: wrap; gap: 7px; }

.chip {
  border: 1px solid var(--line);
  background: #fbfcfe;
  color: var(--text-2);
  border-radius: 8px;
  padding: 4px 10px;
  font-size: 12.5px;
  cursor: pointer;
  transition: all .16s ease;
  user-select: none;
}
.chip:hover { border-color: #b9cdf5; color: var(--brand-dark); background: var(--brand-soft); }
.chip.active {
  background: var(--brand);
  border-color: var(--brand);
  color: #fff;
  box-shadow: 0 2px 8px rgba(31, 111, 235, .25);
}

/* ---------------------------------------------------------- 内容区 */
.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  min-height: 28px;
}

.crumbs { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 13px; }
.crumbs .crumb { color: var(--text-2); cursor: pointer; }
.crumbs .crumb:hover { color: var(--brand); }
.crumbs .crumb.current { color: var(--text); font-weight: 600; cursor: default; }
.crumbs .sep { color: var(--text-3); font-size: 12px; }

.result-count { font-size: 12.5px; color: var(--text-3); white-space: nowrap; }
.result-count b { color: var(--brand); }

.board { display: flex; flex-direction: column; gap: 22px; }

.group {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow .2s ease;
}
.group:hover { box-shadow: var(--shadow); }

.group-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fdfdff, #fafbfe);
}
.group-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.1px;
}
.group-head .badge {
  background: var(--brand-soft);
  color: var(--brand-dark);
  border-radius: 999px;
  padding: 1px 9px;
  font-size: 11.5px;
  font-weight: 600;
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 12px;
  padding: 16px 18px 18px;
}

.card {
  display: block;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 13px 14px;
  background: #fff;
  transition: all .18s ease;
  position: relative;
}
.card:hover {
  border-color: #b9cdf5;
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}

.card-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.45;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card:hover .card-title { color: var(--brand-dark); }

.src-tag {
  flex-shrink: 0;
  font-size: 11px;
  padding: 1px 7px;
  border-radius: 6px;
  font-weight: 600;
  letter-spacing: .2px;
}
.src-EasyBI { background: #e8f0ff; color: #1f5fd0; }
.src-UData { background: #e6f7ef; color: #12805c; }
.src-JoySpace { background: #fff2e2; color: #b4600a; }
.src-鲸盘 { background: #eef0ff; color: #4b45c6; }
.src-华南销售 { background: #fdeaf0; color: #b02a5b; }
.src-其他 { background: #f0f2f6; color: #5b6577; }

.card-desc {
  font-size: 12.5px;
  color: var(--text-2);
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 39px;
}

.card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 9px;
  border-top: 1px dashed var(--line);
  font-size: 12px;
  color: var(--text-3);
}
.owner::before { content: "接口人 "; opacity: .7; }
.owner { color: var(--text-2); }
.open-hint { color: var(--brand); opacity: 0; transition: opacity .18s; }
.card:hover .open-hint { opacity: 1; }

/* ---------------------------------------------------------- 状态 */
.loading, .empty, .error {
  text-align: center;
  padding: 70px 20px;
  color: var(--text-3);
  font-size: 14px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.error { color: #c0392b; }
.empty-icon { font-size: 34px; display: block; margin-bottom: 10px; opacity: .5; }

.footer {
  border-top: 1px solid var(--line);
  background: #fff;
  padding: 18px 24px;
  text-align: center;
  font-size: 12.5px;
  color: var(--text-3);
}

/* ---------------------------------------------------------- 响应式 */
@media (max-width: 960px) {
  .container { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .filter-block + .filter-block { margin-top: 14px; padding-top: 14px; }
  .brand-text small { display: none; }
}

@media (max-width: 640px) {
  .topbar-inner { padding: 0 14px; gap: 14px; height: 56px; }
  .hero-inner { padding: 26px 14px 22px; }
  .hero h1 { font-size: 21px; }
  .container { padding: 18px 14px 40px; }
  .cards { grid-template-columns: 1fr; padding: 14px; }
  .group-head { padding: 12px 14px; }
  .toolbar { flex-direction: column; align-items: flex-start; gap: 6px; }
}