.notes-section {
  display: grid;
  min-width: 0;
  gap: var(--space-3);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  padding: var(--space-4);
}

.notes-heading {
  margin: 0;
  color: var(--color-text-primary);
  font-size: var(--font-size-lg);
}

.notes-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(150px, 210px);
  gap: var(--space-3);
}

.notes-composer,
.notes-field {
  display: grid;
  min-width: 0;
  gap: var(--space-2);
}

.notes-field {
  color: var(--color-text-primary);
  font-size: var(--font-size-sm);
  font-weight: var(--font-weight-semibold);
}

.notes-textarea {
  min-height: 5.5rem;
  resize: vertical;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.notes-form-actions,
.note-actions,
.notes-pagination {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
}

.notes-form-actions {
  justify-content: flex-end;
}

.notes-form-error {
  flex: 1 1 100%;
  color: var(--color-danger);
  font-size: var(--font-size-sm);
}

.notes-status {
  margin: 0;
  color: var(--color-text-muted);
}

.notes-status[data-state="error"],
.notes-form-error:not(:empty) {
  color: var(--color-danger);
}

.notes-status[data-state="success"] {
  color: var(--color-success);
}

.notes-list {
  display: grid;
  min-width: 0;
  gap: var(--space-3);
}

.note-card {
  display: grid;
  min-width: 0;
  gap: var(--space-2);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  background: var(--color-surface-elevated);
  padding: var(--space-3);
}

.note-body {
  min-width: 0;
  margin: 0;
  color: var(--color-text-primary);
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.note-meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  margin: 0;
  color: var(--color-text-muted);
  font-size: var(--font-size-sm);
}

.note-actions {
  justify-content: flex-end;
}

.notes-pagination {
  justify-content: space-between;
}

@media (max-width: 767px) {
  .notes-section {
    padding: var(--space-3);
  }

  .notes-toolbar {
    grid-template-columns: minmax(0, 1fr);
  }

  .note-actions > .button,
  .notes-pagination > .button {
    flex: 1 1 auto;
  }
}
