/* 深色量化分析主题 */
* { box-sizing: border-box; }
body {
  margin: 0;
  background: #0d1117;
  color: #c9d1d9;
  font-family: -apple-system, "SF Pro", "PingFang SC", "Helvetica Neue", Arial, sans-serif;
  font-size: 14px;
}
main { max-width: 1200px; margin: 0 auto; padding: 24px 20px 60px; }
h2 { font-size: 17px; font-weight: 600; color: #e6edf3; margin: 32px 0 14px; }
h2:first-child { margin-top: 8px; }
a { color: #58a6ff; text-decoration: none; }
a:hover { text-decoration: underline; }

.topnav {
  display: flex; align-items: center; gap: 22px;
  padding: 12px 24px;
  background: #161b22;
  border-bottom: 1px solid #21262d;
}
.topnav .brand { font-weight: 700; color: #e6edf3; letter-spacing: .5px; }
.topnav a { color: #8b949e; }
.topnav a.active { color: #58a6ff; }
.topnav .logout { margin-left: auto; }

.hint { font-size: 12px; color: #8b949e; font-weight: 400; margin-left: 8px; }
.badge {
  font-size: 11px; padding: 2px 8px; border-radius: 10px;
  background: #21262d; color: #8b949e; vertical-align: middle;
}
.switch { font-size: 13px; margin-left: 10px; }

.cards { display: flex; flex-wrap: wrap; gap: 12px; }
.card {
  background: #161b22; border: 1px solid #21262d; border-radius: 8px;
  padding: 14px 18px; min-width: 130px;
}
.card-label { font-size: 12px; color: #8b949e; margin-bottom: 6px; }
.card-value { font-size: 20px; font-weight: 600; color: #e6edf3; font-variant-numeric: tabular-nums; }
.card-value.small { font-size: 14px; }

.pos { color: #3fb950 !important; }
.neg { color: #f85149 !important; }

.data-table {
  width: 100%; border-collapse: collapse;
  background: #161b22; border: 1px solid #21262d; border-radius: 8px;
  overflow: hidden; font-variant-numeric: tabular-nums;
}
.data-table th, .data-table td {
  padding: 8px 14px; text-align: right; border-bottom: 1px solid #21262d;
}
.data-table th:first-child, .data-table td:first-child { text-align: left; }
.data-table th { background: #1c2128; color: #8b949e; font-weight: 500; font-size: 12px; }
.data-table tbody tr:hover { background: #1c2128; }
.hint-cell { color: #8b949e; font-size: 12px; }
.empty { color: #8b949e; }

.heat-pos { background: rgba(63, 185, 80, calc(var(--i) * 0.35)); }
.heat-neg { background: rgba(248, 81, 73, calc(var(--i) * 0.35)); }

.chart { height: 320px; background: #161b22; border: 1px solid #21262d; border-radius: 8px; }
.chart.tall { height: 420px; }

.login-body {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
}
.login-card {
  width: 320px; padding: 36px 32px;
  background: #161b22; border: 1px solid #21262d; border-radius: 10px;
  display: flex; flex-direction: column; gap: 14px;
}
.login-card h1 { margin: 0; font-size: 22px; color: #e6edf3; text-align: center; }
.login-card .sub { margin: 0 0 8px; font-size: 12px; color: #8b949e; text-align: center; }
.login-card input {
  padding: 10px 12px; border-radius: 6px; border: 1px solid #30363d;
  background: #0d1117; color: #e6edf3; font-size: 14px; outline: none;
}
.login-card input:focus { border-color: #58a6ff; }
.login-card button {
  padding: 10px; border: none; border-radius: 6px;
  background: #238636; color: #fff; font-size: 14px; font-weight: 600; cursor: pointer;
}
.login-card button:hover { background: #2ea043; }
.login-error {
  padding: 8px 12px; border-radius: 6px; font-size: 13px;
  background: rgba(248, 81, 73, .12); color: #f85149; border: 1px solid rgba(248, 81, 73, .4);
}
