(function () {
if (document.getElementById('ec-nav-bar')) return;
// Fieldops pages have Home/Sign Out built into their headers — skip the float
if (window.location.pathname.indexOf('/field') === 0) return;
var bar = document.createElement('div');
bar.id = 'ec-nav-bar';
bar.style.cssText = [
'position:fixed',
'bottom:60px',
'left:20px',
'z-index:99999',
'display:flex',
'align-items:center',
'background:#0F1F3D',
'border-radius:20px',
'box-shadow:0 4px 18px rgba(0,0,0,0.4)',
'border:1px solid rgba(42,143,171,0.5)',
'overflow:hidden',
'opacity:0.92',
'transition:opacity 0.15s',
].join(';');
var homeBtn = document.createElement('a');
homeBtn.href = '/home';
homeBtn.title = 'Back to NetOps Home';
homeBtn.innerHTML =
'' +
'Home';
homeBtn.style.cssText = [
'display:flex',
'align-items:center',
'gap:6px',
'color:#fff',
'text-decoration:none',
'padding:8px 14px',
'font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif',
'font-size:12px',
'font-weight:600',
'transition:background 0.15s',
].join(';');
var divider = document.createElement('div');
divider.style.cssText = 'width:1px;height:16px;background:rgba(255,255,255,0.18);flex-shrink:0';
var logoutBtn = document.createElement('a');
logoutBtn.href = '/auth/logout';
logoutBtn.title = 'Sign out';
logoutBtn.innerHTML =
'' +
'Sign Out';
logoutBtn.style.cssText = [
'display:flex',
'align-items:center',
'gap:6px',
'color:rgba(255,255,255,0.72)',
'text-decoration:none',
'padding:8px 14px',
'font-family:-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif',
'font-size:12px',
'font-weight:600',
'transition:background 0.15s,color 0.15s',
].join(';');
homeBtn.onmouseover = function () { this.style.background = '#1A6E8A'; };
homeBtn.onmouseout = function () { this.style.background = ''; };
logoutBtn.onmouseover = function () { this.style.background = 'rgba(200,50,50,0.3)'; this.style.color = '#fff'; };
logoutBtn.onmouseout = function () { this.style.background = ''; this.style.color = 'rgba(255,255,255,0.72)'; };
bar.onmouseover = function () { bar.style.opacity = '1'; };
bar.onmouseout = function () { bar.style.opacity = '0.92'; };
bar.appendChild(homeBtn);
bar.appendChild(divider);
bar.appendChild(logoutBtn);
document.body.appendChild(bar);
})();