/* 品牌对比 */
.bc-tray {
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 280px;
  z-index: 70;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.12);
  overflow: hidden;
}

.bc-tray.is-collapsed .bc-tray-body,
.bc-tray.is-collapsed .bc-tray-foot {
  display: none;
}

.bc-tray-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #eef2f7;
}

.bc-tray-title {
  font-size: 13px;
  font-weight: 700;
  color: #0f172a;
}

.bc-tray-head-actions {
  display: flex;
  gap: 8px;
}

.bc-tray-link,
.bc-tray-toggle {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--bd-primary, #3c66ff);
  font-size: 12px;
  cursor: pointer;
  padding: 0;
}

.bc-tray-body {
  max-height: 240px;
  overflow: auto;
  padding: 8px 10px;
}

.bc-tray-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 0;
}

.bc-tray-avatar {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  object-fit: cover;
  background: #f1f5f9;
  flex-shrink: 0;
}

.bc-tray-avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.bc-tray-name {
  flex: 1;
  min-width: 0;
  font-size: 12px;
  color: #334155;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bc-tray-remove {
  appearance: none;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.bc-tray-foot {
  padding: 10px 12px 12px;
  border-top: 1px solid #eef2f7;
}

.bc-tray-start {
  width: 100%;
  height: 36px;
  border: 0;
  border-radius: 8px;
  background: var(--bd-primary, #3c66ff);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

.bc-tray-start:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bc-modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
}

.bc-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
}

.bc-modal-panel {
  position: relative;
  width: min(520px, calc(100vw - 32px));
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
}

.bc-modal-head,
.bc-modal-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid #f1f5f9;
}

.bc-modal-foot {
  border-bottom: 0;
  border-top: 1px solid #f1f5f9;
  justify-content: flex-end;
}

.bc-modal-head h3 {
  margin: 0;
  font-size: 16px;
}

.bc-modal-close {
  appearance: none;
  border: 0;
  background: transparent;
  font-size: 22px;
  color: #94a3b8;
  cursor: pointer;
}

.bc-modal-body {
  padding: 16px;
}

.bc-modal-sec {
  margin-bottom: 18px;
}

.bc-modal-sec h4 {
  margin: 0 0 10px;
  padding-left: 8px;
  border-left: 3px solid var(--bd-primary, #3c66ff);
  font-size: 14px;
}

.bc-hint {
  margin: -4px 0 10px;
  font-size: 12px;
  color: #94a3b8;
}

.bc-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.bc-chip {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  color: #475569;
}

.bc-chip.is-active {
  border-color: var(--bd-primary, #3c66ff);
  color: var(--bd-primary, #3c66ff);
  background: #eef2ff;
  font-weight: 600;
}

.bc-date-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bc-input {
  height: 36px;
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 0 10px;
  font-size: 13px;
  flex: 1;
  min-width: 0;
}

.bc-btn {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 8px;
  height: 34px;
  padding: 0 14px;
  font-size: 13px;
  cursor: pointer;
  color: #334155;
}

.bc-btn-primary {
  background: var(--bd-primary, #3c66ff);
  border-color: var(--bd-primary, #3c66ff);
  color: #fff;
  font-weight: 600;
}

.bc-page {
  max-width: 1100px;
  margin: 0 auto;
  padding: 8px 0 32px;
}

.bc-page-title {
  margin: 0 0 4px;
  font-size: 20px;
}

.bc-page-sub {
  margin: 0;
  color: #64748b;
  font-size: 13px;
}

.bc-empty,
.bc-state {
  padding: 48px 16px;
  text-align: center;
  color: #64748b;
}

.bc-state.is-error {
  color: var(--bd-down, #f53f3f);
}

.bc-hist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.bc-hist-card {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 12px;
  background: #fff;
  cursor: pointer;
}

.bc-hist-avatars {
  display: flex;
  gap: 6px;
  margin-bottom: 8px;
}

.bc-hist-names {
  font-size: 13px;
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 8px;
}

.bc-hist-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: #94a3b8;
}

.bc-hist-del {
  appearance: none;
  border: 0;
  background: transparent;
  color: #94a3b8;
  cursor: pointer;
}

.bc-result-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.bc-result-toolbar h2 {
  margin: 0 0 4px;
  font-size: 18px;
}

.bc-result-meta {
  font-size: 12px;
  color: #64748b;
}

.bc-result-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.bc-tabs {
  display: flex;
  gap: 0;
  border-bottom: 1px solid #e8ecf3;
  margin-bottom: 14px;
}

.bc-tab {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 10px 16px;
  font-size: 13px;
  color: #64748b;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.bc-tab.is-active {
  color: var(--bd-primary, #3c66ff);
  font-weight: 600;
  border-bottom-color: var(--bd-primary, #3c66ff);
}

.bc-table-wrap {
  overflow: auto;
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 10px;
}

.bc-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
  font-size: 12px;
}

.bc-table th,
.bc-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f1f5f9;
  text-align: center;
  vertical-align: middle;
}

.bc-table th:first-child,
.bc-table td:first-child {
  text-align: left;
  position: sticky;
  left: 0;
  background: #fff;
  z-index: 1;
  min-width: 140px;
}

.bc-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 500;
}

.bc-table td.is-best {
  background: #eef2ff;
  font-weight: 600;
  color: #1e3a8a;
}

.bc-td-text {
  text-align: left !important;
  max-width: 220px;
  word-break: break-word;
}

.bc-brand-th {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.bc-th-avatar {
  width: 28px;
  height: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.bs-compare-check,
.br-compare-check {
  appearance: none;
  border: 1px solid #e2e8f0;
  background: #fff;
  border-radius: 6px;
  padding: 2px 8px;
  font-size: 12px;
  color: #64748b;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin-right: 6px;
  vertical-align: middle;
}

.bs-compare-check.is-on,
.br-compare-check.is-on {
  border-color: var(--bd-primary, #3c66ff);
  color: var(--bd-primary, #3c66ff);
  background: #eef2ff;
}

@media print {
  .bd-sidebar,
  .bd-topbar,
  .bc-tray,
  .bc-modal,
  .bc-result-toolbar,
  .bc-tabs {
    display: none !important;
  }
}
