body {
  font-family: -apple-system, "PingFang SC", "Microsoft YaHei", sans-serif;
  margin: 0;
  padding: 24px;
  background: #0f1115;
  color: #e6e6e6;
}

header {
  margin-bottom: 24px;
  border-bottom: 1px solid #2a2d34;
  padding-bottom: 16px;
}

h1 {
  margin: 0 0 8px 0;
  font-size: 22px;
}

.meta {
  display: flex;
  gap: 20px;
  font-size: 13px;
  color: #9aa0a6;
  flex-wrap: wrap;
}

.warning {
  color: #f2c94c;
}

button {
  margin-top: 12px;
  padding: 8px 16px;
  background: #3b82f6;
  color: white;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 13px;
}

button:disabled {
  background: #4b5563;
  cursor: not-allowed;
}

#refresh-status {
  margin-left: 12px;
  font-size: 13px;
  color: #9aa0a6;
}

section {
  margin-bottom: 32px;
}

h2 {
  font-size: 16px;
  border-left: 3px solid #3b82f6;
  padding-left: 10px;
}

.hint {
  font-size: 13px;
  color: #9aa0a6;
}

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

th, td {
  padding: 8px 10px;
  border-bottom: 1px solid #2a2d34;
  text-align: left;
  white-space: nowrap;
}

th {
  color: #9aa0a6;
  font-weight: 500;
}

.pos { color: #4ade80; }
.neg { color: #f87171; }

.stage-STAGE1 { color: #60a5fa; }
.stage-STAGE2 { color: #fbbf24; }
.stage-STAGE3 { color: #a78bfa; }
.stage-IDLE { color: #6b7280; }
.stage-COOLDOWN { color: #94a3b8; }
.stage-WAIT_S3 { color: #a78bfa; }

nav.top-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  border-bottom: 1px solid #2a2d34;
  padding-bottom: 0;
}

nav.top-nav a {
  display: inline-block;
  padding: 10px 16px;
  color: #9aa0a6;
  text-decoration: none;
  font-size: 14px;
  border-bottom: 2px solid transparent;
}

nav.top-nav a:hover {
  color: #e6e6e6;
}

nav.top-nav a.active {
  color: #e6e6e6;
  border-bottom-color: #3b82f6;
}

nav.sub-nav {
  margin-bottom: 16px;
  font-size: 13px;
}

nav.sub-nav a {
  color: #60a5fa;
  text-decoration: none;
  margin-right: 16px;
}

nav.sub-nav a:hover {
  text-decoration: underline;
}

a { color: #60a5fa; }

.card {
  background: #171a21;
  border: 1px solid #2a2d34;
  border-radius: 8px;
  padding: 16px 20px;
  margin-bottom: 16px;
}

.card h3 {
  margin: 0 0 10px 0;
  font-size: 15px;
}

.card ul {
  margin: 6px 0;
  padding-left: 20px;
}

.card li {
  margin-bottom: 4px;
  font-size: 13px;
  color: #cbd5e1;
}

.big-number {
  font-size: 20px;
  font-weight: 600;
}

.disclaimer {
  font-size: 12px;
  color: #6b7280;
  font-style: italic;
}

.freshness-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

.freshness-grid .item {
  background: #171a21;
  border: 1px solid #2a2d34;
  border-radius: 6px;
  padding: 10px 14px;
}

.freshness-grid .item .label {
  font-size: 12px;
  color: #9aa0a6;
}

.freshness-grid .item .value {
  font-size: 15px;
  margin-top: 4px;
}

#kline-chart {
  width: 100%;
  height: 480px;
  margin-bottom: 16px;
}

footer {
  margin-top: 40px;
  font-size: 12px;
  color: #6b7280;
}
