:root {
  --bg: #eef1f6;
  --bg-accent: #e4ebf7;
  --card-bg: #ffffff;
  --primary: #4f6ef7;
  --primary-dark: #3d57d6;
  --primary-soft: #eef1ff;
  --text: #1f2430;
  --muted: #7c8494;
  --border: #e6e9f0;
  --danger: #e0554f;
  --danger-soft: #fdecec;
  --success: #1e9e5a;
  --success-soft: #e6f7ee;
  --shadow-sm: 0 1px 2px rgba(20, 24, 40, 0.04);
  --shadow-md: 0 8px 24px rgba(31, 41, 66, 0.08);
  --shadow-lg: 0 16px 40px rgba(31, 41, 66, 0.12);
  --radius: 16px;
  --radius-sm: 10px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: -apple-system, "Hiragino Kaku Gothic ProN", "Yu Gothic", "Segoe UI", sans-serif;
  background: linear-gradient(160deg, var(--bg) 0%, var(--bg-accent) 100%);
  background-attachment: fixed;
  color: var(--text);
  -webkit-font-smoothing: antialiased;
}

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

.app-header {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 32px;
}

.app-header-icon {
  width: 52px;
  height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  background: var(--card-bg);
  border-radius: 14px;
  box-shadow: var(--shadow-md);
  flex-shrink: 0;
}

.app-header h1 {
  font-size: 26px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.01em;
}

.app-subtitle {
  margin: 4px 0 0;
  font-size: 13.5px;
  color: var(--muted);
}

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

.dashboard-highlight {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 18px 22px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: flex-start;
  gap: 14px;
  margin-bottom: 36px;
  border-left: 4px solid var(--primary);
}

.dashboard-highlight-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.dashboard-highlight-body {
  min-width: 0;
}

.dashboard-highlight-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary-dark);
  margin-bottom: 4px;
}

.dashboard-highlight-text {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.6;
  white-space: pre-wrap;
  word-break: break-word;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dashboard-card {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-md);
  display: flex;
  align-items: center;
  gap: 14px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

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

.dashboard-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}

.dashboard-icon-notes { background: #eef1ff; }
.dashboard-icon-tasks { background: var(--success-soft); }
.dashboard-icon-pending { background: #fff4e5; }
.dashboard-icon-incomplete { background: #fdecec; }

.dashboard-info {
  min-width: 0;
}

.dashboard-value {
  font-size: 28px;
  font-weight: 800;
  line-height: 1.1;
  color: var(--text);
  letter-spacing: -0.02em;
}

.dashboard-label {
  margin-top: 2px;
  font-size: 12.5px;
  color: var(--muted);
  font-weight: 500;
}

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

@media (max-width: 900px) {
  .dashboard {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 760px) {
  .columns {
    grid-template-columns: 1fr;
  }
  .dashboard {
    grid-template-columns: 1fr;
  }
  .app-header {
    align-items: flex-start;
  }
}

.panel {
  background: var(--card-bg);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: var(--shadow-md);
}

.panel h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 16px;
  font-size: 16.5px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.panel-icon {
  font-size: 16px;
}

.reflection-panel {
  margin-top: 24px;
}

.reflection-week-label {
  margin: -6px 0 14px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--muted);
}

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

.form input,
.form textarea {
  padding: 11px 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: #fbfcfe;
  resize: vertical;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.form input::placeholder,
.form textarea::placeholder {
  color: #a7adba;
}

.form input:focus,
.form textarea:focus {
  outline: none;
  border-color: var(--primary);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(79, 110, 247, 0.12);
}

.form button {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(79, 110, 247, 0.28);
  transition: background 0.15s ease, transform 0.1s ease, box-shadow 0.15s ease;
}

.btn-icon {
  font-size: 14px;
  line-height: 1;
}

.form button:hover {
  background: var(--primary-dark);
  box-shadow: 0 6px 16px rgba(79, 110, 247, 0.36);
}

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

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

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

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

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

.item:hover {
  border-color: #d7ddec;
  box-shadow: var(--shadow-sm);
}

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

.item-title {
  font-weight: 700;
  font-size: 14.5px;
  word-break: break-word;
}

.item-body {
  margin-top: 6px;
  font-size: 13.5px;
  line-height: 1.6;
  color: #4a5061;
  white-space: pre-wrap;
  word-break: break-word;
}

.item-meta {
  margin-top: 10px;
  font-size: 11.5px;
  color: var(--muted);
  display: flex;
  align-items: center;
  gap: 4px;
}

.item-meta::before {
  content: "🕒";
  font-size: 10.5px;
}

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

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

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

.task-text {
  font-size: 14px;
  font-weight: 500;
  word-break: break-word;
}

.task-text.completed {
  text-decoration: line-through;
  color: var(--muted);
  font-weight: 400;
}

.task-status {
  display: inline-block;
  margin-top: 8px;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  background: #fff4e5;
  color: #b76e00;
}

.task-status.completed {
  background: var(--success-soft);
  color: var(--success);
}

.delete-btn {
  border: none;
  background: transparent;
  color: var(--danger);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 10px;
  border-radius: 8px;
  flex-shrink: 0;
  transition: background 0.15s ease;
}

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

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