/* ===== 洗練されたカラフルな秘書アプリ ===== */

:root {
  --c-pink: #ec4899;
  --c-purple: #8b5cf6;
  --c-blue: #3b82f6;
  --c-cyan: #06b6d4;
  --c-green: #10b981;
  --c-amber: #f59e0b;
  --c-red: #ef4444;
  --ink: #1f2233;
  --ink-soft: #6b7280;
  --bg: #f7f8fc;
  --card: #ffffff;
  --line: #eef0f6;
  --shadow: 0 10px 30px rgba(30, 34, 70, 0.08);
  --shadow-hover: 0 16px 40px rgba(30, 34, 70, 0.14);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Meiryo", sans-serif;
  color: var(--ink);
  padding-bottom: 60px;
  background:
    radial-gradient(1200px 500px at 10% -10%, rgba(139, 92, 246, 0.10), transparent 60%),
    radial-gradient(1000px 500px at 100% 0%, rgba(6, 182, 212, 0.10), transparent 55%),
    var(--bg);
  min-height: 100vh;
}

/* ===== ヘッダー ===== */
.app-header {
  position: relative;
  color: #fff;
  padding: 40px 20px 44px;
  text-align: center;
  overflow: hidden;
  background: linear-gradient(120deg, #6366f1 0%, #8b5cf6 35%, #ec4899 70%, #f59e0b 110%);
}

.app-header::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 200px at 50% -40%, rgba(255, 255, 255, 0.35), transparent 70%);
  pointer-events: none;
}

.app-header h1 {
  margin: 0;
  font-size: 30px;
  font-weight: 800;
  letter-spacing: 0.5px;
  text-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
}

.subtitle {
  margin: 8px 0 0;
  opacity: 0.95;
  font-size: 14px;
  font-weight: 500;
}

/* ===== ダッシュボード ===== */
.dashboard {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 960px;
  margin: -32px auto 34px;
  padding: 0 18px;
}

.stat-card {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 26px;
  text-align: center;
  min-width: 170px;
  flex: 1;
  overflow: hidden;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stat-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-hover);
}

/* 上部のカラーバー */
.stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
}

.stat-card:nth-child(1)::before {
  background: linear-gradient(90deg, var(--c-purple), var(--c-blue));
}
.stat-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--c-cyan), var(--c-green));
}
.stat-card:nth-child(3)::before {
  background: linear-gradient(90deg, var(--c-amber), var(--c-red));
}

.stat-num {
  font-size: 40px;
  font-weight: 800;
  line-height: 1;
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.stat-card:nth-child(1) .stat-num {
  background-image: linear-gradient(90deg, var(--c-purple), var(--c-blue));
}
.stat-card:nth-child(2) .stat-num {
  background-image: linear-gradient(90deg, var(--c-cyan), var(--c-green));
}
.stat-card:nth-child(3) .stat-num {
  background-image: linear-gradient(90deg, var(--c-amber), var(--c-red));
}

/* ★完了タスク件数（4枚目）: 緑〜シアン */
#stat-done {
  background-image: linear-gradient(90deg, var(--c-green), var(--c-cyan));
}

/* 振り返りの件数（5枚目）: 赤 */
#stat-reviews {
  background: none;
  background-image: none;
  -webkit-text-fill-color: var(--c-red);
  color: var(--c-red);
}

.stat-label {
  margin-top: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-soft);
}

/* ===== 最新の振り返りバナー ===== */
.latest-review {
  display: flex;
  align-items: center;
  gap: 18px;
  max-width: 960px;
  margin: 0 auto 34px;
  padding: 20px 26px;
  border-radius: var(--radius);
  color: #fff;
  box-shadow: 0 12px 30px rgba(236, 72, 153, 0.25);
  background: linear-gradient(120deg, #f472b6 0%, #a855f7 55%, #6366f1 110%);
}

.latest-review .lr-icon {
  font-size: 34px;
  flex-shrink: 0;
  filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.2));
}

.latest-review .lr-heading {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 1px;
  text-transform: uppercase;
  opacity: 0.9;
  margin-bottom: 4px;
}

.latest-review .lr-content {
  font-size: 15px;
  line-height: 1.5;
}

.latest-review .lr-week {
  display: inline-block;
  font-weight: 800;
  background: rgba(255, 255, 255, 0.25);
  padding: 2px 12px;
  border-radius: 999px;
  margin-right: 10px;
  font-size: 13px;
}

.latest-review .lr-text {
  font-weight: 500;
}

.latest-review .lr-date {
  display: block;
  margin-top: 6px;
  font-size: 12px;
  opacity: 0.85;
}

/* ===== 週次の振り返りセクション ===== */
.review-section {
  max-width: 960px;
  margin: 24px auto 0;
  padding: 0 18px;
}

