.notes-board-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
}

.notes-search {
  flex: 1 1 160px;
  min-width: 140px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 7px;
  outline: none;
  background: var(--bg-input, #1e1f22);
  color: var(--text, #f2f3f5);
  font: inherit;
  font-size: 0.78rem;
}

.notes-search:focus {
  border-color: var(--focus, #5865f2);
}

.notes-board-count {
  color: var(--text-muted);
  font-size: 0.74rem;
}

.notes-board-toolbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.notes-sort {
  height: 34px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--bg-elevated, #2b2d31);
  color: var(--text, #f2f3f5);
  font: inherit;
  font-size: 0.74rem;
  font-weight: 600;
  cursor: pointer;
}

.notes-sort:hover {
  background: var(--bg-hover, #35373c);
}

.notes-board-body .notes-board-toolbar,
.admin-shared-panel .notes-board-toolbar {
  position: sticky;
  z-index: 5;
  top: 0;
  padding-bottom: 10px;
  background: #121419;
}

.notes-grid {
  position: relative;
  display: block;
  min-height: 240px;
}

.notes-grid .notes-empty,
.notes-grid .notes-search-empty {
  position: relative;
  z-index: 0;
  margin: 30px 0;
  color: var(--text-muted);
  font-size: 0.78rem;
  text-align: center;
}

.post-it-note[hidden] {
  display: none !important;
}

.post-it-note {
  position: absolute;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr);
  aspect-ratio: auto;
  min-width: 0;
  padding: 10px;
  border-radius: 3px 3px 10px 3px;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.28);
  color: #22242a;
  background: #f8e58b;
  transform: none;
}

.post-it-note.dragging {
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
  opacity: 0.96;
}

.post-it-note.resizing {
  user-select: none;
}

.post-it-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 4px 6px;
  cursor: grab;
  touch-action: none;
}

.post-it-note.dragging .post-it-header {
  cursor: grabbing;
}

.post-it-resize {
  position: absolute;
  z-index: 3;
  width: 14px;
  height: 14px;
  border-radius: 2px;
  background: rgba(34, 36, 42, 0.18);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.35);
  touch-action: none;
}

.post-it-resize-nw {
  top: -1px;
  left: -1px;
  cursor: nwse-resize;
}

.post-it-resize-ne {
  top: -1px;
  right: -1px;
  cursor: nesw-resize;
}

.post-it-resize-sw {
  bottom: -1px;
  left: -1px;
  cursor: nesw-resize;
}

.post-it-resize-se {
  right: -1px;
  bottom: -1px;
  cursor: nwse-resize;
}

.post-it-note .post-it-label,
.post-it-note input.post-it-label[type="text"] {
  width: 100%;
  min-width: 0;
  margin: 0;
  border: none !important;
  border-radius: 0;
  outline: none;
  padding: 0 2px 1px;
  background: transparent !important;
  box-shadow: none !important;
  color: #22242a !important;
  caret-color: #22242a;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1.2;
  -webkit-text-fill-color: #22242a;
}

.post-it-note .post-it-label::placeholder,
.post-it-note input.post-it-label[type="text"]::placeholder {
  color: rgba(34, 36, 42, 0.42);
  -webkit-text-fill-color: rgba(34, 36, 42, 0.42);
  font-weight: 600;
}

.post-it-note .post-it-label:focus,
.post-it-note input.post-it-label[type="text"]:focus {
  border: none !important;
  background: transparent !important;
  box-shadow: none !important;
}

.extra-tool-window.notes-board-window {
  width: min(880px, calc(100vw - 24px));
}

.admin-shared-panel .notes-grid {
  min-height: 280px;
}
