/* css/notes.css */
.note-wrap {
  margin-top: 56px; padding: 24px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  scroll-margin-top: 24px;
}
.note-header {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 12px; margin-bottom: 16px;
}
.note-title { font-size: 19px; font-weight: 600; }
.note-header-right { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.note-tabs { display: flex; gap: 10px; flex-wrap: wrap; }
.note-tab {
  padding: 8px 16px; border-radius: 100px;
  border: 1px solid var(--card-border);
  background: transparent;
  color: var(--text-secondary);
  font-size: 14px; font-family: inherit;
  cursor: pointer; transition: var(--transition);
}
.note-tab:hover:not(.active) { background: var(--card-hover); color: var(--text-primary); }
.note-tab.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: transparent; color: #fff;
}
.note-mode-tabs {
  display: inline-flex; gap: 3px;
  padding: 3px;
  border-radius: 100px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
}
.note-mode-btn {
  padding: 5px 14px;
  border-radius: 100px;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px; font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
}
.note-mode-btn.active {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff;
}

#noteTextarea {
  width: 100%; min-height: 240px; padding: 16px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px; font-family: inherit; line-height: 1.7;
  resize: vertical; outline: none;
  transition: var(--transition);
}
#noteTextarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
#noteTextarea::placeholder { color: var(--text-muted); }

.md-preview {
  min-height: 240px;
  max-height: 560px;
  overflow-y: auto;
  padding: 16px 18px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 12px;
  color: var(--text-primary);
  font-size: 15px;
  line-height: 1.75;
}
.md-preview h1, .md-preview h2, .md-preview h3 {
  margin: 14px 0 8px;
  font-weight: 600;
  line-height: 1.3;
}
.md-preview h1 { font-size: 22px; }
.md-preview h2 { font-size: 18px; }
.md-preview h3 { font-size: 16px; }
.md-preview h1:first-child, .md-preview h2:first-child, .md-preview h3:first-child { margin-top: 0; }
.md-preview p { margin: 6px 0; }
.md-preview ul { margin: 6px 0 6px 22px; }
.md-preview li { margin: 3px 0; }
.md-preview code {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(129, 140, 248, 0.15);
  font-family: "SF Mono", Menlo, Consolas, monospace;
  font-size: 13px;
}
.md-preview pre {
  padding: 12px 14px;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.25);
  overflow-x: auto;
  margin: 8px 0;
}
html[data-theme="light"] .md-preview pre { background: rgba(15, 23, 42, 0.06); }
.md-preview pre code { padding: 0; background: transparent; font-size: 13px; }
.md-preview a { color: var(--accent); text-decoration: underline; }
.md-preview strong { font-weight: 600; }
.md-preview em { font-style: italic; }
.md-preview blockquote {
  margin: 8px 0;
  padding: 8px 14px;
  border-left: 3px solid var(--accent);
  background: rgba(129, 140, 248, 0.08);
  border-radius: 4px;
  color: var(--text-secondary);
}
.md-preview .md-empty { color: var(--text-muted); text-align: center; padding: 40px 0; }

