body { background: #f4f6f9; }
.login-wrap { height: 100vh; display: flex; align-items: center; justify-content: center; background: linear-gradient(135deg, #1d3557 0%, #2a4d7f 100%); }
.login-card { width: 360px; }
.sidebar { width: 220px; height: 100vh; position: fixed; left: 0; top: 0; background: #1d2733; color: #cfd8e3; display: flex; flex-direction: column; }
.sidebar-brand { padding: 16px; font-size: 18px; font-weight: 600; color: #fff; border-bottom: 1px solid rgba(255,255,255,.08); }
.sidebar-nav { flex: 1; overflow-y: auto; padding: 8px 0; }
.sidebar-nav a { display: block; padding: 10px 20px; color: #cfd8e3; text-decoration: none; font-size: 14px; }
.sidebar-nav a:hover, .sidebar-nav a.active { background: #2c3a4c; color: #fff; }
.sidebar-nav a i { width: 20px; margin-right: 8px; }
.sidebar-foot { padding: 12px 16px; font-size: 12px; border-top: 1px solid rgba(255,255,255,.08); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot-on { background: #2ecc71; } .dot-off { background: #e74c3c; }
.main { margin-left: 220px; min-height: 100vh; }
.topbar { display: flex; justify-content: space-between; align-items: center; background: #fff; padding: 12px 24px; border-bottom: 1px solid #e3e8ef; }
.view { padding: 24px; }
.card-stat { color: #fff; border: 0; }
.card-stat .num { font-size: 26px; font-weight: 700; }
.badge-state-running { background: #198754; } .badge-state-pending { background: #fd7e14; }
.badge-state-idle { background: #6c757d; } .badge-state-error { background: #dc3545; }
.badge-state-paused { background: #0d6efd; } .badge-state-stopped { background: #495057; }
.badge-state-pending_start, .badge-state-pending_pause, .badge-state-pending_stop { background: #fd7e14; }
.badge-state-pending_reload { background: #fd7e14; }
.badge-state-session_closed { background: #6f42c1; }
.table td, .table th { vertical-align: middle; font-size: 14px; }
.clickable { cursor: pointer; }
#kline-chart { width: 100%; height: 520px; }

/* ---------- 阶段 3：图表容器与页面块（ECharts / Chart.js） ---------- */
.chart-box { position: relative; height: 300px; }
.chart-box-lg { height: 360px; }
.chart-empty { position: absolute; left: 0; top: 0; right: 0; bottom: 0; display: flex; align-items: center;
  justify-content: center; color: #6c757d; font-size: 13px; pointer-events: none; }
#monitor-events > div { line-height: 1.4; }
#monitor-runtime > div { padding: 2px 0; }

/* 品种监控「策略状态」表：**整行底色表达多空**，一眼看出每条策略当前的方向 ——
   多头淡红、空头淡绿（红多绿空，与表内盈亏文字同一套国内口径），无持仓浅灰、读不到持仓不上色。
   底色写在 td 上（`> td`）而不是 tr：Bootstrap 的表格单元格自带 `background-color: var(--bs-table-bg)`，
   只有同层覆盖才看得见；悬停（table-hover）与选中（table-active）的遮罩叠加在它之上，不影响辨识。 */
#monitor-status-table tr.row-long > td { background-color: rgba(220, 53, 69, .08); }
#monitor-status-table tr.row-short > td { background-color: rgba(25, 135, 84, .08); }

/* 无持仓的行整行浅灰（弱化，别跟有仓位的行抢注意力）。
   徽标与「调整仓位」按钮不受影响：徽标自带背景与白字；按钮自带 color，优先级高于单元格的灰，
   在灰行里反而更醒目 —— 空仓行常常正是要手工建仓的那一行，按钮不该跟着变淡。 */
#monitor-status-table tr.row-flat > td { color: #adb5bd; }

