* { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --bg: #f5f7fa;
  --card: #ffffff;
  --ink: #1f2933;
  --muted: #6b7280;
  --line: #e5e7eb;
  --accent: #2ecc71;
  --accent2: #3498db;
  --warn: #e74c3c;
}
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
  background: var(--bg); color: var(--ink); line-height: 1.5;
}
#app { min-height: 100vh; }
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 24px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 14px; }
.logo { font-size: 32px; }
.topbar h1 { font-size: 20px; font-weight: 700; }
.subtitle { font-size: 12px; color: var(--muted); }
.badge {
  font-size: 12px; color: #92400e; background: #fef3c7;
  padding: 4px 10px; border-radius: 999px; font-weight: 600;
}
.loading { padding: 80px; text-align: center; color: var(--muted); }
.layout, .content { } /* placeholder */
.sidebar {
  position: fixed; top: 73px; left: 0; bottom: 0; width: 240px;
  background: var(--card); border-right: 1px solid var(--line);
  padding: 18px; overflow-y: auto;
}
.sidebar h3 { font-size: 14px; margin-bottom: 12px; }
.field-label { display: block; font-size: 12px; color: var(--muted); margin: 14px 0 6px; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  font-size: 12px; background: var(--bg); border: 1px solid var(--line);
  padding: 4px 8px; border-radius: 6px; cursor: pointer; user-select: none;
}
.chip input { margin-right: 4px; }
.reset-btn {
  margin-top: 16px; width: 100%; padding: 8px; border: 1px solid var(--line);
  background: var(--card); border-radius: 8px; cursor: pointer; font-size: 13px;
}
.reset-btn:hover { background: var(--bg); }
.filter-status { font-size: 12px; color: var(--muted); margin-top: 12px; }
.disclaimer { font-size: 11px; color: var(--warn); margin-top: 18px; line-height: 1.4; }
.content { margin-left: 240px; padding: 24px; }
.empty, .caption { color: var(--muted); font-size: 13px; padding: 20px 0; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 20px; }
.kpi {
  background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 16px; display: flex; flex-direction: column; gap: 6px;
}
.kpi-label { font-size: 12px; color: var(--muted); }
.kpi-value { font-size: 22px; font-weight: 700; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 18px; margin-bottom: 18px; }
.card h3 { font-size: 15px; margin-bottom: 12px; }
.plot { width: 100%; height: 320px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table th, .data-table td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.data-table th { color: var(--muted); font-weight: 600; }
@media (max-width: 900px) {
  .sidebar { position: static; width: 100%; border-right: none; border-bottom: 1px solid var(--line); }
  .content { margin-left: 0; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
}
