/* MCN 机构搜索 */
#bdMcnSearch {
  width: 100%;
  min-height: calc(100vh - var(--bd-topbar-h, 56px));
}

html.bd-view-mcn-search .bd-main,
.bd-main:has(> #bdMcnSearch:not([hidden])) {
  padding: 12px 16px 24px;
  overflow: auto;
  max-height: calc(100vh - var(--bd-topbar-h, 56px));
}

.ms-root {
  font-size: 12px;
}

.ms-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.ms-head h1 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: #1e293b;
}

.ms-stats {
  font-size: 11px;
  color: #94a3b8;
}

.ms-filters {
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 10px;
}

.ms-search-row {
  display: flex;
  gap: 8px;
  margin-bottom: 12px;
}

.ms-search-input {
  flex: 1;
  min-width: 200px;
  height: 36px;
  padding: 0 12px;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  font-size: 13px;
}

.ms-search-btn {
  height: 36px;
  padding: 0 18px;
  border: none;
  border-radius: 8px;
  background: #7c3aed;
  color: #fff;
  font-size: 13px;
  cursor: pointer;
}

.ms-filter-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 8px;
}

.ms-filter-row.is-disabled {
  opacity: 0.65;
}

.ms-filter-label {
  flex: 0 0 88px;
  color: #64748b;
  line-height: 28px;
  white-space: nowrap;
}

.ms-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  flex: 1;
}

.ms-chip {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e8ecf3;
  border-radius: 6px;
  background: #fff;
  color: #64748b;
  font-size: 12px;
  cursor: pointer;
}

.ms-chip.is-active {
  border-color: #c4b5fd;
  background: #f5f3ff;
  color: #7c3aed;
  font-weight: 600;
}

.ms-hint {
  color: #94a3b8;
  line-height: 28px;
  font-size: 12px;
}

.ms-table-wrap {
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 8px 8px 0 0;
  overflow: auto;
}

.ms-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 980px;
}

.ms-table th,
.ms-table td {
  padding: 12px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: middle;
}

.ms-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}

.ms-th-sort {
  cursor: pointer;
  user-select: none;
}

.ms-th-sort:hover {
  color: #7c3aed;
}

.ms-sort-ico {
  color: #94a3b8;
  font-size: 10px;
}

.ms-th-action {
  width: 72px;
}

.ms-agency {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 180px;
}

.ms-logo {
  width: 44px;
  height: 44px;
  border-radius: 8px;
  object-fit: cover;
  background: #f1f5f9;
  flex-shrink: 0;
}

.ms-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
}

.ms-agency-meta {
  min-width: 0;
}

.ms-agency-name {
  font-weight: 600;
  color: #1e293b;
}

.ms-cert {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 16px;
  height: 16px;
  margin-left: 4px;
  border-radius: 50%;
  background: #7c3aed;
  color: #fff;
  font-size: 10px;
  vertical-align: middle;
}

.ms-loc {
  margin-top: 2px;
  color: #94a3b8;
  font-size: 11px;
}

.ms-desc {
  margin-top: 4px;
  color: #64748b;
  font-size: 11px;
  line-height: 1.4;
  max-width: 280px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.ms-type {
  display: inline-block;
  margin-top: 4px;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 10px;
  font-weight: 600;
}

.ms-type-comprehensive_affiliate { color: #6d28d9; background: #f3e8ff; }
.ms-type-comprehensive { color: #2563eb; background: #eff6ff; }
.ms-type-vertical_head, .ms-type-vertical { color: #c2410c; background: #ffedd5; }
.ms-type-vertical_growth { color: #b45309; background: #fef3c7; }
.ms-type-waist { color: #0f766e; background: #ccfbf1; }
.ms-type-growth { color: #15803d; background: #dcfce7; }
.ms-type-tail { color: #64748b; background: #f1f5f9; }
.ms-type-unknown { color: #94a3b8; background: #f8fafc; }

.ms-metric {
  font-weight: 600;
  color: #2563eb;
  white-space: nowrap;
}

.ms-tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 260px;
}

.ms-tag {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  background: #f1f5f9;
  color: #64748b;
  font-size: 11px;
  white-space: nowrap;
}

.ms-bloggers {
  display: flex;
  gap: 6px;
}

.ms-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid #fff;
  box-shadow: 0 0 0 1px #e8ecf3;
}

.ms-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f5f9;
  font-size: 12px;
}

.ms-link {
  color: #7c3aed;
  text-decoration: none;
  font-weight: 500;
}

.ms-link:hover {
  text-decoration: underline;
}

.ms-scroll-footer {
  padding: 16px;
  text-align: center;
  background: #fff;
  border: 1px solid #e8ecf3;
  border-top: none;
  border-radius: 0 0 8px 8px;
}

.ms-scroll-hint {
  font-size: 12px;
  color: #94a3b8;
}

.ms-scroll-hint.is-done { color: #64748b; }
.ms-scroll-hint.is-error { color: #ef4444; }

.ms-loading,
.ms-empty,
.ms-error,
.ms-boot-placeholder {
  padding: 48px 16px;
  text-align: center;
  color: #94a3b8;
  font-size: 13px;
}

.ms-boot-placeholder {
  min-height: 240px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ms-error { color: #ef4444; }
