* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Hiragino Sans", "Yu Gothic",
    sans-serif;
  background: #f4f6f8;
  color: #222;
}

.app-header {
  background: #2c3e50;
  color: #fff;
  padding: 16px 24px;
}
.app-header h1 {
  margin: 0;
  font-size: 22px;
}

/* ダッシュボード */
.dashboard {
  display: flex;
  gap: 16px;
  padding: 20px 24px;
  flex-wrap: wrap;
}
.stat-card {
  flex: 1 1 140px;
  background: #fff;
  border-radius: 10px;
  padding: 18px;
  text-align: center;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}
.stat-card.highlight {
  background: #fdecea;
}
.stat-num {
  font-size: 34px;
  font-weight: 700;
  color: #2c3e50;
}
.stat-label {
  margin-top: 4px;
  font-size: 13px;
  color: #666;
}

/* 最新の振り返り（ダッシュボード） */
.latest-reflection {
  margin: 0 24px 20px;
  background: #fff8e6;
  border: 1px solid #f5e2b8;
  border-radius: 10px;
  padding: 16px 20px;
}
.lr-head {
  font-size: 13px;
  font-weight: 700;
  color: #b8860b;
  margin-bottom: 6px;
}
.lr-body {
  font-size: 14px;
  color: #555;
}
.lr-week {
  display: inline-block;
  font-weight: 700;
  color: #2c3e50;
  margin-right: 10px;
}
.lr-comment {
  white-space: pre-wrap;
}

/* メインレイアウト */
.grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
  padding: 0 24px 40px;
}
@media (max-width: 720px) {
  .grid {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: #fff;
  border-radius: 10px;
  padding: 20px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

/* 週次の振り返りパネル（横幅いっぱい） */
.reflection-panel {
  margin: 0 24px 40px;
}
.reflection-week {
  margin: 0 0 10px;
  font-size: 13px;
  color: #888;
}
.reflection-week-label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 13px;
  color: #666;
}
.reflection-week-label select {
  padding: 10px;
  border: 1px solid #ccd3da;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
  color: #222;
  max-width: 320px;
}
.panel h2 {
  font-size: 16px;
  margin: 0 0 12px;
  padding-bottom: 6px;
  border-bottom: 2px solid #eef1f4;
}
.panel h2:not(:first-child) {
  margin-top: 24px;
}

/* フォーム */
.form {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.form input,
.form textarea {
  padding: 10px;
  border: 1px solid #ccd3da;
  border-radius: 6px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
}
.form button {
  align-self: flex-end;
  background: #3498db;
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 6px;
  font-size: 14px;
  cursor: pointer;
}
.form button:hover {
  background: #2c82c9;
}

/* リスト */
.list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.list li {
  border: 1px solid #eef1f4;
  border-radius: 8px;
  padding: 12px;
  margin-bottom: 10px;
}
.item-title {
  font-weight: 600;
  margin-bottom: 4px;
}
.item-body {
  white-space: pre-wrap;
  font-size: 14px;
  color: #444;
}
.item-meta {
  font-size: 12px;
  color: #888;
  margin-top: 6px;
}
.empty {
  color: #999;
  font-size: 14px;
  padding: 8px 0;
}

/* タスク行 */
.task-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.task-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}
.task-main {
  flex: 1;
}
.task-done .item-title {
  text-decoration: line-through;
  color: #aaa;
}
.badge {
  display: inline-block;
  font-size: 11px;
  padding: 2px 8px;
  border-radius: 10px;
  margin-left: 6px;
}
.badge.open {
  background: #fdecea;
  color: #c0392b;
}
.badge.done {
  background: #e6f6ec;
  color: #1e8449;
}

.btn-delete {
  background: none;
  border: none;
  color: #c0392b;
  cursor: pointer;
  font-size: 13px;
}
.btn-delete:hover {
  text-decoration: underline;
}
