/* グローバルスタイル */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica', 'Arial', sans-serif;
  background: #f5f7fa;
  color: #333;
}

/* カスタムスクロールバー */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: #f1f1f1;
}

::-webkit-scrollbar-thumb {
  background: #888;
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: #555;
}

/* ステータスバッジ */
.status-badge {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 12px;
  font-size: 12px;
  font-weight: 500;
}

.status-未着手 { background: #e5e7eb; color: #4b5563; }
.status-着手 { background: #dbeafe; color: #1e40af; }
.status-行政確認中 { background: #fef3c7; color: #92400e; }
.status-業者確認中 { background: #fde68a; color: #78350f; }
.status-決済待ち { background: #fecaca; color: #991b1b; }
.status-完了 { background: #d1fae5; color: #065f46; }

/* プロジェクトステータス */
.project-status-準備中 { background: #e0e7ff; color: #3730a3; }
.project-status-進行中 { background: #bfdbfe; color: #1e40af; }
.project-status-完了 { background: #d1fae5; color: #065f46; }
.project-status-中断 { background: #fee2e2; color: #991b1b; }
.project-status-アーカイブ { background: #e5e7eb; color: #4b5563; }

/* カテゴリーバッジ */
.category-行政 { background: #dbeafe; color: #1e40af; }
.category-施工 { background: #fde68a; color: #92400e; }
.category-備品 { background: #d1fae5; color: #065f46; }
.category-採用 { background: #e9d5ff; color: #6b21a8; }
.category-マーケ { background: #fed7aa; color: #9a3412; }

/* クリティカルパスハイライト */
.critical-path {
  border-left: 4px solid #dc2626;
  background: #fef2f2;
}

/* 遅延タスクハイライト */
.delayed-task {
  background: #fef2f2;
  border-left: 4px solid #dc2626;
}

/* 警告タスク */
.warning-task {
  background: #fffbeb;
  border-left: 4px solid #f59e0b;
}

/* ガントチャート用 */
.gantt-container {
  overflow-x: auto;
  overflow-y: auto;
  max-height: 600px;
}

.gantt-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid #e5e7eb;
  min-height: 40px;
}

.gantt-task-name {
  width: 250px;
  flex-shrink: 0;
  padding: 8px 12px;
  background: white;
  position: sticky;
  left: 0;
  z-index: 10;
}

.gantt-timeline {
  display: flex;
  flex: 1;
  position: relative;
}

.gantt-bar {
  position: absolute;
  height: 24px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  padding: 0 8px;
  font-size: 12px;
  color: white;
  cursor: pointer;
  transition: transform 0.2s;
}

.gantt-bar:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}

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

.progress-bar-fill {
  height: 100%;
  background: linear-gradient(90deg, #3b82f6, #2563eb);
  transition: width 0.3s ease;
}

/* カード */
.card {
  background: white;
  border-radius: 8px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
  padding: 20px;
  margin-bottom: 20px;
}

.card-header {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 16px;
  color: #1f2937;
}

/* ボタン */
.btn {
  padding: 8px 16px;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  border: none;
  transition: all 0.2s;
}

.btn-primary {
  background: #3b82f6;
  color: white;
}

.btn-primary:hover {
  background: #2563eb;
}

.btn-secondary {
  background: #6b7280;
  color: white;
}

.btn-secondary:hover {
  background: #4b5563;
}

.btn-success {
  background: #10b981;
  color: white;
}

.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: #ef4444;
  color: white;
}

.btn-danger:hover {
  background: #dc2626;
}

/* テーブル */
.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e5e7eb;
}

.table th {
  background: #f9fafb;
  font-weight: 600;
  color: #374151;
}

.table tr:hover {
  background: #f9fafb;
}

/* デッドラインステータス */
.deadline-normal { color: #059669; }
.deadline-warning { color: #f59e0b; }
.deadline-critical { color: #dc2626; font-weight: 600; }

/* 統計カード */
.stat-card {
  background: white;
  border-radius: 8px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.stat-number {
  font-size: 32px;
  font-weight: 700;
  margin-bottom: 8px;
}

.stat-label {
  font-size: 14px;
  color: #6b7280;
}

/* ローディング */
.loading {
  display: inline-block;
  width: 20px;
  height: 20px;
  border: 3px solid #f3f3f3;
  border-top: 3px solid #3b82f6;
  border-radius: 50%;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ステップフォーム */
.step-content.hidden {
  display: none;
}
