* {
  box-sizing: border-box;
}

:root {
  --bg: #eef1f8;
  --ink: #1f2430;
  --muted: #6b7280;
  --card: #ffffff;
  --border: #e7e9f0;
  --primary: #6366f1;
  --primary-dark: #4338ca;
  --blue: #3b82f6;
  --purple: #8b5cf6;
  --pink: #ec4899;
  --shadow: 0 4px 20px rgba(30, 41, 59, 0.06);
  --shadow-hover: 0 10px 28px rgba(30, 41, 59, 0.12);
}

body {
  margin: 0;
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic", "Meiryo", sans-serif;
  background: var(--bg);
  color: var(--ink);
  position: relative;
  min-height: 100vh;
}

.bg-glow {
  position: fixed;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(600px circle at 10% -10%, rgba(99, 102, 241, 0.18), transparent 60%),
    radial-gradient(500px circle at 100% 0%, rgba(236, 72, 153, 0.14), transparent 55%);
  pointer-events: none;
}

header {
  background: linear-gradient(120deg, #4338ca 0%, #6366f1 55%, #8b5cf6 100%);
  color: #fff;
  padding: 28px 24px;
  box-shadow: 0 6px 24px rgba(67, 56, 202, 0.25);
}

.header-inner {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-badge {
  font-size: 1.8rem;
  background: rgba(255, 255, 255, 0.18);
  border-radius: 14px;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
}

header h1 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: 0.02em;
}

.tagline {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.85);
}

main {
  max-width: 1000px;
  margin: 0 auto;
  padding: 28px 20px 60px;
}

.dashboard {
  display: flex;
  gap: 16px;
  margin-bottom: 28px;
  flex-wrap: wrap;
}

.stat-card {
  flex: 1;
  min-width: 200px;
  background: var(--card);
  border-radius: 16px;
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  border-top: 3px solid transparent;
}

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

.stat-card.accent-blue { border-top-color: var(--blue); }
.stat-card.accent-purple { border-top-color: var(--purple); }
.stat-card.accent-pink { border-top-color: var(--pink); }

.stat-icon {
  font-size: 1.6rem;
  width: 46px;
  height: 46px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #f1f2fb;
  flex-shrink: 0;
}

.accent-blue .stat-icon { background: rgba(59, 130, 246, 0.12); }
.accent-purple .stat-icon { background: rgba(139, 92, 246, 0.12); }
.accent-pink .stat-icon { background: rgba(236, 72, 153, 0.12); }

.stat-label {
  font-size: 0.8rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.stat-value {
  font-size: 1.9rem;
  font-weight: 700;
  color: var(--ink);
  line-height: 1;
}

.latest-retro {
  background: linear-gradient(120deg, #fdf2f8 0%, #eef2ff 100%);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 18px 22px;
  margin-bottom: 28px;
  box-shadow: var(--shadow);
}

.latest-retro-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}

.latest-retro-week {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
}

.latest-retro-comment {
  font-size: 0.92rem;
  color: #4b5563;
  line-height: 1.6;
  white-space: pre-wrap;
  padding-left: 60px;
}

.field-label {
  font-size: 0.78rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: -4px;
}

.columns {
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
}

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

.panel h2 {
  margin: 0 0 16px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
}

.panel-icon {
  font-size: 1.1rem;
}

.add-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 18px;
  padding-bottom: 18px;
  border-bottom: 1px dashed var(--border);
}

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

.add-form input:focus,
.add-form textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.15);
  background: #fff;
}

.add-form button {
  align-self: flex-start;
  padding: 9px 20px;
  background: linear-gradient(120deg, var(--primary) 0%, var(--primary-dark) 100%);
  color: #fff;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.add-form button:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(99, 102, 241, 0.4);
}

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

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 480px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 14px;
  background: #fbfbfe;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.item:hover {
  border-color: rgba(99, 102, 241, 0.35);
  background: #fff;
}

.item-title {
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--ink);
}

.item-body {
  font-size: 0.88rem;
  color: #4b5563;
  white-space: pre-wrap;
  margin-bottom: 6px;
  line-height: 1.5;
}

.item-meta {
  font-size: 0.72rem;
  color: var(--muted);
}

.task-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.task-check {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
  flex-shrink: 0;
}

.task-item.done {
  background: #f5f5fa;
}

.task-item.done .task-title {
  text-decoration: line-through;
  color: #9ca3af;
}

.task-main {
  flex: 1;
}

.task-title {
  font-weight: 600;
}

.task-delete {
  background: none;
  border: none;
  color: #ef4444;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  transition: background 0.15s ease;
  align-self: flex-start;
}

.task-delete:hover {
  background: rgba(239, 68, 68, 0.1);
}

.empty {
  color: var(--muted);
  font-size: 0.9rem;
  padding: 12px 0;
  text-align: center;
}

.list::-webkit-scrollbar {
  width: 8px;
}

.list::-webkit-scrollbar-thumb {
  background: #d8dae8;
  border-radius: 8px;
}
