* {
  box-sizing: border-box;
}

html, body {
  height: 100%;
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: #1f2328;
  background: #f6f7f9;
}

.app {
  display: flex;
  height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 280px;
  min-width: 280px;
  background: #fff;
  border-right: 1px solid #e3e5e8;
  display: flex;
  flex-direction: column;
  padding: 16px;
}

.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.sidebar-header h1 {
  font-size: 18px;
  margin: 0;
}

#newNoteBtn {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  border: none;
  background: #2563eb;
  color: #fff;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
}

#newNoteBtn:hover {
  background: #1d4ed8;
}

#searchInput {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #d9dce1;
  border-radius: 8px;
  font-size: 14px;
  margin-bottom: 12px;
  outline: none;
}

#searchInput:focus {
  border-color: #2563eb;
}

.note-list {
  list-style: none;
  margin: 0;
  padding: 0;
  overflow-y: auto;
  flex: 1;
}

.note-list-item {
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  margin-bottom: 4px;
}

.note-list-item:hover {
  background: #f0f2f5;
}

.note-list-item.active {
  background: #e8edfd;
}

.note-list-item .note-title {
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.note-list-item .note-snippet {
  font-size: 12px;
  color: #6b7280;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.note-list-item .note-date {
  font-size: 11px;
  color: #9aa1ac;
  margin-top: 2px;
}

/* Editor */
.editor {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 32px 48px;
  overflow-y: auto;
}

.empty-state {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  color: #9aa1ac;
  font-size: 15px;
}

.editor-pane {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.editor-pane.hidden, .empty-state.hidden {
  display: none;
}

.title-input {
  font-size: 28px;
  font-weight: 700;
  border: none;
  outline: none;
  background: transparent;
  margin-bottom: 8px;
}

.editor-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

#lastEdited {
  font-size: 12px;
  color: #9aa1ac;
}

.delete-btn {
  border: none;
  background: none;
  color: #dc2626;
  font-size: 13px;
  cursor: pointer;
  padding: 4px 8px;
  border-radius: 6px;
}

.delete-btn:hover {
  background: #fee2e2;
}

.content-input {
  flex: 1;
  border: none;
  outline: none;
  resize: none;
  font-size: 16px;
  line-height: 1.6;
  background: transparent;
  font-family: inherit;
}
