/* 品牌详情页 · 仅小红书 */
#bdBrandDetail {
  width: 100%;
  min-height: calc(100vh - var(--bd-topbar-h, 56px));
}

html.bd-view-brand-detail .bd-main,
.bd-main:has(> #bdBrandDetail:not([hidden])) {
  padding: 12px 16px 24px;
  overflow: auto;
  max-height: calc(100vh - var(--bd-topbar-h, 56px));
}

.bdt-root {
  font-size: 12px;
  color: #334155;
}

.bdt-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

@media (max-width: 960px) {
  .bdt-layout {
    grid-template-columns: 1fr;
  }
}

.bdt-side {
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 10px;
  padding: 14px;
  position: sticky;
  top: 8px;
}

.bdt-logo {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  background: #f1f5f9;
}

.bdt-logo-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
}

.bdt-name {
  margin: 10px 0 4px;
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.bdt-verify {
  font-size: 11px;
  color: #64748b;
  margin-bottom: 8px;
}

.bdt-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-bottom: 12px;
}

.bdt-tag {
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff1f2;
  color: #e11d48;
  font-size: 11px;
}

.bdt-summary-title {
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 8px;
  color: #475569;
}

.bdt-summary-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.bdt-summary-item {
  background: #f8fafc;
  border-radius: 8px;
  padding: 8px;
}

.bdt-summary-val {
  font-size: 14px;
  font-weight: 700;
  color: #e11d48;
}

.bdt-summary-lbl {
  font-size: 10px;
  color: #94a3b8;
  margin-top: 2px;
}

.bdt-main {
  min-width: 0;
}

.bdt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border-bottom: 1px solid #e8ecf3;
  margin-bottom: 12px;
  background: #fff;
  border-radius: 10px 10px 0 0;
  padding: 0 8px;
}

.bdt-tab {
  height: 42px;
  padding: 0 14px;
  border: none;
  background: transparent;
  color: #64748b;
  font-size: 13px;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
}

.bdt-tab.is-active {
  color: #e11d48;
  font-weight: 600;
  border-bottom-color: #e11d48;
}

.bdt-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  padding: 10px 12px;
}

.bdt-chip {
  height: 28px;
  padding: 0 10px;
  border: 1px solid #e8ecf3;
  border-radius: 999px;
  background: #fff;
  color: #475569;
  font-size: 12px;
  cursor: pointer;
}

.bdt-chip.is-active {
  border-color: #fecdd3;
  background: #fff1f2;
  color: #e11d48;
  font-weight: 600;
}

.bdt-panel {
  display: none;
}

.bdt-panel.is-active {
  display: block;
}

.bdt-kpi-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.bdt-kpi {
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  padding: 12px;
}

.bdt-kpi-val {
  font-size: 18px;
  font-weight: 700;
  color: #0f172a;
}

.bdt-kpi-lbl {
  font-size: 11px;
  color: #94a3b8;
  margin-top: 4px;
}

.bdt-card {
  background: #fff;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  padding: 12px 14px;
  margin-bottom: 12px;
}

.bdt-card-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0 0 10px;
  padding-left: 8px;
  border-left: 3px solid #e11d48;
}

.bdt-chart {
  width: 100%;
  height: 200px;
  overflow: hidden;
}

.bdt-chart svg {
  width: 100%;
  height: 100%;
}

.bdt-portrait-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 768px) {
  .bdt-portrait-row {
    grid-template-columns: 1fr;
  }
}

.bdt-donut-wrap {
  display: flex;
  align-items: center;
  gap: 16px;
}

.bdt-donut {
  width: 100px;
  height: 100px;
  border-radius: 50%;
  flex-shrink: 0;
}

.bdt-legend {
  flex: 1;
  font-size: 12px;
}

.bdt-legend-item {
  display: flex;
  justify-content: space-between;
  margin-bottom: 6px;
}

.bdt-table-wrap {
  overflow-x: auto;
}

.bdt-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.bdt-table th,
.bdt-table td {
  padding: 10px;
  border-bottom: 1px solid #f1f5f9;
  text-align: left;
  vertical-align: middle;
}

.bdt-table th {
  background: #f8fafc;
  color: #64748b;
  font-weight: 500;
  white-space: nowrap;
}

.bdt-note-cell {
  display: flex;
  gap: 10px;
  min-width: 240px;
}

.bdt-note-cover {
  width: 48px;
  height: 64px;
  border-radius: 6px;
  object-fit: cover;
  background: #f1f5f9;
  flex-shrink: 0;
}

.bdt-note-title {
  font-weight: 600;
  color: #0f172a;
  margin-bottom: 4px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.bdt-note-meta {
  font-size: 11px;
  color: #94a3b8;
}

.bdt-kol-cell {
  display: flex;
  align-items: center;
  gap: 8px;
}

.bdt-num-highlight {
  color: #e11d48;
  font-weight: 600;
}

.bdt-matrix {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.bdt-matrix-item {
  text-align: center;
  padding: 10px 6px;
  background: #fff1f2;
  border-radius: 8px;
}

.bdt-matrix-val {
  font-size: 16px;
  font-weight: 700;
  color: #e11d48;
}

.bdt-matrix-lbl {
  font-size: 10px;
  color: #64748b;
  margin-top: 4px;
}

.bdt-status {
  padding: 40px;
  text-align: center;
  color: #64748b;
}

.bdt-status-error {
  color: #dc2626;
}

.bdt-link {
  color: #e11d48;
  text-decoration: none;
}

.bdt-link:hover {
  text-decoration: underline;
}

.bdt-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.bdt-page-btn {
  height: 32px;
  padding: 0 12px;
  border: 1px solid #e8ecf3;
  border-radius: 8px;
  background: #fff;
  cursor: pointer;
}

.bdt-page-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.bdt-hint {
  font-size: 11px;
  color: #94a3b8;
  margin-left: auto;
}
