:root {
  --page-bg: #f6f8f5;
  --panel-bg: #ffffff;
  --ink: #171923;
  --muted: #61707d;
  --line: #d6dcd5;
  --teal: #1f7a6f;
  --amber: #f3ad3a;
  --green: #11725a;
  --red: #b42318;
  --shadow: 0 14px 40px rgba(17, 24, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family:
    "Segoe UI", "Avenir Next", "Helvetica Neue", "Microsoft YaHei", sans-serif;
}

.page {
  width: min(1180px, calc(100vw - 32px));
  margin: 0 auto;
  padding: 30px 0 40px;
}

.header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 20px;
}

.overline {
  margin: 0 0 6px;
  color: var(--teal);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-size: 31px;
  line-height: 1.12;
}

h2 {
  font-size: 18px;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.status-text {
  color: var(--muted);
  font-size: 13px;
}

.refresh-button {
  min-height: 40px;
  padding: 0 14px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-bg);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

.refresh-button:hover {
  border-color: var(--teal);
}

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

.summary-card,
.panel {
  background: var(--panel-bg);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.summary-card {
  min-height: 128px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.summary-label {
  font-size: 14px;
  color: var(--muted);
}

.summary-value {
  font-size: 33px;
  line-height: 1;
}

.summary-card small {
  color: var(--muted);
  font-size: 13px;
}

.layout-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.9fr);
  gap: 16px;
}

.panel {
  overflow: hidden;
}

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

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

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

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

th,
td {
  padding: 14px 16px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  font-size: 14px;
}

th {
  color: var(--muted);
  text-transform: uppercase;
  font-size: 12px;
}

td strong {
  display: block;
  margin-bottom: 3px;
}

td small {
  color: var(--muted);
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(17, 114, 90, 0.14);
  color: var(--green);
  font-weight: 700;
  font-size: 12px;
}

.pill.error {
  background: rgba(180, 35, 24, 0.14);
  color: var(--red);
}

.chart-list {
  padding: 14px;
  display: grid;
  gap: 12px;
}

.chart-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background: #fbfcfa;
}

.chart-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 8px;
}

.chart-head strong {
  color: var(--ink);
}

svg {
  display: block;
  width: 100%;
  height: 122px;
}

.axis {
  stroke: #d8ded8;
  stroke-width: 1;
}

.line {
  fill: none;
  stroke: var(--amber);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.empty {
  padding: 20px 16px;
  color: var(--muted);
  font-size: 14px;
}

@media (max-width: 920px) {
  .header {
    flex-direction: column;
    align-items: flex-start;
  }

  .summary-grid,
  .layout-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .page {
    width: min(100vw - 20px, 1180px);
    padding-top: 18px;
  }

  h1 {
    font-size: 26px;
  }

  .summary-value {
    font-size: 28px;
  }
}
