/* ===== Sidebar Styles ===== */

.sidebar {
  background: white;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar-header {
  padding: 20px;
  border-bottom: 2px solid #eee;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.sidebar-header h3 {
  margin: 0;
  color: #667eea;
}

.sidebar-toggle {
  background: none;
  border: none;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 5px;
  display: none; /* デスクトップでは非表示 */
}

.sidebar-content {
  padding: 20px;
}

/* フィルターセクション */
.filter-section {
  margin-bottom: 30px;
}

.filter-section h4 {
  margin-bottom: 12px;
  color: #555;
}

.filter-options {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.filter-option {
  display: flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 6px;
  transition: background 0.2s;
}

.filter-option:hover {
  background: #f5f5f5;
}

.filter-option input[type="radio"] {
  margin-right: 10px;
}

/* 閾値セクション */
.threshold-section {
  margin-bottom: 30px;
  padding: 15px;
  background: #f8f9fa;
  border-radius: 8px;
}

.threshold-section h4 {
  margin-bottom: 10px;
}

.threshold-section label {
  display: block;
  margin-bottom: 8px;
  font-size: 0.9rem;
  color: #666;
}

.threshold-select {
  width: 100%;
  padding: 8px 12px;
  font-size: 1rem;
  border: 2px solid #ddd;
  border-radius: 6px;
  background: white;
  cursor: pointer;
}

.threshold-select:focus {
  outline: none;
  border-color: #667eea;
}

/* 統計セクション */
.stats-section {
  margin-bottom: 30px;
}

.stats-panel h4 {
  margin-bottom: 15px;
  color: #555;
}

.stat-item {
  margin-bottom: 20px;
  padding: 12px;
  background: #f8f9fa;
  border-radius: 8px;
}

.stat-label {
  font-weight: bold;
  margin-bottom: 6px;
  color: #555;
}

.stat-value {
  font-size: 1.1rem;
  color: #667eea;
  margin-bottom: 8px;
}

.stat-detail {
  font-size: 0.85rem;
  color: #888;
  margin-top: 4px;
}

/* プログレスバー */
.progress-bar {
  width: 100%;
  height: 8px;
  background: #e0e0e0;
  border-radius: 4px;
  overflow: hidden;
  margin-top: 8px;
}

.progress-fill {
  height: 100%;
  background: #667eea;
  transition: width 0.3s ease;
  border-radius: 4px;
}

/* アクションセクション */
.actions-section {
  margin-top: 30px;
  padding-top: 20px;
  border-top: 2px solid #eee;
}

/* 折りたたみ状態 */
.sidebar.collapsed {
  transform: translateX(-100%);
}
