* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --bg: #0d1117; --surface: #161b22; --border: #30363d;
  --text: #c9d1d9; --dim: #8b949e; --accent: #58a6ff;
  --green: #3fb950; --yellow: #d29922; --red: #f85149;
}

body {
  font-family: -apple-system, 'Segoe UI', monospace;
  background: var(--bg); color: var(--text);
  padding: 16px; max-width: 1200px; margin: 0 auto;
}

header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 0; border-bottom: 1px solid var(--border); margin-bottom: 16px;
}
header h1 { font-size: 20px; color: var(--accent); }
#clock { color: var(--dim); font-size: 13px; }

/* 状态卡片 */
.cards {
  display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 10px; margin-bottom: 16px;
}
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px;
}
.card .mode { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.card .meta { font-size: 12px; color: var(--dim); line-height: 1.6; }

.dot {
  display: inline-block; width: 8px; height: 8px;
  border-radius: 50%; margin-right: 6px; vertical-align: middle;
}
.dot.idle { background: var(--green); }
.dot.running { background: var(--yellow); animation: pulse 1s infinite; }
.dot.error { background: var(--red); }
@keyframes pulse { 50% { opacity: .4; } }

/* 汇总栏 */
.summary-bar {
  display: flex; gap: 24px; padding: 10px 14px;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; margin-bottom: 16px; font-size: 14px;
}
.summary-bar span { color: var(--accent); font-weight: 600; }

/* 图表 */
.chart-wrap {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 14px; margin-bottom: 16px;
}

/* 表格 */
section > h2, .section-header h2 {
  font-size: 15px; margin-bottom: 8px; color: var(--dim);
}
.section-header {
  display: flex; justify-content: space-between; align-items: center;
}
.section-header select {
  background: var(--surface); color: var(--text); border: 1px solid var(--border);
  border-radius: 4px; padding: 4px 8px; font-size: 12px;
}
.table-wrap {
  overflow-x: auto; margin-bottom: 20px;
}
table {
  width: 100%; border-collapse: collapse; font-size: 13px;
}
th, td {
  text-align: left; padding: 6px 10px;
  border-bottom: 1px solid var(--border);
}
th { color: var(--dim); font-weight: 500; position: sticky; top: 0; background: var(--bg); }
tr:hover { background: rgba(88,166,255,.06); }
.edge-high { color: var(--green); font-weight: 600; }
.pnl-pos { color: var(--green); }
.pnl-neg { color: var(--red); }
