:root {
  --bg: #eef0f6;
  --surface: #ffffff;
  --surface-muted: #f6f7fb;
  --border: #e3e6ee;
  --text: #1c2130;
  --text-muted: #767e91;
  --text-faint: #a3aabb;
  --primary: #4f5fe0;
  --primary-dark: #3d4ac2;
  --primary-soft: #eef0fd;
  --success: #1f9d63;
  --success-soft: #e4f7ee;
  --danger: #e0455a;
  --danger-soft: #fdeaed;
  --radius-lg: 16px;
  --radius-md: 12px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 2px rgba(20, 24, 41, 0.05);
  --shadow-md: 0 6px 20px rgba(20, 24, 41, 0.07);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", "Hiragino Kaku Gothic ProN", "Yu Gothic", -apple-system, BlinkMacSystemFont, sans-serif;
  background:
    radial-gradient(circle at 15% -10%, rgba(79, 95, 224, 0.10), transparent 40%),
    radial-gradient(circle at 100% 0%, rgba(79, 95, 224, 0.06), transparent 35%),
    var(--bg);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 40px 20px 72px;
}

.app-header {
  margin-bottom: 28px;
}

.app-title {
  display: flex;
  align-items: center;
  gap: 14px;
}

.app-icon {
  font-size: 2rem;
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

h1 {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.app-subtitle {
  margin: 2px 0 0;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 32px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

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

.stat-icon {
  font-size: 1.4rem;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-soft);
  border-radius: 12px;
}

.stat-card-accent .stat-icon {
  background: #fdf0e0;
}

.stat-value {
  font-size: 1.7rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 3px;
}

.latest-review {
  background: linear-gradient(135deg, var(--primary) 0%, #6f5ce0 100%);
  border-radius: var(--radius-lg);
  padding: 18px 22px;
  margin-bottom: 24px;
  color: #fff;
  box-shadow: 0 6px 20px rgba(79, 95, 224, 0.25);
}

.latest-review-header {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.latest-review-week {
  margin-left: auto;
  font-size: 0.75rem;
  font-weight: 500;
  background: rgba(255, 255, 255, 0.18);
  padding: 3px 10px;
  border-radius: 999px;
}

.latest-review-comment {
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.6;
  white-space: pre-wrap;
  opacity: 0.95;
}

.columns {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 20px;
}

@media (max-width: 1000px) {
  .columns {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 720px) {
  .dashboard {
    grid-template-columns: 1fr;
  }
  .columns {
    grid-template-columns: 1fr;
  }
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 1.05rem;
  font-weight: 700;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

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

.form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 20px;
}

.form input,
.form textarea {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.9rem;
  font-family: inherit;
  color: var(--text);
  background: var(--surface-muted);
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form input::placeholder,
.form textarea::placeholder {
  color: var(--text-faint);
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--primary-soft);
}

.form button {
  align-self: flex-start;
  padding: 9px 18px;
  border: none;
  border-radius: var(--radius-sm);
  background: var(--primary);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 2px 8px rgba(79, 95, 224, 0.3);
  transition: background 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}

.form button:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 95, 224, 0.35);
}

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

.list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 460px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border) transparent;
}

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

.list::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: 3px;
}

.list-item {
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 12px 14px;
  transition: box-shadow 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}

.list-item:hover {
  box-shadow: var(--shadow-sm);
  border-color: #d3d7e4;
  transform: translateY(-1px);
}

.note-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.note-main {
  flex: 1;
  min-width: 0;
}

.item-title {
  font-weight: 600;
  font-size: 0.92rem;
  margin: 0 0 4px;
}

.item-body {
  white-space: pre-wrap;
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.5;
}

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

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

.task-item.completed {
  background: #f1f2f6;
}

.task-item.completed .task-text {
  text-decoration: line-through;
  color: var(--text-faint);
}

.task-main {
  flex: 1;
  min-width: 0;
}

.task-text {
  font-size: 0.9rem;
  font-weight: 500;
  margin: 0 0 4px;
  word-break: break-word;
}

.task-actions {
  display: flex;
  gap: 6px;
  flex-shrink: 0;
}

.btn-small {
  border: none;
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.72rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: filter 0.15s ease, transform 0.15s ease;
}

.btn-small:hover {
  filter: brightness(0.95);
  transform: translateY(-1px);
}

.btn-complete {
  background: var(--success-soft);
  color: var(--success);
}

.btn-delete {
  background: var(--danger-soft);
  color: var(--danger);
}

.empty {
  text-align: center;
  color: var(--text-faint);
  font-size: 0.85rem;
  padding: 28px 12px;
  border: 1px dashed var(--border);
  border-radius: var(--radius-md);
}
