body {
  margin: 0;
  font-family: sans-serif;
  background: #f0f0f0;
}

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

.sidebar {
  width: 250px;
  background: #333;
  color: white;
  padding: 20px;
  box-sizing: border-box;
  overflow-y: auto;
}

.sidebar h2 {
  margin-top: 0;
}

.sidebar button {
  width: 100%;
  padding: 10px;
  margin-bottom: 10px;
  background: #555;
  border: none;
  color: white;
  cursor: pointer;
  font-size: 14px;
  border-radius: 5px;
}

.sidebar ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 8px;
  border-bottom: 1px solid #444;
}

.sidebar li .note-title {
  flex: 1;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.sidebar li .delete-note {
  background: transparent;
  color: white;
  border: 1px solid #888;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  font-size: 16px;
  font-weight: bold;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  margin-right: 6px;
  padding: 0;
}

.sidebar li .delete-note:hover {
  background: #ff4d4d;
  color: white;
  border-color: #ff4d4d;
}

.editor {
  flex: 1;
  padding: 20px;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

#noteTitle {
  font-size: 20px;
  padding: 10px;
  margin-bottom: 10px;
  width: 100%;
  border: 1px solid #ccc;
  border-radius: 5px;
}

.toolbar {
  margin-bottom: 10px;
}

.toolbar button {
  padding: 6px 10px;
  margin-right: 5px;
  font-size: 14px;
  cursor: pointer;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #eee;
}

.toolbar select {
  padding: 6px 8px;
  margin-right: 5px;
  font-size: 14px;
  border-radius: 4px;
  border: 1px solid #ccc;
}

.editable {
  flex: 1;
  padding: 15px;
  background: white;
  border: 1px solid #ccc;
  border-radius: 5px;
  overflow-y: auto;
}

.status {
  margin-top: 10px;
  font-size: 12px;
  color: green;
  text-align: right;
}

table {
  border-collapse: collapse;
  margin-top: 10px;
}

table,
td,
th {
  border: 1px solid #aaa;
  padding: 5px;
}

table.editable-table td {
  position: relative;
  min-width: 100px;
  vertical-align: top;
}

.table-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  margin-top: 5px;
}

.table-controls button {
  font-size: 10px;
  padding: 2px 4px;
  border: 1px solid #aaa;
  border-radius: 3px;
  background: #eee;
  cursor: pointer;
}