:root {
  color-scheme: light;
  font-family: Inter, "PingFang SC", "Microsoft YaHei", Arial, sans-serif;
  font-size: 13px;
  color: #16161c;
  background: #f6f6f8;
  --background: #f6f6f8;
  --surface: #ffffff;
  --border: #e5e5eb;
  --text: #16161c;
  --text-secondary: #4a4a55;
  --muted: #8a8a96;
  --primary: #2b2a6b;
  --accent: #ff2d6f;
  --success: #12a150;
  --down: #6b7b8c;
  --warning-bg: #fffbea;
  --warning-border: #eadfaa;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 1280px;
  min-height: 100%;
  margin: 0;
  background: var(--background);
}

body {
  min-height: 100dvh;
  font-variant-numeric: tabular-nums;
}

button,
input,
select {
  font: inherit;
  letter-spacing: 0;
}

button {
  color: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 2px solid #8584c2;
  outline-offset: 1px;
}

.topbar {
  position: sticky;
  z-index: 40;
  top: 0;
  height: 48px;
  border-bottom: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.98);
}

.topbar-inner {
  display: flex;
  width: min(100% - 40px, 1280px);
  height: 48px;
  margin: 0 auto;
  align-items: stretch;
}

.brand {
  display: flex;
  width: 168px;
  align-items: center;
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.brand span {
  margin-left: 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.topbar nav {
  display: flex;
  height: 100%;
  align-items: stretch;
}

.role-switch {
  display: flex;
  height: 28px;
  margin: auto 0 auto auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  align-items: center;
  overflow: hidden;
  background: #fff;
}

.role-switch > span {
  padding: 0 9px;
  color: var(--muted);
  font-size: 10px;
}

.role-switch button {
  height: 26px;
  padding: 0 10px;
  border: 0;
  border-left: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.role-switch button.active {
  background: var(--primary);
  color: #fff;
}

.nav-link {
  position: relative;
  min-width: 54px;
  height: 100%;
  padding: 0 13px;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.nav-link::after {
  position: absolute;
  right: 11px;
  bottom: 0;
  left: 11px;
  height: 2px;
  background: transparent;
  content: "";
}

.nav-link:hover,
.nav-link.active {
  color: var(--primary);
}

.nav-link.active::after {
  background: var(--primary);
}

.page-shell {
  width: min(100% - 40px, 1280px);
  margin: 0 auto;
  padding: 20px 0 54px;
}

.import-bar {
  display: flex;
  min-height: 44px;
  margin-bottom: 12px;
  padding: 0 2px 10px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.import-source {
  display: flex;
  min-width: 0;
  align-items: baseline;
  gap: 10px;
}

.import-source strong {
  font-size: 12px;
}

.import-source span,
.import-source small {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-source small {
  color: var(--down);
}

.toolbar,
.panel,
.notice-strip,
.free-topic-bar {
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.toolbar {
  display: flex;
  min-height: 54px;
  padding: 10px 12px;
  align-items: center;
  gap: 8px;
}

.primary-toolbar {
  margin-bottom: 12px;
}

.secondary-toolbar {
  min-height: 48px;
  margin-bottom: 14px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.toolbar-rule {
  width: 1px;
  height: 25px;
  margin: 0 2px;
  background: var(--border);
}

.toolbar-note {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.segmented {
  display: inline-flex;
  min-height: 30px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  overflow: hidden;
  vertical-align: middle;
}

.segmented button {
  height: 30px;
  padding: 0 12px;
  border: 0;
  border-right: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
}

.segmented button:last-child {
  border-right: 0;
}

.segmented button:hover {
  background: #f8f8fa;
}

.segmented button.active {
  background: var(--primary);
  color: #fff;
}

.filter-button {
  display: flex;
  height: 32px;
  min-width: 116px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  align-items: center;
  gap: 7px;
  background: #fff;
  cursor: pointer;
}

.filter-button span:first-child {
  color: var(--muted);
  font-size: 11px;
}

.filter-button b {
  color: var(--text-secondary);
  font-weight: 400;
  white-space: nowrap;
}

.filter-button .chevron {
  margin-left: auto;
  color: var(--muted);
}

.search-box {
  display: flex;
  min-width: 200px;
  height: 32px;
  flex: 1 1 auto;
  border: 1px solid var(--border);
  border-radius: 4px;
  align-items: center;
  background: #fff;
}

.search-box > span {
  width: 31px;
  color: var(--muted);
  font-size: 18px;
  text-align: center;
}

.search-box input {
  width: 100%;
  height: 30px;
  padding: 0 10px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
}

.search-box input::placeholder {
  color: var(--muted);
}

.topic-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(360px, 0.94fr);
  gap: 14px;
  align-items: start;
}

.panel {
  min-width: 0;
  overflow: hidden;
}

.panel-heading {
  display: flex;
  min-height: 62px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
}

.panel-heading.inline {
  min-height: 54px;
  justify-content: space-between;
}

.panel-heading strong {
  display: block;
  font-size: 13px;
}

.panel-heading small,
.entity-title span,
.data-table td small,
.creator-cell small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 400;
}

.table-scroll {
  width: 100%;
  overflow: auto;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  table-layout: fixed;
}

.data-table th {
  height: 38px;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-weight: 500;
  text-align: left;
  text-transform: none;
  white-space: nowrap;
}

.data-table th button {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
  cursor: pointer;
}

.data-table td {
  height: 52px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  line-height: 1.35;
  vertical-align: middle;
}

.data-table tbody tr:last-child > td {
  border-bottom: 0;
}

.data-table .clickable,
tr.clickable {
  cursor: pointer;
}

.data-table tr.clickable:hover td {
  background: #fafafd;
}

.data-table tr.selected td,
.data-table tr.pinned td {
  background: #f7f7fc;
}

.topic-table {
  min-width: 860px;
}

.topic-table th:nth-child(1) { width: 40px; }
.topic-table th:nth-child(2) { width: 112px; }
.topic-table th:nth-child(3) { width: 160px; }
.topic-table th:nth-child(4) { width: 86px; }
.topic-table th:nth-child(5) { width: 84px; text-align: right; }
.topic-table th:nth-child(6),
.topic-table th:nth-child(7) { width: 86px; text-align: right; }
.topic-table th:nth-child(8) { width: 112px; }
.topic-table th:nth-child(9) { width: 86px; }
.topic-table td:nth-child(5),
.topic-table td:nth-child(6),
.topic-table td:nth-child(7) { text-align: right; }

.strong-cell {
  color: var(--text) !important;
  font-weight: 600;
}

.numeric {
  text-align: right;
}

.muted {
  color: var(--muted) !important;
}

.up,
.metric-growth.up {
  color: var(--success) !important;
}

.down,
.metric-growth.down {
  color: var(--down) !important;
}

.metric-growth {
  font-weight: 600;
  white-space: nowrap;
}

.accent {
  color: var(--accent) !important;
  font-weight: 700;
}

.bound {
  color: var(--text-secondary);
  font-size: 11px;
}

.tag,
.status-tag {
  display: inline-flex;
  min-height: 20px;
  padding: 2px 6px;
  border: 1px solid #dcdce4;
  border-radius: 4px;
  align-items: center;
  background: #f5f5f8;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.2;
  white-space: nowrap;
}

.status-tag.success {
  border-color: #b9dfca;
  background: #f1fbf5;
  color: #0b7b3c;
}

.status-tag.sample,
.source-chip.sample {
  border-color: #c9c9e5;
  background: #f4f4fb;
  color: var(--primary);
}

.status-tag.stale,
.source-chip.stale {
  border-color: #e4d49f;
  background: #fff9e8;
  color: #755d12;
}

.status-tag.error,
.source-chip.error {
  border-color: #edc7c7;
  background: #fff5f5;
  color: #9b3434;
}

.status-tag.loading,
.source-chip.loading {
  border-color: #c9c9e5;
  background: #f4f4fb;
  color: var(--primary);
}

.status-tag.empty,
.status-tag.pending,
.source-chip.empty,
.source-chip.pending {
  border-color: #dcdce4;
  background: #f7f7f9;
  color: var(--muted);
}

.platform-coverage {
  display: flex;
  margin-top: 5px;
  gap: 4px;
}

.source-chip {
  display: inline-flex;
  height: 18px;
  padding: 0 5px;
  border: 1px solid var(--border);
  border-radius: 3px;
  align-items: center;
  font-size: 9px;
  white-space: nowrap;
}

.text-button,
.inline-link {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
}

.icon-command {
  width: 26px;
  height: 26px;
  padding: 0;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.icon-command:hover {
  background: #f0f0f5;
  color: var(--primary);
}

.pin {
  font-size: 11px;
}

.pin.active,
.product-star.active {
  color: var(--accent);
}

.coverage {
  display: inline-flex;
  gap: 4px;
}

.coverage i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.spark {
  display: block;
  width: 72px;
  height: 24px;
}

.panel-action {
  display: block;
  width: 100%;
  height: 42px;
  padding: 0 16px;
  border: 0;
  border-top: 1px solid var(--border);
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  text-align: left;
  cursor: pointer;
}

.panel-action:hover {
  background: #fafafd;
}

.rank-panel .segmented {
  min-height: 28px;
}

.rank-panel .segmented button {
  height: 28px;
  padding: 0 10px;
}

.rank-list {
  min-height: 468px;
}

.rank-row {
  display: grid;
  width: 100%;
  min-height: 58px;
  padding: 9px 14px;
  grid-template-columns: 24px minmax(0, 1fr) 82px;
  border: 0;
  border-bottom: 1px solid var(--border);
  align-items: center;
  gap: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.rank-row:hover {
  background: #fafafd;
}

.rank-number {
  color: var(--muted);
  font-size: 11px;
}

.rank-main b {
  display: block;
  margin-bottom: 7px;
  font-size: 12px;
}

.rank-track {
  display: block;
  width: 100%;
  height: 3px;
  background: #efeff2;
}

.rank-track i {
  display: block;
  height: 3px;
  background: var(--success);
}

.rank-value {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: center;
  text-align: right;
}

.rank-value small {
  color: var(--text-secondary);
}

.rank-value .metric-growth {
  font-size: 15px;
}

.rank-value em {
  grid-column: 1 / -1;
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
}

.panel-footnote {
  margin: 0;
  padding: 12px 16px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.free-topic-bar {
  display: grid;
  width: 100%;
  height: 42px;
  margin-top: 14px;
  padding: 0 16px;
  grid-template-columns: 14px auto 1fr auto;
  align-items: center;
  gap: 8px;
  text-align: left;
  cursor: pointer;
}

.free-topic-bar small {
  color: var(--muted);
}

.free-topic-bar > b {
  color: var(--accent);
}

.free-topic-bar:disabled {
  background: #fafafa;
  color: var(--muted);
  cursor: default;
}

.free-topic-bar:disabled > b {
  color: var(--muted);
}

.query-result,
.object-context {
  display: flex;
  min-height: 62px;
  margin-bottom: 14px;
  padding: 10px 14px;
  border: 1px solid #c9c9e5;
  border-left: 3px solid var(--primary);
  border-radius: 6px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #f8f8fc;
}

.query-result.new,
.query-result.mapping-conflict {
  border-color: #ead8ae;
  border-left-color: #9b761c;
  background: #fffaf0;
}

.query-result > div:first-child,
.object-context > div:first-child {
  display: grid;
  min-width: 0;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: baseline;
  gap: 3px 10px;
}

.query-result > div:first-child > span,
.object-context > div:first-child > span {
  grid-row: 1 / 3;
  padding: 3px 6px;
  border: 1px solid currentColor;
  border-radius: 4px;
  color: var(--primary);
  font-size: 9px;
  white-space: nowrap;
}

.query-result.new > div:first-child > span,
.query-result.mapping-conflict > div:first-child > span {
  color: #795b13;
}

.query-result strong,
.object-context strong {
  overflow: hidden;
  color: var(--text);
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.query-result small,
.object-context small {
  color: var(--muted);
  font-size: 10px;
}

.query-source-state,
.object-context > div:last-child {
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

.query-source-state span {
  padding-left: 9px;
  border-left: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 10px;
}

.topic-detail {
  margin-top: 14px;
}

.detail-heading {
  justify-content: space-between;
}

.detail-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.detail-heading > div > div {
  min-width: 0;
}

.detail-heading > div > div small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 400;
}

.detail-workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 286px;
}

.signal-chart-panel {
  min-width: 0;
  border-right: 1px solid var(--border);
}

.detail-section-heading {
  display: flex;
  min-height: 52px;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.detail-section-heading strong,
.detail-section-heading span {
  display: block;
}

.detail-section-heading strong {
  font-size: 12px;
}

.detail-section-heading div > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.detail-chart-wrap {
  display: flex;
  min-height: 226px;
  padding: 8px 20px 8px;
  align-items: center;
}

.detail-chart {
  display: block;
  width: 100%;
  height: 210px;
}

.detail-chart line {
  stroke: #ededf2;
  stroke-width: 1;
}

.signal-empty {
  display: flex;
  width: 100%;
  min-height: 180px;
  padding: 28px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  background: #fafafd;
  color: var(--muted);
  text-align: center;
}

.signal-empty strong {
  color: var(--text-secondary);
  font-size: 13px;
}

.signal-empty.error strong {
  color: #9b3434;
}

.chart-skeleton {
  display: flex;
  width: 100%;
  height: 180px;
  padding: 18px 12px;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  background: #fafafd;
}

.chart-skeleton i {
  width: 14%;
  border-radius: 3px 3px 0 0;
  background: #e8e8ee;
  animation: skeleton-pulse 0.9s ease-in-out infinite alternate;
}

.chart-skeleton i:nth-child(1) { height: 34%; }
.chart-skeleton i:nth-child(2) { height: 48%; }
.chart-skeleton i:nth-child(3) { height: 41%; }
.chart-skeleton i:nth-child(4) { height: 62%; }
.chart-skeleton i:nth-child(5) { height: 72%; }
.chart-skeleton i:nth-child(6) { height: 84%; }

@keyframes skeleton-pulse {
  from { opacity: 0.48; }
  to { opacity: 1; }
}

.detail-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--border);
}

.detail-stats > div,
.metric-grid > div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}

.detail-stats > div:last-child,
.metric-grid > div:last-child {
  border-right: 0;
}

.detail-stats span,
.metric-grid span,
.attributes-grid > div > span {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
}

.detail-stats b,
.metric-grid b,
.metric-grid .metric-growth {
  font-size: 17px;
}

.detail-stats b {
  display: block;
  overflow-wrap: anywhere;
}

.detail-stats > div:last-child b {
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
}

.platform-rail {
  min-width: 0;
}

.platform-snapshot {
  min-height: 116px;
  padding: 14px 16px;
  border-top: 1px solid var(--border);
}

.platform-snapshot.active {
  box-shadow: inset 3px 0 0 var(--primary);
  background: #fafafd;
}

.platform-snapshot > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.platform-snapshot > div > strong {
  font-size: 11px;
}

.platform-actions {
  display: flex !important;
  margin-top: 0 !important;
  align-items: center;
  gap: 7px;
}

.platform-snapshot > b,
.platform-snapshot > span,
.platform-snapshot > small {
  display: block;
}

.platform-snapshot > b {
  margin-top: 12px;
  color: var(--text);
  font-size: 22px;
}

.platform-snapshot > span,
.platform-snapshot > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.entity-relationship {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.topic-review {
  border-top: 1px solid var(--border);
  background: #fcfcfd;
}

.review-heading {
  display: flex;
  min-height: 56px;
  padding: 12px 16px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.review-heading > div:first-child strong,
.review-heading > div:first-child span,
.review-heading > div:last-child small {
  display: block;
}

.review-heading > div:first-child span,
.review-heading > div:last-child small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 10px;
}

.review-heading > div:last-child {
  text-align: right;
}

.candidate-block {
  display: grid;
  padding: 10px 16px;
  grid-template-columns: 176px minmax(0, 1fr);
  border-top: 1px solid var(--border);
  align-items: start;
  gap: 12px;
}

.candidate-block > span {
  padding-top: 8px;
  color: var(--muted);
  font-size: 10px;
}

.candidate-block > div {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.candidate-button {
  display: grid;
  min-width: 160px;
  min-height: 38px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
  color: var(--text-secondary);
  text-align: left;
  cursor: pointer;
}

.candidate-button:hover {
  border-color: #aaa9c6;
  background: #f8f8fc;
}

.candidate-button b {
  font-size: 10px;
}

.candidate-button span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 9px;
}

.review-form {
  display: grid;
  padding: 12px 16px 16px;
  grid-template-columns: 1.35fr 0.75fr 0.75fr;
  border-top: 1px solid var(--border);
  gap: 12px;
}

.review-form label > span {
  display: block;
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 10px;
}

.review-form select,
.review-form textarea {
  width: 100%;
  border: 1px solid #d1d1da;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
}

.review-form select {
  height: 34px;
  padding: 0 9px;
}

.review-form textarea {
  min-height: 58px;
  padding: 8px 9px;
  resize: vertical;
  line-height: 1.4;
}

.review-form textarea::placeholder {
  color: #74747f;
}

.review-note {
  grid-column: 1 / -1;
}

.review-submit {
  display: flex;
  min-height: 34px;
  grid-column: 1 / -1;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.review-submit > span,
.admin-inline-note {
  color: var(--muted);
  font-size: 10px;
}

.review-submit .form-error {
  color: #9b3434;
}

.admin-inline-note {
  padding: 12px 16px 16px;
  border-top: 1px solid var(--border);
}

.entity-relationship.unbound {
  display: flex;
  min-height: 76px;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  background: #fafafd;
}

.entity-relationship.unbound strong,
.entity-relationship.unbound span,
.relationship-heading strong,
.relationship-heading span {
  display: block;
}

.entity-relationship.unbound > div > span,
.relationship-heading > div > span {
  margin-top: 5px;
  color: var(--muted);
  font-size: 10px;
}

.relationship-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.entity-path {
  display: flex;
  min-height: 70px;
  margin-top: 14px;
  padding: 12px 14px;
  align-items: center;
  gap: 10px;
  background: #f8f8fa;
  overflow-x: auto;
}

.entity-path > span {
  display: grid;
  min-width: 130px;
  gap: 3px;
}

.entity-path small,
.entity-path em {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.entity-path b {
  font-size: 11px;
}

.entity-path > i {
  color: var(--muted);
  font-size: 17px;
  font-style: normal;
}

.linked-skus {
  display: grid;
  margin-top: 12px;
  grid-template-columns: 110px repeat(3, minmax(0, 1fr));
  border: 1px solid var(--border);
}

.linked-skus > div,
.linked-skus > span {
  min-height: 58px;
  padding: 10px 12px;
  border-right: 1px solid var(--border);
}

.linked-skus > *:nth-child(4n) {
  border-right: 0;
}

.linked-skus > *:nth-child(n + 5) {
  border-top: 1px solid var(--border);
}

.linked-skus > div > span,
.linked-skus > div > b,
.sku-row > b,
.sku-row > em,
.sku-row > small {
  display: block;
}

.linked-skus > div > span,
.sku-row > em,
.sku-row > small,
.relationship-more,
.relationship-empty {
  color: var(--muted);
  font-size: 9px;
  font-style: normal;
}

.linked-skus > div > b {
  margin-top: 5px;
  font-size: 17px;
}

.sku-row > b {
  overflow: hidden;
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sku-row > em,
.sku-row > small {
  margin-top: 3px;
}

.relationship-more,
.relationship-empty {
  display: flex;
  align-items: center;
}

.topic-provenance {
  display: grid;
  padding: 10px 16px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 9px;
  gap: 18px;
}

.topic-provenance span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topic-provenance b {
  margin-right: 7px;
  color: var(--text-secondary);
  font-weight: 600;
}

.compact-controls {
  display: flex;
  margin-bottom: 12px;
  align-items: center;
  gap: 12px;
}

.notice-strip {
  min-height: 36px;
  margin-bottom: 14px;
  padding: 9px 14px;
  border-color: var(--warning-border);
  background: var(--warning-bg);
  color: #615b3c;
  font-size: 11px;
}

.product-list-panel .panel-heading {
  min-height: 62px;
}

.object-list-panel .panel-heading > .muted {
  font-size: 10px;
}

.series-table {
  min-width: 1120px;
}

.series-table th:nth-child(1) { width: 210px; }
.series-table th:nth-child(2) { width: 190px; }
.series-table th:nth-child(3) { width: 190px; }
.series-table th:nth-child(4) { width: 70px; text-align: right; }
.series-table th:nth-child(5),
.series-table th:nth-child(6) { width: 105px; }
.series-table th:nth-child(7) { width: 140px; }
.series-table th:nth-child(8) { width: 60px; }

.series-table td:nth-child(4) {
  text-align: right;
}

.series-table td > strong,
.series-table td > b,
.series-table td > small,
.sku-table td > strong,
.sku-table td > small {
  display: block;
}

.series-table td > strong,
.sku-table td > strong {
  color: var(--text);
}

.series-table td > small,
.sku-table td > small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.series-hero {
  display: grid;
  margin-bottom: 14px;
  grid-template-columns: minmax(280px, 0.72fr) minmax(0, 1.28fr);
}

.series-hero .entity-title {
  border-right: 1px solid var(--border);
  border-bottom: 0;
}

.series-hero .metric-grid.four {
  border-left: 0;
}

.series-hero .metric-grid.four > div {
  min-height: 82px;
}

.series-hero .metric-grid .status-tag {
  align-self: flex-start;
}

.alias-coverage-panel,
.series-sku-panel {
  margin-bottom: 14px;
}

.alias-coverage-panel .panel-heading > span {
  color: var(--text-secondary);
  font-size: 10px;
}

.alias-coverage-panel .panel-heading > span b {
  margin-right: 5px;
  color: var(--text);
  font-size: 14px;
}

.alias-table th:nth-child(1) { width: 24%; }
.alias-table th:nth-child(2) { width: 18%; }
.alias-table th:nth-child(3),
.alias-table th:nth-child(4) { width: 16%; }
.alias-table th:nth-child(5) { width: 26%; }

.sku-table {
  min-width: 760px;
}

.legend {
  display: flex;
  gap: 16px;
  color: var(--text-secondary);
  font-size: 10px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.legend i {
  width: 7px;
  height: 7px;
  border-radius: 2px;
}

.legend .amazon { background: var(--primary); }
.legend .tiktok { background: var(--accent); }
.legend .tmall { background: #91919c; }

.product-table {
  min-width: 1160px;
}

.product-table th:nth-child(1) { width: 48px; }
.product-table th:nth-child(2) { width: 210px; }
.product-table th:nth-child(3) { width: 180px; }
.product-table th:nth-child(4) { width: 110px; text-align: right; }
.product-table th:nth-child(5) { width: 90px; text-align: right; }
.product-table th:nth-child(6) { width: 96px; text-align: right; }
.product-table th:nth-child(7) { width: 118px; }
.product-table th:nth-child(8) { width: 116px; text-align: right; }
.product-table th:nth-child(9) { width: 102px; text-align: right; }
.product-table th:nth-child(10) { width: 150px; }
.product-table td:nth-child(4),
.product-table td:nth-child(5),
.product-table td:nth-child(6),
.product-table td:nth-child(8),
.product-table td:nth-child(9) { text-align: right; }

.product-table td {
  height: 54px;
}

.product-table td > strong {
  display: block;
  color: var(--text);
}

.big-metric {
  color: var(--text) !important;
  font-size: 15px;
  font-weight: 700;
}

.big-metric.small {
  font-size: 14px;
}

.channel-bar {
  display: flex;
  width: 100%;
  height: 7px;
  border-radius: 4px;
  overflow: hidden;
  background: #eeeef2;
}

.channel-bar i:nth-child(1) { background: var(--primary); }
.channel-bar i:nth-child(2) { background: var(--accent); }
.channel-bar i:nth-child(3) { background: #91919c; }

.back-button {
  height: 30px;
  margin: 2px 0 12px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.product-hero {
  margin-bottom: 14px;
}

.entity-title {
  padding: 16px;
  border-bottom: 1px solid var(--border);
}

.entity-title strong {
  display: block;
  font-size: 15px;
}

.metric-grid {
  display: grid;
}

.metric-grid.eight {
  grid-template-columns: repeat(4, 1fr);
}

.metric-grid.eight > div:nth-child(-n+4) {
  border-bottom: 1px solid var(--border);
}

.group-table th:not(:first-child),
.group-table td:not(:first-child) {
  text-align: right;
}

.group-table th:first-child {
  width: 34%;
}

.group-table th:not(:first-child) {
  width: 11%;
}

.group-table td:first-child {
  white-space: nowrap;
}

.group-table td {
  height: 50px;
}

.disclosure {
  display: inline-block;
  width: 20px;
  color: var(--muted);
  font-size: 16px;
}

.nested-row > td {
  padding: 0 !important;
  background: #fafafd;
}

.nested-table {
  width: 100%;
  border-collapse: collapse;
}

.nested-table th,
.nested-table td {
  height: 40px !important;
  padding: 8px 20px !important;
  border-bottom: 1px solid var(--border);
  color: var(--text-secondary);
  font-size: 11px;
  text-align: left !important;
}

.comments-panel {
  margin-top: 14px;
}

.comment-row {
  display: grid;
  min-height: 56px;
  padding: 10px 16px;
  grid-template-columns: 64px 1fr;
  border-bottom: 1px solid var(--border);
  align-items: start;
  gap: 10px;
}

.comment-row:last-child {
  border-bottom: 0;
}

.stars {
  color: var(--accent);
  font-size: 11px;
  white-space: nowrap;
}

.comment-row p {
  margin: 0 0 5px;
}

.comment-row small {
  color: var(--muted);
}

.creator-toolbar {
  margin-bottom: 14px;
}

.creator-toolbar .search-box {
  margin-left: 2px;
}

.primary-button,
.secondary-button {
  min-height: 32px;
  padding: 0 12px;
  border: 1px solid var(--primary);
  border-radius: 4px;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.secondary-button {
  border-color: var(--border);
  background: #fff;
  color: var(--text-secondary);
  font-weight: 500;
}

.primary-button:hover {
  background: #24235c;
}

.primary-button:disabled {
  border-color: #cfcfd8;
  background: #cfcfd8;
  cursor: not-allowed;
}

.secondary-button:hover {
  border-color: #c5c5d0;
  background: #fafafd;
}

.primary-button.small,
.secondary-button.small {
  min-height: 26px;
  padding: 0 9px;
  font-size: 11px;
}

.creator-table {
  min-width: 1120px;
}

.creator-table th:nth-child(1) { width: 220px; }
.creator-table th:nth-child(2) { width: 76px; }
.creator-table th:nth-child(3) { width: 92px; }
.creator-table th:nth-child(4) { width: 92px; }
.creator-table th:nth-child(5) { width: 96px; }
.creator-table th:nth-child(6) { width: 112px; }
.creator-table th:nth-child(7) { width: 120px; }
.creator-table th:nth-child(8) { width: 94px; }
.creator-table th:nth-child(9) { width: 246px; }

.creator-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.creator-cell > div {
  min-width: 0;
}

.creator-cell strong {
  display: block;
  color: var(--text);
}

.avatar {
  display: inline-flex;
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
  border: 1px solid rgba(0, 0, 0, 0.07);
  border-radius: 50%;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 11px;
  font-weight: 700;
}

.avatar.orange { background: #f4813f; }
.avatar.mint { background: #77b9a8; }
.avatar.cyan { background: #43a6c6; }
.avatar.blue { background: #286a91; }
.avatar.large { width: 58px; height: 58px; flex-basis: 58px; font-size: 20px; }

.hot-mark {
  color: var(--accent);
  font-size: 14px;
}

.ip-tag {
  margin-right: 4px;
  border-color: #d4d3df;
  background: #f0eff5;
  color: var(--primary);
}

.creator-hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  margin-bottom: 14px;
}

.creator-profile {
  display: flex;
  min-width: 0;
  padding: 16px;
  align-items: center;
  gap: 14px;
}

.creator-profile strong,
.creator-profile b {
  display: block;
}

.creator-profile strong {
  margin-bottom: 4px;
  font-size: 15px;
}

.creator-profile b {
  margin-bottom: 6px;
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 500;
}

.creator-profile p {
  max-width: 470px;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.45;
}

.metric-grid.four {
  grid-template-columns: repeat(4, 1fr);
  border-left: 1px solid var(--border);
}

.metric-grid.four > div {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.audience-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-bottom: 14px;
  gap: 14px;
}

.audience-card {
  min-height: 184px;
}

.audience-card .panel-heading {
  min-height: 46px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.audience-bars {
  padding: 12px 16px;
}

.audience-bars > div {
  display: grid;
  min-height: 28px;
  grid-template-columns: 96px 1fr 32px;
  align-items: center;
  gap: 10px;
  font-size: 11px;
}

.audience-bars i {
  display: block;
  height: 7px;
  background: #f0f0f3;
}

.audience-bars b {
  display: block;
  height: 7px;
  background: var(--primary);
}

.audience-bars em {
  font-style: normal;
  text-align: right;
}

.gender-bar {
  display: flex;
  height: 8px;
  margin: 36px 16px 12px;
  background: #f0f0f3;
  overflow: hidden;
}

.gender-bar i { background: var(--accent); }
.gender-bar b { flex: 1; background: var(--primary); }

.gender-labels {
  display: flex;
  padding: 0 16px;
  justify-content: space-between;
  font-size: 11px;
}

.videos-panel .panel-heading {
  min-height: 52px;
}

.video-grid {
  display: grid;
  padding: 14px;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
}

.video-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 4px;
  overflow: hidden;
  background: #fff;
}

.video-cover {
  position: relative;
  aspect-ratio: 9 / 16;
  overflow: hidden;
  background: #e9e9ed;
}

.video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ratio {
  position: absolute;
  top: 6px;
  left: 6px;
  padding: 3px 5px;
  border: 1px solid #d8d8df;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--text-secondary);
  font-size: 10px;
}

.ratio.hot {
  border-color: #ffbad0;
  color: var(--accent);
  font-weight: 700;
}

.video-body {
  display: grid;
  min-height: 106px;
  padding: 10px;
  grid-template-columns: 1fr;
  align-content: start;
}

.video-body strong {
  font-size: 15px;
}

.video-body small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 10px;
}

.video-body p {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--text);
  font-size: 11px;
  line-height: 1.35;
}

.strong-footnote {
  border-top: 1px solid var(--border);
  color: var(--text-secondary);
}

.creator-page {
  padding-top: 18px;
}

.creator-commandbar {
  margin-bottom: 10px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.creator-view-row,
.creator-filter-row {
  display: flex;
  min-height: 52px;
  padding: 9px 12px;
  align-items: center;
  gap: 8px;
}

.creator-view-row {
  border-bottom: 1px solid var(--border);
}

.creator-view-row .search-box {
  max-width: 520px;
}

.creator-view-switch button {
  min-width: 92px;
}

.source-count {
  margin-left: auto;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.creator-select {
  position: relative;
  display: flex;
  width: 212px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 4px;
  align-items: center;
  background: #fff;
}

.creator-select > span {
  padding-left: 10px;
  color: var(--muted);
  font-size: 11px;
  white-space: nowrap;
}

.creator-select select {
  min-width: 0;
  height: 30px;
  flex: 1;
  padding: 0 28px 0 7px;
  border: 0;
  outline: 0;
  appearance: none;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
}

.creator-select .ui-icon {
  position: absolute;
  right: 8px;
  width: 13px;
  pointer-events: none;
  color: var(--muted);
}

.relation-search {
  display: flex;
  width: 310px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 4px;
  align-items: center;
  background: #fff;
}

.relation-search .ui-icon {
  width: 14px;
  margin: 0 8px 0 9px;
  color: var(--muted);
}

.relation-search input {
  min-width: 0;
  height: 30px;
  flex: 1;
  padding: 0 9px 0 0;
  border: 0;
  outline: 0;
  background: transparent;
}

.creator-clear {
  display: inline-flex;
  margin-left: auto;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.creator-clear .ui-icon {
  width: 13px;
}

.creator-source-notice {
  display: flex;
  min-height: 38px;
  margin: 0 2px 12px;
  padding: 7px 2px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  color: var(--text-secondary);
  font-size: 11px;
}

.creator-source-notice > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.creator-source-notice strong {
  font-size: 11px;
}

.creator-table {
  min-width: 1180px;
}

.creator-table th:nth-child(1) { width: 190px; }
.creator-table th:nth-child(2) { width: 126px; }
.creator-table th:nth-child(3) { width: 128px; }
.creator-table th:nth-child(4) { width: 310px; }
.creator-table th:nth-child(5) { width: 330px; }
.creator-table th:nth-child(6) { width: 86px; }

.creator-table td {
  vertical-align: top;
}

.creator-cell {
  align-items: flex-start;
}

.account-group {
  display: inline-flex;
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
}

.focus-label {
  color: var(--text-secondary);
  font-size: 11px;
  font-weight: 600;
}

.reason-cell {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.45;
}

.creator-relations,
.video-relations,
.video-detail-relations {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.creator-relation-tag {
  border-color: #d9d7e8;
  background: #f5f4fa;
  color: #4c497d;
}

.relation-more {
  color: var(--muted);
  font-size: 10px;
}

.demo-content-count {
  color: var(--primary);
  font-size: 11px;
  font-weight: 600;
}

.avatar.violet { background: #7772b8; }
.avatar.rose { background: #b56f8d; }

.creator-content-panel {
  overflow: hidden;
}

.creator-video-grid {
  display: grid;
  padding: 14px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.creator-video-grid.compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.creator-video-card {
  min-width: 0;
  border: 1px solid var(--border);
  border-radius: 5px;
  overflow: hidden;
  background: #fff;
  cursor: pointer;
}

.creator-video-card:hover {
  border-color: #c9c7df;
  background: #fcfcfe;
}

.creator-video-cover {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #ececf1;
}

.creator-video-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-cover-badge,
.creator-video-cover .ratio {
  position: absolute;
  top: 8px;
  padding: 4px 6px;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 3px;
  background: rgba(255, 255, 255, 0.94);
  font-size: 9px;
}

.demo-cover-badge {
  left: 8px;
  color: var(--primary);
  font-weight: 600;
}

.creator-video-cover .ratio {
  right: 8px;
  left: auto;
  color: var(--text-secondary);
}

.creator-video-cover .ratio.hot {
  border-color: #edbfd0;
  color: #aa2853;
}

.creator-video-body {
  min-height: 184px;
  padding: 10px;
}

.video-account {
  display: flex;
  width: 100%;
  padding: 0;
  border: 0;
  align-items: center;
  gap: 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.video-account .avatar {
  width: 26px;
  height: 26px;
  flex-basis: 26px;
}

.video-account span:last-child {
  min-width: 0;
}

.video-account strong,
.video-account small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.video-account strong {
  font-size: 11px;
}

.video-account small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 9px;
}

.creator-video-body > p {
  display: -webkit-box;
  min-height: 34px;
  margin: 10px 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.video-demo-metrics {
  display: grid;
  margin-bottom: 9px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 4px;
  color: var(--text-secondary);
  font-size: 9px;
}

.video-demo-metrics span {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 3px;
  white-space: nowrap;
}

.video-demo-metrics .ui-icon {
  width: 11px;
  height: 11px;
}

.creator-empty {
  margin: 28px;
}

.back-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.back-button .ui-icon {
  width: 14px;
}

.creator-hero {
  grid-template-columns: 1fr 1.15fr;
}

.creator-profile-title {
  display: flex;
  align-items: center;
  gap: 8px;
}

.profile-link {
  display: inline-flex;
  margin-top: 8px;
  align-items: center;
  gap: 5px;
  color: var(--primary);
  font-size: 11px;
  text-decoration: none;
}

.profile-link:hover {
  text-decoration: underline;
}

.profile-link .ui-icon {
  width: 12px;
}

.creator-pending-metrics b {
  color: var(--muted);
  font-size: 13px;
}

.creator-pending-metrics small {
  margin-top: 4px;
  color: #aaaab4;
  font-size: 9px;
}

.creator-brief {
  display: grid;
  margin-bottom: 14px;
  grid-template-columns: 190px minmax(280px, 1fr) minmax(360px, 1.3fr);
}

.creator-brief > div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
}

.creator-brief > div:last-child {
  border-right: 0;
}

.creator-brief > div > span,
.video-context-panel span,
.video-detail-relations > span:first-child {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 10px;
}

.creator-brief strong,
.creator-brief p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

.creator-brief small {
  display: block;
  margin-top: 5px;
  color: var(--muted);
}

.creator-account-empty {
  display: flex;
  min-height: 170px;
  padding: 30px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

.creator-account-empty strong {
  margin-top: 12px;
}

.creator-account-empty p {
  max-width: 460px;
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 11px;
}

.video-detail {
  display: grid;
  margin-bottom: 14px;
  grid-template-columns: 240px minmax(0, 1fr);
  overflow: hidden;
}

.video-detail-cover {
  aspect-ratio: 3 / 4;
  border-right: 1px solid var(--border);
}

.video-detail-main {
  padding: 24px;
}

.detail-status-line {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 10px;
}

.video-detail-main h2 {
  max-width: 720px;
  margin: 0 0 18px;
  font-size: 20px;
  line-height: 1.4;
}

.detail-account {
  width: fit-content;
  margin-bottom: 20px;
}

.video-detail-relations {
  margin-bottom: 22px;
}

.video-detail-relations > span:first-child {
  width: 100%;
}

.video-detail-main .secondary-button {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  cursor: not-allowed;
}

.video-detail-main .secondary-button .ui-icon {
  width: 13px;
}

.video-metric-panel {
  margin-bottom: 14px;
}

.metric-grid.five {
  grid-template-columns: repeat(5, 1fr);
}

.metric-grid.five > div {
  display: flex;
  min-height: 92px;
  padding: 14px 16px;
  border-right: 1px solid var(--border);
  flex-direction: column;
  justify-content: center;
}

.metric-grid.five > div:last-child {
  border-right: 0;
}

.metric-grid.five small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.video-context-panel {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
}

.video-context-panel > div {
  padding: 15px 16px;
  border-right: 1px solid var(--border);
}

.video-context-panel > div:last-child {
  border-right: 0;
}

.video-context-panel strong,
.video-context-panel p {
  margin: 0;
  color: var(--text-secondary);
  font-size: 11px;
  line-height: 1.5;
}

.mapping-page {
  padding-top: 20px;
}

.mapping-command {
  display: flex;
  margin-bottom: 16px;
  justify-content: flex-end;
}

.mapping-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
}

.mapping-tree {
  max-height: 548px;
}

.tree-search {
  padding: 8px;
  border-bottom: 1px solid var(--border);
}

.tree-list {
  max-height: 450px;
  overflow: auto;
  padding: 5px 0;
}

.tree-node {
  display: grid;
  width: 100%;
  min-height: 34px;
  padding: 5px 10px 5px calc(10px + var(--depth) * 14px);
  grid-template-columns: 12px auto minmax(0, 1fr) auto;
  border: 0;
  align-items: center;
  gap: 4px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

.tree-node:hover {
  background: #f8f8fa;
}

.tree-node.active {
  background: #ededf4;
}

.tree-node > span {
  color: var(--muted);
  font-size: 11px;
}

.tree-node b {
  font-size: 11px;
  white-space: nowrap;
}

.tree-node em {
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.tree-node small {
  color: var(--muted);
  font-size: 9px;
  white-space: nowrap;
}

.mapping-detail {
  min-height: 278px;
}

.mapping-title {
  display: flex;
  min-height: 72px;
  padding: 15px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
}

.mapping-title strong {
  display: block;
  margin-bottom: 8px;
  font-size: 15px;
}

.mapping-title strong span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 500;
}

.mapping-tabs {
  padding: 10px 16px;
  border-bottom: 1px solid var(--border);
}

.attributes-grid {
  display: grid;
  padding: 18px 16px 22px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 22px 36px;
}

.attributes-grid.basic {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.attributes-grid > div > b {
  display: block;
  font-weight: 500;
}

.attributes-grid > div > small {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 10px;
}

.attributes-grid > div > .tag {
  display: inline-flex;
  margin-right: 4px;
}

.attributes-grid p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 11px;
}

.binding-table input {
  width: 62px;
  height: 28px;
  padding: 0 7px;
  border: 1px solid var(--border);
  border-radius: 4px;
}

.platform-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  margin-right: 6px;
  border-radius: 50%;
}

.platform-dot.google { background: #3f80ed; }
.platform-dot.tiktok { background: var(--accent); }
.platform-dot.semrush { background: #ef8c35; }

.pending-panel {
  margin-top: 16px;
}

.review-queue {
  margin-bottom: 16px;
}

.mapping-issue-queue {
  margin-bottom: 16px;
}

.mapping-issue-row {
  display: grid;
  min-height: 76px;
  padding: 10px 14px;
  grid-template-columns: 200px 190px minmax(260px, 1fr) 176px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  gap: 14px;
}

.mapping-issue-row:last-child {
  border-bottom: 0;
}

.mapping-issue-row > div:first-child strong,
.mapping-issue-row > div:first-child small,
.mapping-issue-row > div:nth-child(2) span,
.mapping-issue-row > div:nth-child(2) b,
.mapping-issue-row label > span {
  display: block;
}

.mapping-issue-row > div:first-child small,
.mapping-issue-row > div:nth-child(2) span,
.mapping-issue-row label > span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.mapping-issue-row > div:nth-child(2) b {
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.mapping-issue-row label > span {
  margin: 0 0 5px;
}

.mapping-issue-row select {
  width: 100%;
  height: 32px;
  padding: 0 8px;
  border: 1px solid #d1d1da;
  border-radius: 4px;
  background: #fff;
  color: var(--text);
}

.mapping-issue-row > div:last-child {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.mapping-issue-row > div:last-child button {
  white-space: nowrap;
}

.review-queue-list {
  width: 100%;
}

.review-queue-row {
  display: grid;
  min-height: 66px;
  padding: 10px 14px;
  grid-template-columns: 180px 220px 170px minmax(180px, 1fr) 112px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  gap: 12px;
}

.review-queue-row:last-child {
  border-bottom: 0;
}

.review-queue-row > div:first-child strong,
.review-queue-row > div:first-child small,
.review-queue-row > div span,
.review-queue-row > div b {
  display: block;
}

.review-queue-row > div:first-child small,
.review-queue-row > div span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 9px;
}

.review-queue-row > div b {
  margin-top: 4px;
  overflow: hidden;
  color: var(--text-secondary);
  font-size: 10px;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-queue-row > p {
  display: -webkit-box;
  margin: 0;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  color: var(--text-secondary);
  font-size: 10px;
  line-height: 1.4;
}

.review-queue-row > div:last-child {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.pending-panel .panel-heading {
  min-height: 46px;
}

.pending-row {
  display: grid;
  min-height: 48px;
  padding: 8px 14px;
  grid-template-columns: 86px minmax(340px, 1fr) 72px 260px 56px 112px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  gap: 12px;
  font-size: 11px;
}

.pending-row:last-child {
  border-bottom: 0;
}

.pending-row > strong {
  overflow: hidden;
  font-weight: 500;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pending-row > em {
  color: var(--muted);
  font-style: normal;
  font-weight: 700;
  text-align: right;
}

.pending-row > em.high {
  color: var(--primary);
}

.pending-row > div {
  display: flex;
  justify-content: flex-end;
  gap: 6px;
}

.empty-state {
  display: flex;
  min-height: 96px;
  align-items: center;
  justify-content: center;
  color: var(--muted);
  font-size: 12px;
}

.modal-backdrop {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: flex;
  padding-top: 14vh;
  align-items: flex-start;
  justify-content: center;
  background: rgba(22, 22, 28, 0.38);
}

.modal {
  width: 420px;
  max-height: 70vh;
  border: 1px solid var(--border);
  border-radius: 6px;
  overflow: auto;
  background: #fff;
}

.media-modal {
  width: 620px;
}

.import-modal {
  width: min(760px, calc(100vw - 48px));
}

.import-modal > .modal-header {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
}

.import-modal > .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  background: #fff;
  border-top: 1px solid var(--border);
}

.modal-header {
  display: flex;
  min-height: 52px;
  padding: 0 14px 0 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
}

.modal-header > div > small {
  display: block;
  max-width: 560px;
  margin-top: 4px;
  overflow: hidden;
  color: var(--muted);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-summary {
  display: grid;
  padding: 16px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--border);
}

.import-summary > div {
  min-height: 58px;
  padding: 10px 12px;
  background: #fff;
}

.import-summary span,
.import-summary b {
  display: block;
}

.import-summary span {
  color: var(--muted);
  font-size: 10px;
}

.import-summary b {
  margin-top: 5px;
  font-size: 17px;
}

.import-section {
  padding: 14px 16px 0;
}

.import-section > strong {
  display: block;
  margin-bottom: 9px;
  font-size: 11px;
}

.import-mapping {
  display: grid;
  margin: 0;
  padding: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px 18px;
  list-style: none;
}

.import-mapping li {
  display: flex;
  min-width: 0;
  justify-content: space-between;
  gap: 8px;
  font-size: 10px;
}

.import-mapping li span {
  color: var(--muted);
}

.import-mapping li b,
.import-mapping li em {
  overflow: hidden;
  font-style: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-mapping li em {
  color: var(--down);
}

.import-issues {
  margin: 0 16px;
  padding: 9px 12px;
  border: 1px solid #ead8ae;
  background: #fffaf0;
  color: #795b13;
  font-size: 10px;
}

.import-issues.fatal {
  border-color: #edc7c7;
  background: #fff6f6;
  color: var(--down);
}

.import-issues p {
  margin: 0;
}

.import-issues p + p {
  margin-top: 4px;
}

.import-preview-table {
  min-width: 620px;
  table-layout: fixed;
}

.import-preview-table th,
.import-preview-table td {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.form-modal > label {
  display: block;
  padding: 14px 16px 0;
}

.form-modal > label span {
  display: block;
  margin-bottom: 7px;
  color: var(--text-secondary);
  font-size: 11px;
}

.form-note {
  margin: 12px 16px 0;
  padding: 9px 10px;
  background: #f7f7f9;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.form-modal input,
.form-modal select {
  width: 100%;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: #fff;
}

.modal-actions {
  display: flex;
  padding: 18px 16px;
  justify-content: flex-end;
  gap: 8px;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
}
