/* 数据概览 v2：花费卡 / KPI 网格 / 趋势 */

.dash-ranges { display: flex; gap: 6px; flex-wrap: wrap }

.panel-head.compact { margin-bottom: 8px }

.dash-chip {
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--hover, #f5f7fb);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

/* 区块分隔：斗篷数据 */
.dash-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin: 22px 0 12px;
  padding-left: 2px;
}
.dash-section-head h2 { font-size: 15px; margin: 0; color: var(--text) }
.dash-section-head p { margin: 3px 0 0; font-size: 12px; color: var(--muted) }
.dash-section-head::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
  margin-bottom: 6px;
}
[data-theme="dark"] .dash-chip { background: #16213a; border-color: #23304d }

.dash-spend-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 16px;
}
.dash-spend-card { padding: 18px 20px; }
.dash-spend-row {
  display: flex;
  gap: 28px;
  align-items: flex-end;
  flex-wrap: wrap;
  margin-top: 4px;
}
.dash-spend-row > div { display: flex; flex-direction: column; gap: 3px; }
.dash-spend-row small { font-size: 12px; color: var(--muted); }
.dash-spend-row strong { font-size: 26px; font-weight: 800; color: var(--text); line-height: 1.1; }
.dash-spend-row em { font-size: 12px; color: var(--muted); font-style: normal; }

.dash-delta {
  margin-left: auto;
  padding: 4px 10px;
  border-radius: 999px;
  background: #ffece8;
  color: #f53f3f;
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.dash-delta.up { background: #e8ffea; color: #00a854; }
.dash-delta.flat { background: #e2e8f0; color: #475569; }

.dash-kpi-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}
.dash-kpi {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
}
.dash-kpi small { font-size: 12px; color: var(--muted); }
.dash-kpi strong { font-size: 20px; font-weight: 800; color: var(--text); line-height: 1.15; }
.dash-kpi em { font-size: 11px; color: var(--muted); font-style: normal; }
.dash-kpi.warn strong { color: #b45309; }

.dash-chart-box { position: relative; height: 280px; padding: 6px 4px 0; }
.dash-asset-name { font-weight: 600; color: var(--text); }

@media (max-width: 1100px) {
  .dash-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dash-spend-grid { grid-template-columns: 1fr; }
  .dash-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-chart-box { height: 210px; }
}

[data-theme="dark"] .dash-delta { background: #3b1a1f; color: #fca5a5; }
[data-theme="dark"] .dash-delta.up { background: #0f2f27; color: #7fe3c1; }
[data-theme="dark"] .dash-delta.flat { background: #1c2740; color: #cbd5e1; }
