* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Noto Sans JP', sans-serif;
  background: #f7f7f5;
  color: #37352f;
  font-size: 14px;
}

.layout { display: flex; min-height: 100vh; }

/* ── サイドナビ ─────────────────────────────────────── */
.sidebar {
  width: 220px;
  background: #fbfbfa;
  border-right: 1px solid #e9e9e7;
  display: flex;
  flex-direction: column;
  padding: 12px 0;
  position: fixed;
  height: 100vh;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 16px;
}
.brand-icon {
  width: 28px; height: 28px;
  background: #6366f1;
  border-radius: 6px;
  color: #fff;
  font-weight: 700;
  font-size: 14px;
  display: flex; align-items: center; justify-content: center;
}
.brand-name { font-weight: 600; font-size: 14px; color: #37352f; }

.nav-section-label {
  padding: 10px 14px 4px;
  font-size: 11px;
  color: #9b9a97;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.nav-list { list-style: none; }
.nav-item {
  padding: 5px 12px;
  margin: 1px 6px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 13px;
  color: #37352f;
  transition: background 0.15s;
}
.nav-item:hover { background: #ebebea; }
.nav-item.active { background: #e8e8e6; font-weight: 500; }

.sidebar-footer {
  margin-top: auto;
  padding: 12px 14px;
  font-size: 11px;
  color: #b6b5b2;
}

/* ── メインコンテンツ ────────────────────────────────── */
.main { margin-left: 220px; min-height: 100vh; }

/* ── ヒーロー ────────────────────────────────────────── */
.hero {
  position: relative;
  height: 180px;
  background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
  overflow: hidden;
}
.hero-overlay {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.18);
}
.hero-content {
  position: relative;
  padding: 32px 40px 0;
  color: #fff;
}
.hero-title {
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.hero-kpi {
  display: flex;
  gap: 32px;
}
.hero-stat { text-align: center; }
.hero-stat-value { font-size: 24px; font-weight: 700; line-height: 1; }
.hero-stat-label { font-size: 11px; opacity: 0.8; margin-top: 4px; }

/* ── パネル ──────────────────────────────────────────── */
.panel-wrapper { display: none; padding: 24px 28px; }
.panel-wrapper.active { display: block; }

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.panel-title { font-size: 20px; font-weight: 600; color: #37352f; }

/* ── ダッシュボードグリッド ──────────────────────────── */
.dashboard-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  padding: 24px 28px;
}

/* ── DBカード ────────────────────────────────────────── */
.db-card {
  background: #fff;
  border: 1px solid #e9e9e7;
  border-radius: 8px;
  overflow: hidden;
}
.db-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 10px;
  border-bottom: 1px solid #f0f0ef;
}
.db-card-title { font-size: 13px; font-weight: 600; color: #37352f; }
.db-view-tabs { display: flex; gap: 4px; }
.db-tab {
  font-size: 11px;
  padding: 3px 10px;
  border-radius: 4px;
  color: #9b9a97;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.15s;
}
.db-tab:hover { background: #f0f0ef; }
.db-tab.active { background: #ebebea; color: #37352f; font-weight: 500; }

/* ── タスクリスト ────────────────────────────────────── */
.task-list { padding: 6px 0; max-height: 300px; overflow-y: auto; }
.task-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 16px;
  border-bottom: 1px solid #f7f7f5;
  font-size: 13px;
}
.task-row:last-child { border-bottom: none; }
.task-checkbox {
  width: 16px; height: 16px;
  border: 1.5px solid #d3d1cb;
  border-radius: 3px;
  flex-shrink: 0;
}
.task-name { flex: 1; color: #37352f; }
.task-meta { font-size: 11px; color: #9b9a97; }
.task-empty { padding: 24px 16px; text-align: center; color: #9b9a97; font-size: 13px; }

/* ── ガントチャート ──────────────────────────────────── */
.gantt-wrap { padding: 12px 16px; overflow-x: auto; }
.gantt-header {
  display: flex;
  gap: 0;
  margin-bottom: 8px;
  padding-left: 140px;
}
.gantt-month {
  font-size: 10px;
  color: #9b9a97;
  flex: 1;
  text-align: center;
  border-left: 1px solid #f0f0ef;
  padding-bottom: 4px;
}
.gantt-row {
  display: flex;
  align-items: center;
  height: 32px;
  margin-bottom: 4px;
}
.gantt-label {
  width: 140px;
  flex-shrink: 0;
  font-size: 12px;
  color: #37352f;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  padding-right: 10px;
}
.gantt-track {
  flex: 1;
  height: 20px;
  background: #f7f7f5;
  border-radius: 4px;
  position: relative;
  overflow: hidden;
}
.gantt-bar {
  position: absolute;
  top: 3px; height: 14px;
  border-radius: 3px;
  display: flex;
  align-items: center;
  padding: 0 6px;
  font-size: 10px;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
}
.gantt-today {
  position: absolute;
  top: 0; bottom: 0;
  width: 1.5px;
  background: #ef4444;
  z-index: 2;
}
.gantt-empty { padding: 24px 16px; text-align: center; color: #9b9a97; font-size: 13px; }
.gantt-table { padding: 0 0 8px; }
.gantt-table-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-bottom: 1px solid #f7f7f5;
  font-size: 13px;
}
.gantt-table-row:last-child { border-bottom: none; }
.gantt-table-name { flex: 1; }

/* ── ノートボード ────────────────────────────────────── */
.notes-board {
  display: flex;
  gap: 12px;
  padding: 12px 16px;
  overflow-x: auto;
  min-height: 200px;
}
.notes-col { min-width: 160px; flex-shrink: 0; }
.notes-col-header {
  font-size: 11px;
  font-weight: 600;
  color: #9b9a97;
  margin-bottom: 8px;
  padding: 0 2px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.note-card {
  background: #f7f7f5;
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 8px;
  font-size: 12px;
  color: #37352f;
  border: 1px solid #e9e9e7;
  cursor: default;
  transition: box-shadow 0.15s;
}
.note-card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.08); }
.note-card-title { font-weight: 500; margin-bottom: 4px; line-height: 1.4; }
.note-card-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.note-tag {
  font-size: 10px;
  background: #e9e9e7;
  border-radius: 3px;
  padding: 1px 6px;
  color: #6b6966;
}
.notes-empty { padding: 24px 16px; text-align: center; color: #9b9a97; font-size: 13px; }

/* ── 売上グラフ ──────────────────────────────────────── */
.finance-wrap { padding: 12px 16px; }
.finance-summary {
  display: flex;
  gap: 20px;
  margin-bottom: 16px;
}
.finance-stat {
  text-align: center;
  flex: 1;
  padding: 10px;
  background: #f7f7f5;
  border-radius: 6px;
}
.finance-stat-value { font-size: 18px; font-weight: 700; color: #37352f; }
.finance-stat-label { font-size: 11px; color: #9b9a97; margin-top: 2px; }
.finance-chart { margin-top: 8px; }
.finance-bar-row {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
}
.finance-bar-label { width: 60px; font-size: 11px; color: #9b9a97; text-align: right; flex-shrink: 0; }
.finance-bar-track {
  flex: 1;
  height: 20px;
  background: #f0f0ef;
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.finance-bar-fill {
  height: 100%;
  border-radius: 4px;
  background: #6366f1;
  transition: width 0.5s ease;
}
.finance-bar-fill.target { background: #e9e9e7; position: absolute; top: 0; }
.finance-bar-val { font-size: 11px; color: #6b6966; width: 70px; flex-shrink: 0; }
.finance-empty { padding: 24px 16px; text-align: center; color: #9b9a97; font-size: 13px; }

/* ── フィルター・テーブル ────────────────────────────── */
.filter-bar { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.filter-btn {
  padding: 5px 14px;
  border-radius: 20px;
  border: 1px solid #e9e9e7;
  background: #fff;
  font-size: 12px;
  color: #6b6966;
  cursor: pointer;
  transition: all 0.15s;
  font-family: inherit;
}
.filter-btn:hover { background: #f0f0ef; }
.filter-btn.active { background: #37352f; color: #fff; border-color: #37352f; }

.table-wrap { overflow-x: auto; }
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.data-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 11px;
  font-weight: 600;
  color: #9b9a97;
  border-bottom: 1px solid #e9e9e7;
  white-space: nowrap;
}
.data-table td {
  padding: 10px 12px;
  border-bottom: 1px solid #f0f0ef;
  vertical-align: middle;
}
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: #fafafa; }

/* ── バッジ ──────────────────────────────────────────── */
.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}
.badge-blue    { background: #dbeafe; color: #1d4ed8; }
.badge-green   { background: #dcfce7; color: #15803d; }
.badge-yellow  { background: #fef9c3; color: #a16207; }
.badge-orange  { background: #ffedd5; color: #c2410c; }
.badge-red     { background: #fee2e2; color: #b91c1c; }
.badge-purple  { background: #f3e8ff; color: #7e22ce; }
.badge-pink    { background: #fce7f3; color: #be185d; }
.badge-gray    { background: #f3f4f6; color: #6b7280; }
.badge-indigo  { background: #e0e7ff; color: #4338ca; }

/* ── スクロールバー ──────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #d3d1cb; border-radius: 3px; }
