// Tab functionality
      const tabButtons = document.querySelectorAll('.tab-button');
      const tabContents = document.querySelectorAll('.main-tab-content');

      function mainTabFocus(tabName) {
        if(tabName === 'logs') {
          resetLogCounter();
        }
        tabButtons.forEach(btn => btn.classList.remove('active'));
        tabContents.forEach(content => content.classList.remove('active'));

        document.getElementById(`${tabName}-tab-button`).classList.add('active');
        docu