:root {
  --bg: #0b0f14;
  --panel: #121820;
  --panel-2: #171f29;
  --line: #223040;
  --text: #e6edf3;
  --muted: #8b9bb0;
  --accent: #4ade80;
  --accent-2: #60a5fa;
  --danger: #f87171;
  --warn: #fbbf24;
  --radius: 12px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: radial-gradient(1200px 600px at 20% -10%, #16202c 0%, var(--bg) 55%);
  color: var(--text);
  font: 15px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft YaHei", Roboto, sans-serif;
  min-height: 100vh;
}

a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }

code {
  background: #1b2530;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 1px 5px;
  font-size: 0.9em;
}

/* ── 顶栏 ─────────────────────────────── */
.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 24px;
  border-bottom: 1px solid var(--line);
  background: rgba(10, 14, 20, 0.75);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;
  font-weight: 600;
  letter-spacing: 0.2px;
}

.dot {
  width: 9px; height: 9px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 12px var(--accent);
}

.nav { display: flex; align-items: center; gap: 14px; }
.who { color: var(--muted); font-size: 13px; }
.inline { display: inline; margin: 0; }

/* ── 布局 ─────────────────────────────── */
.wrap {
  max-width: 1180px;
  margin: 0 auto;
  padding: 26px 24px 64px;
}

.headline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  margin-bottom: 20px;
}

.headline h1 { margin: 0 0 4px; font-size: 26px; letter-spacing: -0.3px; }
.headline p { margin: 0; }

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

/* ── 按钮 ─────────────────────────────── */
button, .ghost {
  font: inherit;
  cursor: pointer;
  border-radius: 9px;
  border: 1px solid var(--line);
  padding: 9px 16px;
  transition: 0.15s ease;
}

button.primary {
  background: linear-gradient(180deg, #3ddc74, #2fbf63);
  border-color: #2fbf63;
  color: #06120a;
  font-weight: 600;
}
button.primary:hover { filter: brightness(1.08); }
button.primary:disabled {
  background: #1c2733;
  border-color: var(--line);
  color: var(--muted);
  cursor: not-allowed;
}

.ghost {
  display: inline-block;
  background: transparent;
  color: var(--text);
  line-height: 1.4;
}
.ghost:hover { background: var(--panel-2); text-decoration: none; }
.ghost.small { padding: 6px 12px; font-size: 13px; }

.block { width: 100%; }

/* ── 卡片 ─────────────────────────────── */
.card {
  background: linear-gradient(180deg, var(--panel), #0f151d);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.card h2 { margin: 0 0 4px; font-size: 15px; font-weight: 600; }

.auth { max-width: 420px; margin: 6vh auto 0; }
.auth h1 { margin: 0 0 6px; font-size: 22px; }

/* ── 表单 ─────────────────────────────── */
.stack { display: flex; flex-direction: column; gap: 14px; margin-top: 18px; }

label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--muted); }

input {
  font: inherit;
  color: var(--text);
  background: #0c1218;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 12px;
  outline: none;
}
input:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(96,165,250,0.15); }

/* ── 提示条 ───────────────────────────── */
.flash {
  border-radius: 10px;
  padding: 11px 14px;
  margin-bottom: 16px;
  font-size: 14px;
  border: 1px solid var(--line);
  background: var(--panel-2);
}
.flash.ok { border-color: #1f6f45; background: #0f2318; color: #9be7bb; }
.flash.error { border-color: #7a2b2b; background: #201010; color: #ffb3b3; }

/* ── KPI ──────────────────────────────── */
.kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.kpi {
  background: linear-gradient(180deg, var(--panel), #0f151d);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.kpi-label { font-size: 12px; color: var(--muted); letter-spacing: 0.3px; }
.kpi-value { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }

.up { color: var(--accent); }
.down { color: var(--danger); }
.warn { color: var(--warn); }
.flat { color: var(--muted); }
.kpi-hint { font-size: 11px; color: var(--muted); line-height: 1.2; }

/* ── 图表 ─────────────────────────────── */
.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 12px;
  margin-bottom: 18px;
}

.spark { width: 100%; height: 140px; display: block; margin-top: 12px; }

.spark-meta {
  display: flex;
  justify-content: space-between;
  font-size: 12px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.empty { padding: 28px 0; text-align: center; }

/* ── 表格 ─────────────────────────────── */
.table-card { padding: 18px 0 0; }
.table-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0 20px 12px;
}
.table-scroll { overflow-x: auto; }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

table.data th, table.data td {
  padding: 10px 14px;
  border-top: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

table.data th {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: none;
  background: #0e141b;
  position: sticky;
  top: 0;
}

table.data tbody tr:hover { background: #141c25; }

.title-cell { max-width: 380px; }
.title-cell a { color: var(--text); }
.title-cell a:hover { color: var(--accent-2); }

.r { text-align: right; }
.mono { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.center { text-align: center; }

.muted { color: var(--muted); }
.tiny { font-size: 12px; }
.footer-note { margin-top: 18px; text-align: center; }

/* ── 公开页面 ─────────────────────────── */
.legal p { margin: 0 0 14px; }
.bullets { margin: 14px 0 0; padding-left: 20px; color: var(--muted); }
.bullets li { margin-bottom: 6px; }
a.btn {
  display: inline-block;
  background: linear-gradient(180deg, #3ddc74, #2fbf63);
  color: #06120a;
  font-weight: 600;
  border-radius: 9px;
  padding: 9px 16px;
  text-decoration: none;
}
a.btn:hover { filter: brightness(1.08); text-decoration: none; }

@media (max-width: 640px) {
  .wrap { padding: 16px 14px 48px; }
  .headline h1 { font-size: 21px; }
  .kpi-value { font-size: 19px; }
  table.data th, table.data td { padding: 9px 10px; }
}
