During the nine and a half days ending with Yom Kipur, we wish each other "גמר חתימה טובה" (an end to the good signing). This seems very strange. Shouldn't it be "גמר חתימה טוב" (a good end to the signing)?
I'm not sure, but I think that it's actually being pronounced "גמר חתימה-טובה". (The last two words are connected.)
And it is correct (grammatically) to say "חתימה טובה"....
To my opinion, the meaning is "I wish to you that the good-signing will end well for you".
I may be wrong, but that's what I have in mind when I'm telling people "גמר חתימה-טובה".