/* 待办 */
.todo-input-row {
  display: flex; flex-wrap: wrap;
  gap: 8px; margin-bottom: 14px;
}
.todo-input {
  flex: 1 1 200px; min-width: 0; padding: 12px 14px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px; font-family: inherit;
  outline: none; transition: var(--transition);
}
.todo-input::placeholder { color: var(--text-muted); }
.todo-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.todo-priority, .todo-date, .todo-group {
  padding: 12px 10px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 13px; font-family: inherit;
  outline: none; transition: var(--transition);
  min-width: 0;
}
.todo-priority { width: 84px; }
.todo-date { width: 140px; }
.todo-group { width: 100px; }
.todo-priority:focus, .todo-date:focus, .todo-group:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-glow);
}
.todo-add {
  padding: 12px 20px; border-radius: 10px;
  border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 14px; font-family: inherit;
  cursor: pointer; transition: var(--transition);
  white-space: nowrap;
}
.todo-add:hover { box-shadow: 0 4px 16px var(--accent-glow); }
.todo-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 400px; overflow-y: auto;
}
.todo-item {
  display: flex; align-items: flex-start; gap: 10px;
  padding: 10px 12px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  transition: var(--transition);
}
.todo-item.priority-high { border-left: 3px solid #ef4444; }
.todo-item.priority-mid { border-left: 3px solid #f59e0b; }
.todo-item.priority-low { border-left: 3px solid #10b981; }
.todo-item label {
  display: flex; align-items: flex-start; gap: 10px;
  flex: 1; min-width: 0; cursor: pointer;
}
.todo-item input[type="checkbox"] {
  width: 16px; height: 16px; flex-shrink: 0;
  margin-top: 3px;
  accent-color: var(--accent); cursor: pointer;
}
.todo-content { flex: 1; min-width: 0; }
.todo-text { font-size: 14px; line-height: 1.5; word-break: break-word; }
.todo-item.done .todo-text { text-decoration: line-through; color: var(--text-muted); }
.todo-meta { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.todo-badge {
  display: inline-flex; align-items: center; gap: 3px;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  background: var(--card-bg);
  border: 1px solid var(--card-border);
  color: var(--text-secondary);
  white-space: nowrap;
}
.todo-badge.priority-high { background: rgba(239, 68, 68, 0.15); color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }
.todo-badge.priority-mid { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }
.todo-badge.priority-low { background: rgba(16, 185, 129, 0.15); color: #10b981; border-color: rgba(16, 185, 129, 0.3); }
.todo-badge.due.overdue { background: rgba(239, 68, 68, 0.15); color: #ef4444; border-color: rgba(239, 68, 68, 0.3); }
.todo-badge.due.due-today { background: rgba(245, 158, 11, 0.15); color: #f59e0b; border-color: rgba(245, 158, 11, 0.3); }
.todo-badge.group { color: var(--accent); border-color: rgba(129, 140, 248, 0.35); background: rgba(129, 140, 248, 0.1); }
.todo-del {
  flex-shrink: 0; padding: 2px 8px;
  border: none; border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-size: 18px; line-height: 1; cursor: pointer;
  transition: var(--transition);
}
.todo-del:hover { color: #f87171; background: rgba(248, 113, 113, 0.12); }
.todo-empty { padding: 28px 0; text-align: center; font-size: 13px; color: var(--text-muted); }

/* 灵感便签 */
.flash-input-row { display: flex; gap: 8px; margin-bottom: 14px; }
.flash-input {
  flex: 1; padding: 12px 14px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  color: var(--text-primary);
  font-size: 14px; font-family: inherit;
  outline: none; transition: var(--transition);
}
.flash-input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-glow); }
.flash-add {
  padding: 12px 20px; border-radius: 10px; border: none;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #fff; font-size: 14px; cursor: pointer;
}
.flash-list {
  list-style: none;
  display: flex; flex-direction: column; gap: 8px;
  max-height: 320px; overflow-y: auto;
}
.flash-item {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 14px;
  background: var(--input-bg);
  border: 1px solid var(--card-border);
  border-radius: 10px;
  transition: var(--transition);
}
.flash-item:hover { border-color: rgba(129, 140, 248, 0.3); }
.flash-text { flex: 1; font-size: 14px; word-break: break-word; cursor: pointer; }
.flash-del {
  padding: 2px 8px; border: none; border-radius: 6px;
  background: transparent; color: var(--text-muted);
  font-size: 18px; cursor: pointer; line-height: 1;
}
.flash-del:hover { color: var(--danger); background: rgba(248, 113, 113, 0.1); }

.note-footer {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: space-between;
  gap: 12px; margin-top: 16px;
}
.note-hint {
  flex: 1; min-width: 220px;
  font-size: 12px; line-height: 1.6; color: var(--text-muted);
}
.note-actions {
  display: flex; flex-wrap: wrap;
  align-items: center; gap: 8px;
}