/* Notes — modern flat design */
.notes-app {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--space-bg-window, #fffef8);
}

[data-theme="dark"] .notes-app {
  background: var(--space-bg-window, #1c1c1e);
}

.notes-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  border-bottom: 1px solid var(--space-border-subtle, rgba(0,0,0,0.06));
}

.notes-title {
  font-weight: 600;
  font-size: 13px;
  color: var(--space-text-primary, #111827);
}

.notes-status {
  font-size: 11px;
  color: var(--space-text-tertiary, #9ca3af);
}

.notes-editor {
  flex: 1;
  width: 100%;
  border: none;
  resize: none;
  padding: 20px 22px;
  font: inherit;
  font-size: 15px;
  line-height: 1.6;
  background: transparent;
  color: var(--space-text-primary, #111827);
  letter-spacing: -0.01em;
}

.notes-editor:focus { outline: none; }

.notes-app-multi {
  flex-direction: row;
  background: var(--space-bg-window, #fff);
}

.notes-sidebar {
  width: var(--space-width-sidebar-narrow, 220px);
  flex-shrink: 0;
  border-right: 1px solid var(--space-border-subtle, rgba(0,0,0,0.06));
  display: flex;
  flex-direction: column;
  background: var(--space-bg-sidebar, rgba(245,245,247,0.95));
}

[data-theme="dark"] .notes-sidebar {
  background: var(--space-bg-sidebar, rgba(24,24,26,0.96));
}

.notes-sidebar-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--space-border-subtle, rgba(0,0,0,0.06));
  font-size: 13px;
  font-weight: 600;
  color: var(--space-text-primary, #111827);
}

.notes-search {
  margin: 10px 12px 6px;
  padding: 7px 12px;
  border: 1px solid var(--space-border-default, rgba(0,0,0,0.1));
  border-radius: var(--space-radius-md, 8px);
  font-size: 13px;
  background: var(--space-bg-card, #fff);
  color: var(--space-text-primary, #111827);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.notes-search:focus {
  border-color: var(--space-accent, #0066ff);
  box-shadow: 0 0 0 3px var(--space-accent-soft, rgba(0,102,255,0.1));
  outline: none;
}

[data-theme="dark"] .notes-search {
  background: var(--space-bg-input, #1c1c1e);
  border-color: var(--space-border-default, rgba(255,255,255,0.1));
}

.notes-empty {
  padding: 16px 14px;
  font-size: 13px;
  color: var(--space-text-tertiary, #9ca3af);
  list-style: none;
  text-align: center;
}

.notes-icon-btn {
  border: none;
  background: transparent;
  font-size: 16px;
  line-height: 1;
  cursor: default;
  padding: 5px 8px;
  border-radius: var(--space-radius-sm, 8px);
  color: var(--space-text-secondary, #6b7280);
  transition: background 0.1s ease;
}

.notes-icon-btn:hover {
  background: var(--space-bg-hover, rgba(0,0,0,0.04));
  color: var(--space-text-primary, #111827);
}

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

.notes-list-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 3px;
  width: 100%;
  padding: 10px 14px;
  border: none;
  background: transparent;
  text-align: left;
  cursor: default;
  color: inherit;
  transition: background 0.1s ease;
  border-radius: 0;
}

.notes-list-item:hover {
  background: var(--space-bg-hover, rgba(0,0,0,0.03));
}

.notes-list-item.active {
  background: var(--space-accent-soft, rgba(0,102,255,0.12));
}

.notes-list-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--space-text-primary, #111827);
}

.notes-list-preview {
  font-size: 12px;
  color: var(--space-text-secondary, #6b7280);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
  line-height: 1.4;
}

.notes-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 4px;
}

.notes-delete-btn {
  font-size: 15px;
  padding: 4px;
}

.notes-editor-pane {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--space-bg-window, #fffef8);
}

.notes-title-input {
  flex: 1;
  border: none;
  background: transparent;
  font-size: 18px;
  font-weight: 700;
  color: var(--space-text-primary, #111827);
  outline: none;
  letter-spacing: -0.02em;
  padding: 0;
}