.review-section .panel {
  --accent: var(--c-pink);
  --accent2: var(--c-purple);
}

.review-section .add-form input:focus,
.review-section .add-form textarea:focus {
  box-shadow: 0 0 0 4px rgba(236, 72, 153, 0.14);
}

.review-item {
  border: 1px solid var(--line);
  border-left: 5px solid var(--c-pink);
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(236, 72, 153, 0.05), transparent 40%);
  transition: transform 0.15s, box-shadow 0.15s;
}

.review-item:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow);
}

.review-item .review-week {
  font-weight: 800;
  font-size: 14px;
  color: var(--c-purple);
  margin-bottom: 6px;
}

.review-item .review-comment {
  font-size: 14.5px;
  white-space: pre-wrap;
  color: #3d4256;
  line-height: 1.6;
}

/* ===== 2カラム ===== */
.columns {
  display: flex;
  gap: 22px;
  max-width: 960px;
  margin: 0 auto;
  padding: 0 18px;
  flex-wrap: wrap;
  align-items: flex-start;
}

.panel {
  position: relative;
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 24px;
  flex: 1;
  min-width: 320px;
}

.panel h2 {
  margin: 0 0 18px;
  font-size: 19px;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 8px;
}

/* パネルごとのアクセント色 */
.panel:nth-child(1) {
  --accent: var(--c-purple);
  --accent2: var(--c-blue);
}
.panel:nth-child(2) {
  --accent: var(--c-cyan);
  --accent2: var(--c-green);
}

/* ===== 追加フォーム ===== */
.add-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 22px;
}

.add-form input,
.add-form textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  font-size: 14px;
  font-family: inherit;
  resize: vertical;
  background: #fbfbfe;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.add-form input:focus,
.add-form textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.12);
}

.panel:nth-child(2) .add-form input:focus,
.panel:nth-child(2) .add-form textarea:focus {
  box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.14);
}

.add-form button {
  color: #fff;
  border: none;
  border-radius: 12px;
  padding: 12px;
  font-size: 14.5px;
  font-weight: 700;
  cursor: pointer;
  letter-spacing: 0.3px;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.28);
  transition: transform 0.14s, box-shadow 0.14s, filter 0.14s;
}

.add-form button:hover {
  transform: translateY(-2px);
  filter: brightness(1.05);
  box-shadow: 0 10px 22px rgba(99, 102, 241, 0.34);
}

.add-form button:active {
  transform: translateY(0);
}

/* ===== 一覧 ===== */
.item-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.note-item {
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 14px;
  padding: 14px 16px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.05), transparent 40%);
  transition: transform 0.15s, box-shadow 0.15s;
}

.note-item:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow);
}

.note-item .note-title {
  font-weight: 700;
  font-size: 15.5px;
  margin-bottom: 5px;
}

.note-item .note-body {
  font-size: 14px;
  white-space: pre-wrap;
  color: #3d4256;
  line-height: 1.6;
}

.note-item .meta,
.task-item .meta {
  margin-top: 10px;
  font-size: 12px;
  color: #9aa1b2;
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  background: #fff;
  transition: transform 0.15s, box-shadow 0.15s;
}

.task-item:hover {
  transform: translateX(3px);
  box-shadow: var(--shadow);
}

.task-item.done {
  background: linear-gradient(90deg, rgba(16, 185, 129, 0.08), transparent 45%);
}

.task-item input[type="checkbox"] {
  width: 20px;
  height: 20px;
  margin-top: 2px;
  cursor: pointer;
  flex-shrink: 0;
  accent-color: var(--c-green);
}

.task-item .task-main {
  flex: 1;
}

.task-item .task-text {
  font-size: 15px;
  font-weight: 500;
}

.task-item.done .task-text {
  text-decoration: line-through;
  color: #b6bccb;
}

.task-item .badge {
  display: inline-block;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-left: 8px;
  vertical-align: middle;
}

.badge.open {
  background: #fff4e0;
  color: #d97706;
}

.badge.done {
  background: #e3f9ef;
  color: #059669;
}

.task-item .del-btn {
  background: none;
  border: none;
  color: #c0c6d4;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 4px 7px;
  border-radius: 9px;
  flex-shrink: 0;
  transition: background 0.15s, color 0.15s;
}

.task-item .del-btn:hover {
  background: #ffe9e9;
  color: var(--c-red);
}

.empty {
  color: #b6bccb;
  font-size: 14px;
  text-align: center;
  padding: 22px 0;
}

/* ===== レスポンシブ ===== */
@media (max-width: 640px) {
  .app-header h1 {
    font-size: 24px;
  }
  .stat-num {
    font-size: 32px;
  }
}
