:root {
  --bg: #0f1419;
  --surface: #1a2029;
  --surface-2: #232b37;
  --text: #e6edf3;
  --muted: #8b97a8;
  --accent: #60a5fa;
  --good: #4ade80;
  --bad: #f87171;
  --warn: #fbbf24;
  --border: #2d3748;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang TC", sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.page {
  max-width: 1280px;
  margin: 0 auto;
  padding: 20px;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
  flex-wrap: wrap;
  gap: 12px;
}
header h1 { font-size: 22px; font-weight: 600; }

.status-bar { display: flex; gap: 8px; align-items: center; }
.pill {
  background: var(--surface-2);
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid var(--border);
}
.pill.good { background: #14532d; border-color: #166534; color: #bbf7d0; }
.pill.bad { background: #7f1d1d; border-color: #991b1b; color: #fecaca; }
.pill.warn { background: #78350f; border-color: #92400e; color: #fef3c7; }
.muted { color: var(--muted); font-size: 12px; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 16px;
  margin-bottom: 16px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 16px;
}
.card h2 {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 12px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 16px;
}
.grid-2 > div { display: flex; flex-direction: column; }
.label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.value { font-size: 15px; font-weight: 500; font-variant-numeric: tabular-nums; }

.scroll {
  max-height: 480px;
  overflow: auto;
  border-radius: 6px;
}

table { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; text-align: right; border-bottom: 1px solid var(--border); }
th:first-child, td:first-child { text-align: left; }
th {
  position: sticky; top: 0;
  background: var(--surface-2);
  color: var(--muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
tr:hover td { background: var(--surface-2); }

.tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  flex-wrap: wrap;
  overflow-x: auto;
}
.tab {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 12px;
  font-size: 13px;
  cursor: pointer;
  white-space: nowrap;
}
.tab:hover { background: var(--surface-2); }
.tab.active {
  background: var(--accent);
  color: #0b1220;
  border-color: var(--accent);
  font-weight: 600;
}
.panel-head {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}
.panel-head h2 { font-size: 18px; margin: 0; }
.card.inner { margin-bottom: 0; }
.card h3 {
  font-size: 13px;
  font-weight: 600;
  margin: 16px 0 8px;
  color: var(--muted);
  letter-spacing: 0.5px;
  text-transform: uppercase;
}

.win { color: var(--good); }
.loss { color: var(--bad); }
.pending { color: var(--muted); font-style: italic; }
.signal-yes { color: var(--warn); font-weight: 600; }
