/* nebula-edge PRD 全局设计变量与通用样式
   所有页面（index.html 及各菜单页）引用同一份，保证分页/按钮/查询条件/卡片风格一致。 */
:root {
  --bg: #f4f6f9;
  --surface: #ffffff;
  --surface2: #f8fafc;
  --border: #e8ecf1;
  --border-strong: #d8e0e8;
  --accent: #1677ff;
  --accent-soft: #e9f2ff;
  --accent-dark: #0a5ad6;
  --success: #0a9e6e;
  --success-soft: #e6f7f1;
  --warning: #d48806;
  --warning-soft: #fff7e6;
  --danger: #e0483d;
  --danger-soft: #fff1f0;
  --purple: #722ed1;
  --text: #1a2734;
  --text-dim: #5c6b7a;
  --text-muted: #93a1af;
  --mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --sans: 'Noto Sans SC', -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', sans-serif;
  --radius: 6px;
  --shadow: 0 6px 20px rgba(20, 40, 62, .08);
}

*, *::before, *::after { box-sizing: border-box; }
html, body, #root { height: 100%; margin: 0; }
body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}
.mono, .num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d3dae2; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #b9c3ce; }

/* ── 页面通用骨架：所有菜单页共用 ───────────────────── */
.page { padding: 18px 20px 28px; min-height: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.page-title { font-size: 20px; font-weight: 600; line-height: 1.3; margin: 0; letter-spacing: -.01em; }
.page-desc { font-size: 12px; color: var(--text-dim); margin-top: 4px; }

/* 统计卡片：四联，数值用等宽字体 */
.stat-row { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 14px; }
.stat-card {
  position: relative; background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 14px 16px; overflow: hidden;
  transition: border-color .18s, box-shadow .18s;
}
.stat-card.clickable { cursor: pointer; }
.stat-card.clickable:hover { border-color: var(--accent); box-shadow: var(--shadow); }
.stat-card.active { border-color: var(--accent); background: var(--accent-soft); }
.stat-card::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--stat, var(--accent)); }
.stat-label { font-size: 12px; color: var(--text-dim); }
.stat-value { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 26px; font-weight: 600; line-height: 1.25; margin-top: 4px; color: var(--stat, var(--text)); }
.stat-note { font-size: 11px; color: var(--text-muted); margin-top: 2px; }

/* 查询条件栏：统一为「行内标签 + 控件 + 右侧查询/重置」 */
.filter-bar {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 14px 16px; margin-bottom: 14px;
  display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px;
}
.filter-item { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.filter-label { font-size: 12px; color: var(--text-dim); }
.filter-actions { margin-left: auto; display: flex; gap: 8px; align-items: flex-end; padding-bottom: 1px; }

/* 列表容器 */
.panel { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); }
.panel-title { font-size: 14px; font-weight: 600; }
.panel-body { padding: 12px 16px 16px; }

/* 模拟画面：用 SVG 占位，无外部图片依赖 */
.scene { display: block; width: 100%; height: 100%; background: #0c1a26; }
.scene-box { position: relative; overflow: hidden; background: #0c1a26; border-radius: 4px; }

@media (max-width: 1120px) {
  .stat-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition: none !important; }
}

/* 摄像头标签与「+N」折叠（交互与中心端一致） */
.cam-tags { display: inline-flex; gap: 4px; flex-wrap: nowrap; align-items: center; }
.cam-tag {
  display: inline-flex; align-items: center; gap: 4px;
  background: #f1f5f9; border: 1px solid #e2e8f0; color: var(--text-dim);
  font-size: 11px; padding: 2px 7px; border-radius: 3px; white-space: nowrap;
  max-width: 150px; overflow: hidden; text-overflow: ellipsis;
}
.cam-tag.cam-more { cursor: pointer; background: var(--accent-soft); border-color: #bfdbfe; color: var(--accent); font-weight: 600; flex-shrink: 0; }
.cam-tag.cam-more:hover { background: #dbeafe; border-color: #93c5fd; }
