.notes-toolbar {
  display: grid;
  gap: 16px;
  margin: 32px 0 28px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.search-box {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 12px 0 15px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--bg);
  color: var(--text-faint);
  font-size: 17px;
  cursor: text;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-box:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.search-box input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 15px;
  -webkit-appearance: none;
  appearance: none;
}

.search-box input::placeholder {
  color: var(--text-faint);
}

.search-box input::-webkit-search-cancel-button {
  -webkit-appearance: none;
}

.search-box:focus-within kbd {
  visibility: hidden;
}

.filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 36px;
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text-muted);
  font-size: 14px;
  transition: color 0.15s, border-color 0.15s, background-color 0.15s;
}

.filter-chip .icon {
  color: var(--tint, currentColor);
  font-size: 15px;
}

.filter-chip:hover {
  border-color: var(--border-strong);
  color: var(--text);
}

.filter-chip.is-active {
  border-color: var(--text);
  background: var(--text);
  color: var(--bg);
}

.filter-chip.is-active .icon {
  color: inherit;
}

.filter-chip .count {
  opacity: 0.6;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

.tag-filter {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding-top: 16px;
  border-top: 1px dashed var(--border);
}

.tag-filter-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-right: 4px;
  color: var(--text-faint);
  font-size: 13px;
}

.tag-filter .tag-chip {
  height: 28px;
  font-size: 12.5px;
}

.result-count {
  margin-bottom: 16px;
  color: var(--text-muted);
  font-size: 14px;
}

.result-count strong {
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.empty-state {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 64px 24px;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-muted);
  text-align: center;
}

.empty-icon {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 6px;
  border-radius: 14px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 22px;
}

.empty-title {
  color: var(--text);
  font-size: 17px;
  font-weight: 600;
}

.empty-state .button {
  margin-top: 12px;
}

@media (max-width: 640px) {
  .notes-toolbar {
    margin-top: 24px;
    padding: 14px;
  }

  .search-box kbd {
    display: none;
  }
}
