/* ================= 大户多空比监控 · 设计系统 ================= */
:root {
  --bg: #070b13;
  --panel: #0d1424;
  --panel2: #101a30;
  --border: #1a2640;
  --border2: #253354;
  --text: #e8edf6;
  --muted: #8290a8;
  --muted2: #5f6f8d;
  --accent: #3d7bff;
  --accent-soft: #8db4ff;
  --up: #ff5d5d;
  --down: #2fc6a2;
  --warn: #ffb648;
  --gold: #f2c14e;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh;
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "PingFang SC", "Microsoft YaHei", "Segoe UI", Roboto, sans-serif;
  font-size: 14px;
  background:
    radial-gradient(1100px 520px at 88% -8%, rgba(61, 123, 255, .10), transparent 60%),
    radial-gradient(900px 480px at -6% 108%, rgba(124, 92, 255, .08), transparent 55%),
    var(--bg);
}
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.warn { color: var(--warn); }
.muted { color: var(--muted); }
.small { font-size: 12px; }

/* ---------- 顶栏 ---------- */
.topbar {
  position: sticky; top: 0; z-index: 100;
  background: rgba(9, 14, 25, .85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 12px 22px;
}
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; font-weight: 700; text-decoration: none; color: var(--text); }
.brand-mark {
  width: 30px; height: 30px; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 9px; font-size: 16px;
  background: linear-gradient(135deg, rgba(61, 123, 255, .25), rgba(124, 92, 255, .25));
  border: 1px solid rgba(61, 123, 255, .45);
}
.brand b { background: linear-gradient(90deg, #7aa8ff, #b08cff); -webkit-background-clip: text; background-clip: text; color: transparent; font-weight: 800; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; font-size: 12px; border: 1px solid; white-space: nowrap; }
.chip-green { color: #4dd6b0; border-color: rgba(47, 198, 162, .4); background: rgba(47, 198, 162, .08); }
.dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 8px currentColor; animation: pulse 2s infinite; }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }

.main-wrap { max-width: 1560px; margin: 0 auto; padding: 22px; }
footer { border-top: 1px solid var(--border); padding: 16px; text-align: center; color: var(--muted2); font-size: 12px; }
footer a { color: var(--muted); text-decoration: none; }

/* ---------- 页头 ---------- */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-title { margin: 0; font-size: 22px; font-weight: 700; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 12.5px; }

/* ---------- 统计卡 / KPI 卡 ---------- */
.stat-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px; height: 100%; }
.stat-label { font-size: 12px; color: var(--muted); }
.stat-value { font-size: 24px; font-weight: 700; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat-value.accent { color: var(--accent-soft); }
.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(172px, 1fr)); gap: 10px; margin-bottom: 16px; }
.kpi-card { background: var(--panel); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; transition: border-color .15s; }
.kpi-card:hover { border-color: var(--border2); }
.kpi-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.kpi-icon { font-size: 14px; }
.kpi-value { font-size: 19px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; word-break: break-all; }
.kpi-sub { font-size: 11.5px; color: var(--muted2); margin-top: 3px; word-break: break-all; }

/* ---------- 面板 ---------- */
.panel { background: var(--panel); border: 1px solid var(--border); border-radius: 16px; margin-bottom: 16px; overflow: hidden; }
.panel-head { display: flex; align-items: center; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.panel-title { font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; white-space: nowrap; }

/* ---------- 分段按钮 ---------- */
.seg { display: inline-flex; gap: 2px; background: #0b1322; border: 1px solid var(--border2); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.seg button { border: none; background: transparent; color: var(--muted); padding: 6px 12px; border-radius: 8px; font-size: 12.5px; cursor: pointer; transition: all .12s; white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.active { background: var(--accent); color: #fff; box-shadow: 0 2px 8px rgba(61, 123, 255, .35); }
.seg-info button.active { background: rgba(61, 123, 255, .16); color: var(--accent-soft); box-shadow: none; border: 1px solid rgba(61, 123, 255, .45); }

/* ---------- 输入 / 按钮 ---------- */
.input-lsm {
  background: #0b1322; border: 1px solid var(--border2); color: var(--text);
  border-radius: 10px; padding: 7px 12px; font-size: 13px; min-width: 230px;
}
.input-lsm:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(61, 123, 255, .15); }
.input-lsm::placeholder { color: var(--muted2); }
.input-date { background: #0b1322; border: 1px solid var(--border2); color: var(--text); border-radius: 10px; padding: 6px 10px; font-size: 12.5px; }
.input-date:focus { outline: none; border-color: var(--accent); }
.input-date::-webkit-calendar-picker-indicator { filter: invert(.7); cursor: pointer; }
.btn-ghost { background: #111a30; border: 1px solid var(--border2); color: #c6d2e6; border-radius: 10px; padding: 7px 14px; font-size: 12.5px; cursor: pointer; transition: all .12s; white-space: nowrap; }
.btn-ghost:hover { border-color: var(--accent); color: #fff; }

/* ---------- 表格 ---------- */
.table-scroll { overflow: auto; max-height: calc(100vh - 200px); }
.table-lsm { width: 100%; border-collapse: separate; border-spacing: 0; font-size: 13px; min-width: 940px; }
.table-lsm thead th {
  position: sticky; top: 0; z-index: 5; background: var(--panel2); color: var(--muted);
  font-weight: 600; font-size: 12px; padding: 10px 14px;
  border-bottom: 1px solid var(--border2); text-align: right; white-space: nowrap;
}
.table-lsm th:first-child, .table-lsm td:first-child { text-align: left; }
.table-lsm tbody td { padding: 9px 14px; border-bottom: 1px solid rgba(26, 38, 64, .6); text-align: right; white-space: nowrap; }
.table-lsm tbody tr { transition: background .1s; }
.table-lsm tbody tr:hover { background: rgba(61, 123, 255, .055); }
.sym-link { color: #9dbdff; font-weight: 700; text-decoration: none; }
.sym-link:hover { text-decoration: underline; }
.sub-cell { display: block; font-size: 11px; color: var(--muted2); margin-top: 2px; }
.th-left { text-align: left !important; }

/* ---------- 徽章 ---------- */
.badge-lsm { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 600; border: 1px solid; white-space: nowrap; }
.lev2 { color: #ff8a8a; border-color: rgba(255, 93, 93, .4); background: rgba(255, 93, 93, .12); }
.lev1 { color: #ffc46b; border-color: rgba(255, 182, 72, .4); background: rgba(255, 182, 72, .1); }
.lev0 { color: var(--muted); border-color: rgba(127, 139, 163, .3); background: rgba(127, 139, 163, .1); }
.badge-new { color: var(--accent-soft); border-color: rgba(61, 123, 255, .45); background: rgba(61, 123, 255, .14); }
.badge-up { color: var(--up); border-color: rgba(255, 93, 93, .4); background: rgba(255, 93, 93, .1); }
.badge-down { color: var(--down); border-color: rgba(47, 198, 162, .4); background: rgba(47, 198, 162, .1); }

/* ---------- 图表 ---------- */
.chart-lg { height: 430px; width: 100%; }
.chart-md { height: 270px; width: 100%; }
@media (max-width: 768px) {
  .chart-lg { height: 320px; }
  .chart-md { height: 230px; }
  .input-lsm { min-width: 150px; width: 100%; }
}

/* ---------- 详情页 ---------- */
.sym-big { font-size: 24px; font-weight: 800; letter-spacing: .3px; }
.price-big { font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }
.divider-v { width: 1px; height: 26px; background: var(--border2); margin: 0 12px; }
