#harmony-titlebar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 32px;
  z-index: 99999;
  display: flex;
  align-items: center;
  background: #1e1f22;
  -webkit-app-region: drag;
  user-select: none;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  border-bottom: 1px solid #0e0e10;
}

/* ── Left: logo + title ── */
#harmony-titlebar-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 12px;
  flex-shrink: 0;
  -webkit-app-region: drag;
}

#harmony-titlebar-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
}

#harmony-titlebar-title {
  font-size: 12px;
  font-weight: 600;
  color: #b5bac1;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Center: draggable spacer ── */
#harmony-titlebar-drag {
  flex: 1;
  height: 100%;
  -webkit-app-region: drag;
}

/* ── Right: window controls ── */
#harmony-titlebar-controls {
  display: flex;
  align-items: stretch;
  height: 100%;
  flex-shrink: 0;
  -webkit-app-region: no-drag;
}

.harmony-tb-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 100%;
  border: none;
  background: transparent;
  color: #b5bac1;
  cursor: pointer;
  padding: 0;
  outline: none;
  transition: background 0.08s ease;
  -webkit-app-region: no-drag;
}

.harmony-tb-btn:hover {
  background: #3b3d44;
}

.harmony-tb-btn:active {
  background: #4e5058;
}

.harmony-tb-btn svg {
  width: 16px;
  height: 16px;
}

/* Close button special styling */
#harmony-tb-close:hover {
  background: #da373c;
  color: #fff;
}

#harmony-tb-close:active {
  background: #c13135;
  color: #fff;
}

/* Maximize icon swap */
#harmony-tb-maximize .icon-restore {
  display: none;
}

#harmony-tb-maximize.is-maximized .icon-maximize {
  display: none;
}

#harmony-tb-maximize.is-maximized .icon-restore {
  display: block;
}
