:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --surface-soft: #f1f4f8;
  --ink: #171b2f;
  --muted: #667085;
  --line: #e3e7ef;
  --navy: #18243f;
  --green: #16a36d;
  --coral: #ef735b;
  --gold: #d69b2d;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: Arial, "Microsoft YaHei", sans-serif;
}

.app-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 10;
}

.header-inner {
  width: min(1440px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 22px 0 14px;
  display: grid;
  grid-template-columns: minmax(240px, 1fr) minmax(360px, 1.7fr);
  gap: 18px;
  align-items: end;
}

.eyebrow {
  color: var(--coral);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  margin-top: 5px;
  font-size: 30px;
  letter-spacing: 0;
}

.muted {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(5, minmax(100px, 1fr));
  gap: 8px;
}

.summary-item {
  min-height: 78px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.summary-item span,
.metric-card span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.summary-item b {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  color: var(--navy);
}

.summary-item small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.tabs {
  width: min(1440px, calc(100vw - 40px));
  margin: 0 auto;
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 0 0 14px;
}

.tab {
  border: 1px solid var(--line);
  background: var(--surface-soft);
  color: var(--muted);
  border-radius: 8px;
  min-height: 36px;
  padding: 0 12px;
  white-space: nowrap;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.tab.active {
  background: var(--navy);
  color: #fff;
  border-color: var(--navy);
}

.app-shell {
  width: min(1440px, calc(100vw - 40px));
  margin: 0 auto;
  padding: 22px 0 42px;
}

.module-head {
  display: grid;
  grid-template-columns: minmax(260px, 1.3fr) minmax(280px, 0.8fr);
  gap: 16px;
  align-items: stretch;
  margin-bottom: 14px;
}

.module-head > div,
.conclusion,
.panel,
.metric-card {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
}

.module-head > div {
  padding: 20px;
}

.module-head h2 {
  margin-top: 6px;
  font-size: 26px;
}

.module-head p {
  margin-top: 10px;
  color: var(--muted);
  line-height: 1.7;
}

.conclusion {
  padding: 18px;
  color: var(--navy);
  line-height: 1.7;
  border-left: 4px solid var(--green);
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.metric-card {
  min-height: 126px;
  padding: 14px;
}

.metric-card b {
  display: block;
  margin-top: 10px;
  font-size: 24px;
  color: var(--navy);
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.metric-card p {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.panel {
  overflow: hidden;
  margin-bottom: 14px;
}

.loading-panel {
  padding: 20px;
}

.panel-head {
  padding: 15px 16px;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.panel-head h3 {
  font-size: 17px;
}

.panel-head span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.open-link {
  color: var(--navy);
  font-size: 12px;
  font-weight: 900;
}

.embed-panel {
  background: transparent;
}

.report-frame {
  display: block;
  width: 100%;
  height: min(78vh, 920px);
  border: 0;
  background: #fff;
}

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

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-size: 13px;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  line-height: 1.45;
}

th {
  background: var(--surface-soft);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

tbody tr:nth-child(even) td {
  background: #fbfcfe;
}

.empty {
  padding: 16px;
  color: var(--muted);
}

@media (max-width: 960px) {
  .header-inner,
  .module-head {
    grid-template-columns: 1fr;
  }

  .summary-strip,
  .card-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .header-inner,
  .tabs,
  .app-shell {
    width: min(100vw - 24px, 1440px);
  }

  .summary-strip {
    display: flex;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .summary-item {
    flex: 0 0 138px;
    min-height: 76px;
  }

  .card-grid {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 26px;
  }

  .module-head h2 {
    font-size: 22px;
  }
}
