/* 晶花ブースト統計ダッシュボード */

.cfs-main {
  max-width: 960px;
}

/* ─── グローバルローディング ─── */

.cfs-global-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 4rem 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.cfs-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: cfs-spin 0.7s linear infinite;
}

@keyframes cfs-spin {
  to { transform: rotate(360deg); }
}

.cfs-global-loading[hidden] {
  display: none;
}

.cfs-global-error {
  padding: 2rem 1rem;
  text-align: center;
  color: #e53e3e;
  font-size: 0.95rem;
}

.cfs-global-error[hidden] {
  display: none;
}

/* ─── メタ情報 ─── */

.cfs-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  margin-bottom: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* ─── セクション ─── */

.cfs-section {
  margin-bottom: 1.75rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.cfs-heading {
  margin: 0 0 0.25rem;
  font-size: 1.1rem;
  font-weight: 600;
}

.cfs-desc {
  margin: 0 0 1rem;
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* ─── チャートエリア ─── */

.cfs-chart-wrap {
  position: relative;
}

.cfs-chart-bar {
  height: 300px;
}

.cfs-chart-doughnut {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 280px;
}

.cfs-chart-doughnut canvas {
  max-width: 100%;
  max-height: 320px;
}

/* ─── セレクト ─── */

.cfs-control-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.cfs-label {
  font-size: 0.9rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.cfs-select {
  min-width: 200px;
  padding: 0.5rem 0.75rem;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}

.cfs-select:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ─── レスポンシブ ─── */

@media (max-width: 600px) {
  .cfs-chart-bar {
    height: 260px;
  }

  .cfs-chart-doughnut canvas {
    max-height: 260px;
  }

  .cfs-control-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .cfs-select {
    width: 100%;
  }
}
