* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}
body {
  font-family: system-ui, sans-serif;
  background: #f3f4f6;
  min-height: 100vh;
  padding: 1rem;
}
.notes-app {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 1rem;
  max-width: 1100px;
  margin: 0 auto;
  height: calc(100vh - 2rem);
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
}
.sidebar {
  background: #f9fafb;
  border-right: 1px solid #e5e7eb;
  padding: 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  overflow: hidden;
}
.sidebar button {
  padding: 0.6rem;
  background: #4f46e5;
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
#searchInput {
  padding: 0.5rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
}
#noteList {
  list-style: none;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  flex: 1;
}
#noteList li {
  padding: 0.6rem;
  background: #fff;
  border-radius: 6px;
  cursor: pointer;
  border: 1px solid transparent;
}
#noteList li.active {
  border-color: #4f46e5;
  background: #eef2ff;
}
#noteList li strong {
  display: block;
  font-size: 0.9rem;
}
#noteList li small {
  color: #6b7280;
  font-size: 0.75rem;
}
.editor {
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
#titleInput {
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  font-size: 1.1rem;
  font-weight: 600;
}
#bodyInput {
  flex: 1;
  padding: 0.75rem;
  border: 1px solid #d1d5db;
  border-radius: 8px;
  resize: none;
  font-family: inherit;
}
.editor-actions {
  display: flex;
  gap: 0.5rem;
}
.editor-actions button {
  padding: 0.6rem 1.25rem;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 600;
}
#saveBtn {
  background: #10b981;
  color: #fff;
}
#deleteBtn {
  background: #ef4444;
  color: #fff;
}
@media (max-width: 700px) {
  .notes-app {
    grid-template-columns: 1fr;
    height: auto;
  }
}