:root {
  color-scheme: light;
  --bg: #f4f6f9;
  --panel: #ffffff;
  --text: #172033;
  --muted: #697486;
  --subtle: #8b95a5;
  --line: #dde4ee;
  --soft-line: #edf1f6;
  --blue: #2f67ff;
  --blue-soft: #eef3ff;
  --red: #e94a59;
  --green: #139568;
  --orange: #f59a23;
  --shadow: 0 10px 24px rgba(20, 34, 66, 0.07);
}

* {
  box-sizing: border-box;
}

body.report-v3 {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family:
    "Inter",
    "Segoe UI",
    "PingFang SC",
    "Microsoft YaHei",
    Arial,
    sans-serif;
  letter-spacing: 0;
}

.report-v3 .shell {
  width: min(1480px, calc(100% - 40px));
  margin: 0 auto;
}

.report-v3 .header {
  background: var(--panel);
  border-bottom: 1px solid var(--line);
}

.report-v3 .topbar {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: end;
  padding: 20px 0 14px;
}

.report-v3 h1,
.report-v3 h2,
.report-v3 h3,
.report-v3 p {
  margin: 0;
}

.report-v3 h1 {
  font-size: 28px;
  line-height: 1.1;
}

.report-v3 .sub {
  margin-top: 6px;
  color: var(--muted);
  font-size: 13px;
}

.report-v3 .meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.report-v3 .pill,
.report-v3 .account-tab {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--muted);
  font-size: 13px;
  white-space: nowrap;
}

.report-v3 .pill {
  padding: 6px 10px;
}

.report-v3 .account-strip {
  padding: 12px 0 14px;
  border-top: 1px solid var(--soft-line);
}

.report-v3 .account-tabs {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 2px;
}

.report-v3 .account-tab {
  gap: 8px;
  padding: 7px 12px;
  cursor: pointer;
}

.report-v3 .account-tab[aria-selected="true"] {
  border-color: rgba(47, 103, 255, 0.48);
  background: var(--blue-soft);
  color: var(--text);
  font-weight: 750;
}

.report-v3 .account-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.report-v3 .account-tab[data-platform="xiaohongshu"] .account-dot {
  background: var(--red);
}

.report-v3 .account-tab[data-platform="wechat_miniprogram"] .account-dot {
  background: var(--orange);
}

.report-v3 main.shell {
  padding: 18px 0 44px;
}

.report-v3 .account-view {
  display: grid;
  gap: 14px;
}

.report-v3 .account-hero,
.report-v3 .section-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.report-v3 .account-hero {
  padding: 18px;
}

.report-v3 .account-head {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: center;
  margin-bottom: 14px;
}

.report-v3 .account-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.report-v3 .account-title {
  display: flex;
  gap: 12px;
  align-items: center;
}

.report-v3 .mark {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}

.report-v3 .account-view[data-platform="xiaohongshu"] .mark {
  background: #fff0f2;
  color: var(--red);
}

.report-v3 .account-view[data-platform="wechat_miniprogram"] .mark {
  background: #fff7e8;
  color: #b76605;
}

.report-v3 .name {
  font-size: 22px;
  line-height: 1.15;
}

.report-v3 .account-name {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.report-v3 .key-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.report-v3 .key-card {
  min-height: 96px;
  padding: 12px;
  border: 1px solid var(--soft-line);
  border-radius: 8px;
  background: #fbfcff;
}

.report-v3 .key-card.primary {
  border-color: rgba(47, 103, 255, 0.38);
  background: linear-gradient(180deg, #ffffff 0%, #f5f8ff 100%);
}

.report-v3 .key-label,
.report-v3 .period-note,
.report-v3 .section-meta {
  color: var(--muted);
  font-size: 12px;
}

.report-v3 .key-value {
  display: block;
  margin-top: 7px;
  font-size: 28px;
  line-height: 1;
  font-weight: 860;
}

.report-v3 .key-context {
  display: block;
  margin-top: 7px;
  color: var(--subtle);
  font-size: 12px;
}

.report-v3 .change {
  display: inline-flex;
  margin-top: 7px;
  font-size: 12px;
}

.report-v3 .change.up {
  color: var(--green);
}

.report-v3 .change.down {
  color: var(--red);
}

.report-v3 .sections {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.report-v3 .section-card {
  overflow: hidden;
  box-shadow: none;
}

.report-v3 .section-head {
  min-height: 48px;
  padding: 12px 14px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: baseline;
  border-bottom: 1px solid var(--soft-line);
}

.report-v3 h3 {
  font-size: 16px;
}

.report-v3 .table-wrap {
  overflow-x: auto;
}

.report-v3 table {
  width: 100%;
  min-width: 520px;
  border-collapse: collapse;
}

.report-v3 th,
.report-v3 td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--soft-line);
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

.report-v3 th {
  color: var(--muted);
  background: #f8fafc;
  font-size: 12px;
  font-weight: 800;
}

.report-v3 tr:last-child td {
  border-bottom: 0;
}

.report-v3 .metric-name {
  color: var(--muted);
  white-space: nowrap;
}

.report-v3 .cell-value {
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  flex-wrap: wrap;
  font-weight: 760;
}

.report-v3 .source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  padding: 10px 14px 12px;
  border-top: 1px solid var(--soft-line);
}

.report-v3 .source-chip {
  display: inline-flex;
  padding: 6px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: #fff;
  font-size: 12px;
}

.report-v3 .empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 1180px) {
  .report-v3 .key-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .report-v3 .sections {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .report-v3 .shell {
    width: min(100% - 28px, 1480px);
  }

  .report-v3 .topbar,
  .report-v3 .account-head {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .report-v3 h1 {
    font-size: 24px;
  }

  .report-v3 .key-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .report-v3 .key-grid {
    grid-template-columns: 1fr;
  }
}
