/*
 * nav.css  —  Two-row glassmorphism navigation
 * Row 1: Logo + Controls  |  Row 2: Full-width tab strip with sliding indicator
 */

/* ── Shell ─────────────────────────────── */
/* top: var(--banner-h) reserves room for the site-wide #wip-banner above.
   Banner defaults to 28px; set --banner-h: 0 in animations.css to remove
   the offset everywhere at once. */
#main-nav {
  position: fixed;
  top: var(--banner-h, 0px); left: 0; right: 0;
  height: var(--nav-h);
  background: rgba(8, 13, 30, 0.72);
  /* Always-on, full-width, fixed — re-blurs the moving background every frame.
     The bg is already 72% opaque so the blur-through is subtle; 18px reads the
     same as 32px here but is markedly cheaper to recompute each frame. */
  backdrop-filter: blur(16px) saturate(1.9);
  -webkit-backdrop-filter: blur(16px) saturate(1.9);
  border-bottom: 1px solid var(--glass-border);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  transition: background var(--t-base) var(--ease-smooth);
}

/* Top hairline */
#main-nav::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 1px;
  background: rgba(255,255,255,0.06);
  z-index: 2;
  pointer-events: none;
}

/* Separator between rows */
#main-nav::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  top: 46px;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.05) 15%,
    rgba(255,255,255,0.07) 50%,
    rgba(255,255,255,0.05) 85%,
    transparent 100%
  );
  pointer-events: none;
}

@keyframes nav-shimmer {
  0%   { background-position: 130% 0; opacity: 0.4; }
  50%  { background-position: -30% 0; opacity: 1.0; }
  100% { background-position: 130% 0; opacity: 0.4; }
}

/* ── Row 1: Logo + Controls ─────────────── */
.nav-top-row {
  display: flex;
  align-items: center;
  height: 46px;
  padding: 0 20px;
  gap: 12px;
  flex-shrink: 0;
}

.nav-controls {
  display: flex;
  align-items: center;
  gap: 7px;
  margin-left: auto;
}

/* ── Top-bar declutter (2026-07-13): collapse the secondary controls into a
   single "⋯ More" menu (src/app/shell/nav/nav-more.js) so the bar shows only the essentials:
   Easy View · ⋯ · user · LIVE · clock. The real buttons are moved into the
   menu, so every handler still works — they just render as menu rows. ──── */
.nav-help-label { display: none; }                        /* menu uses .nav-more-lbl */
.nav-logout-btn > span:not(.nav-more-lbl) { display: none; }

.nav-more-wrap { position: relative; display: flex; align-items: center; }
.nav-more-btn {
  width: 32px; height: 32px; display: grid; place-items: center; padding: 0; flex-shrink: 0;
  background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-sm); color: var(--text-muted); cursor: pointer;
  transition: all var(--t-base) var(--ease-out);
}
.nav-more-btn:hover { color: #e6eefc; background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.2); }
.nav-more-wrap.open .nav-more-btn { color: #e6eefc; background: rgba(56,189,248,0.10); border-color: rgba(125,211,252,0.45); }

.nav-more-menu {
  position: absolute; top: calc(100% + 9px); right: 0; z-index: 1200;
  min-width: 216px; display: flex; flex-direction: column; gap: 2px; padding: 6px;
  background: linear-gradient(168deg, rgba(20,27,49,0.99), rgba(11,15,31,0.99));
  border: 1px solid var(--glass-border-2, rgba(255,255,255,0.15)); border-radius: 13px;
  box-shadow: 0 26px 64px -18px rgba(0,0,0,0.88);
  opacity: 0; transform: translateY(-6px) scale(0.98); transform-origin: top right;
  pointer-events: none; transition: opacity 0.16s var(--ease-out), transform 0.16s var(--ease-out);
}
.nav-more-wrap.open .nav-more-menu { opacity: 1; transform: none; pointer-events: auto; }
@media (prefers-reduced-motion: reduce) { .nav-more-menu { transition: none; } }

/* which relocated buttons show (inline display:none from app.js still wins) */
.nav-more-menu > .nav-help-btn,
.nav-more-menu > .nav-easyview-btn,
.nav-more-menu > .theme-toggle,
.nav-more-menu > .nav-patchnotes-btn,
.nav-more-menu > .nav-review-queue-btn { display: flex; }
.nav-more-menu > .nav-logout-btn { display: none; }
.nav-more-menu > .nav-logout-btn.visible { display: flex; }

/* neutralise each button's bar styling into a uniform menu row */
.nav-more-menu > button {
  align-items: center !important; justify-content: flex-start !important; gap: 11px !important;
  width: 100% !important; height: auto !important; margin: 0 !important;
  padding: 9px 11px !important; border: 1px solid transparent !important; border-radius: 8px !important;
  background: none !important; box-shadow: none !important; transform: none !important;
  color: var(--text-secondary, #cbd5e1) !important;
  font: 600 12.5px/1.2 var(--font-body) !important; letter-spacing: 0 !important; text-transform: none !important;
  cursor: pointer;
}
.nav-more-menu > button:hover { background: rgba(255,255,255,0.06) !important; color: #eef4ff !important; transform: none !important; box-shadow: none !important; border-color: transparent !important; }
.nav-more-menu > button svg { width: 16px !important; height: 16px !important; flex: 0 0 auto; }
.nav-more-menu .nav-more-lbl { display: inline !important; font: inherit; letter-spacing: 0; text-transform: none; white-space: nowrap; }
.nav-more-menu .nav-ev-label { display: inline !important; font: inherit !important; letter-spacing: 0 !important; text-transform: none !important; color: inherit !important; white-space: nowrap; }
.nav-more-menu > .nav-logout-btn { color: var(--accent-rose, #fca5b5) !important; }
.nav-more-menu > .nav-logout-btn:hover { background: rgba(251,113,133,0.10) !important; }
/* light theme: the dropdown is a light surface with dark text */
html[data-theme="light"] .nav-more-menu {
  background: linear-gradient(168deg, #ffffff, #eef2f7);
  border-color: rgba(15,23,42,0.12);
  box-shadow: 0 22px 56px -18px rgba(30,41,59,0.22);
}
html[data-theme="light"] .nav-more-menu > button { color: #334155 !important; }
html[data-theme="light"] .nav-more-menu > button:hover { background: rgba(15,23,42,0.055) !important; color: #0f172a !important; }
html[data-theme="light"] .nav-more-menu > .nav-logout-btn { color: #e11d48 !important; }
html[data-theme="light"] .nav-more-menu > .nav-logout-btn:hover { background: rgba(225,29,72,0.08) !important; }
html[data-theme="light"] .nav-more-btn { background: rgba(15,23,42,0.04); border-color: rgba(15,23,42,0.12); color: #475569; }
html[data-theme="light"] .nav-more-btn:hover { color: #0f172a; background: rgba(15,23,42,0.07); border-color: rgba(15,23,42,0.2); }
html[data-theme="light"] .nav-more-wrap.open .nav-more-btn { color: #0f172a; background: rgba(2,132,199,0.09); border-color: rgba(2,132,199,0.4); }

/* subtle divider before the status (LIVE + clock) cluster */
.nav-controls > .nav-status { margin-left: 4px; padding-left: 11px; border-left: 1px solid rgba(255,255,255,0.09); }
html[data-theme="light"] .nav-controls > .nav-status { border-left-color: rgba(15,23,42,0.10); }

/* ── Logo ──────────────────────────────── */
.nav-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
  text-decoration: none;
}

.nav-logo-icon {
  /* The Torus mark is a round black disc with its own white edge ring, so
     it doesn't need a square glass container around it — that just stacks
     a rounded-rect frame over a circle and reads as visual noise. Let the
     SVG stand on its own and apply the hover glow directly to it. */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: filter var(--t-base) var(--ease-out),
              transform var(--t-base) var(--ease-out);
  filter: drop-shadow(0 1px 2px rgba(0,0,0,0.45));
}
.nav-logo-icon img { display: block; }

.nav-logo:hover .nav-logo-icon {
  filter: drop-shadow(0 2px 6px rgba(0,0,0,0.4));
  transform: rotate(8deg) scale(1.08);
}

.nav-logo-text {
  font-family: var(--font-display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--text-primary);
  user-select: none;
}

.nav-logo-text span {
  color: var(--accent-cyan);
}

/* ── Row 2: Tab strip ───────────────────── */
.nav-bottom-row {
  position: relative;
  display: flex;
  align-items: stretch;
  height: 40px;
  padding: 0 12px;
  overflow: hidden;
}

/* Sliding active pill — positioned by JS */
#nav-indicator {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  height: 28px;
  background: rgba(56,189,248,0.09);
  border: 1px solid rgba(56,189,248,0.22);
  border-radius: 7px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.22);
  pointer-events: none;
  z-index: 0;
  left: 0; width: 80px;
  opacity: 0;
  transition:
    left   0.38s cubic-bezier(0.34, 1.56, 0.64, 1),
    width  0.34s cubic-bezier(0.34, 1.56, 0.64, 1),
    opacity 0.2s ease;
}

#nav-indicator.ready { opacity: 1; }

/* Glow pulse on the indicator */
@keyframes indicator-pulse {
  0%, 100% { box-shadow: 0 0 14px rgba(56,189,248,0.10), inset 0 0 8px rgba(56,189,248,0.04); }
  50%       { box-shadow: 0 0 22px rgba(56,189,248,0.18), inset 0 0 12px rgba(56,189,248,0.07); }
}
#nav-indicator.ready {
  opacity: 1;
}

/* ── Tab strip container ─────────────────── */
.nav-tabs {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0 2px;
  position: relative;
  z-index: 1;
}
.nav-tabs::-webkit-scrollbar { display: none; }

/* ── Tab buttons ─────────────────────────── */
.nav-tab {
  position: relative;
  z-index: 1;
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  padding: 6px 16px;
  border-radius: 7px;
  cursor: pointer;
  white-space: nowrap;
  outline: none;
  transition:
    color      0.18s var(--ease-smooth),
    transform  0.15s var(--ease-out);

  /* Entrance animation — staggered per tab */
  animation: nav-tab-in 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

@keyframes nav-tab-in {
  from { opacity: 0; transform: translateY(5px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* Stagger up to 15 future tabs */
.nav-tab:nth-child(1)  { animation-delay: 0.03s; }
.nav-tab:nth-child(2)  { animation-delay: 0.07s; }
.nav-tab:nth-child(3)  { animation-delay: 0.11s; }
.nav-tab:nth-child(4)  { animation-delay: 0.15s; }
.nav-tab:nth-child(5)  { animation-delay: 0.19s; }
.nav-tab:nth-child(6)  { animation-delay: 0.23s; }
.nav-tab:nth-child(7)  { animation-delay: 0.27s; }
.nav-tab:nth-child(8)  { animation-delay: 0.31s; }
.nav-tab:nth-child(9)  { animation-delay: 0.35s; }
.nav-tab:nth-child(10) { animation-delay: 0.39s; }
.nav-tab:nth-child(11) { animation-delay: 0.43s; }
.nav-tab:nth-child(12) { animation-delay: 0.47s; }
.nav-tab:nth-child(13) { animation-delay: 0.51s; }
.nav-tab:nth-child(14) { animation-delay: 0.55s; }
.nav-tab:nth-child(15) { animation-delay: 0.59s; }

.nav-tab:hover {
  color: var(--text-secondary);
  transform: translateY(-1px);
}

/* Active tab — only color change, pill indicator handles background */
.nav-tab.active {
  color: var(--accent-cyan);
  font-weight: 600;
}

/* Bottom glow line on active tab */
.nav-tab.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 16px;
  height: 2px;
  background: var(--accent-cyan);
  border-radius: 2px 2px 0 0;
}

@keyframes tab-glow-line {
  0%, 100% { width: 14px; box-shadow: 0 0 6px var(--accent-cyan), 0 0 12px rgba(56,189,248,0.35); }
  50%       { width: 20px; box-shadow: 0 0 12px var(--accent-cyan), 0 0 24px rgba(56,189,248,0.55); }
}

/* ── Status indicator ──────────────────── */
.nav-status {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  padding: 5px 12px;
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  border-radius: 40px;
  backdrop-filter: blur(12px);
  transition: all var(--t-base) var(--ease-smooth);
  cursor: pointer;
}

.nav-status:has(.status-dot.live) {
  border-color: rgba(255,51,51,0.3);
  box-shadow: 0 0 14px rgba(255,51,51,0.12);
}

.nav-status:hover {
  border-color: var(--glass-border-2);
  background: var(--glass-2);
}

.status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.status-dot.live {
  background: #ff2222;
  box-shadow: 0 0 6px 1px rgba(255,34,34,0.6);
  animation: pulse-red 1.5s ease-out infinite;
}

.status-dot.loading {
  background: var(--accent-amber);
  box-shadow: 0 0 6px var(--accent-amber);
  animation: pulse-amber 0.8s ease-in-out infinite;
}

.status-dot.error {
  background: var(--accent-rose);
  box-shadow: 0 0 8px var(--accent-rose);
}

@keyframes pulse-red {
  0%   { box-shadow: 0 0 4px 1px rgba(255,34,34,0.8),  0 0 0 0    rgba(255,34,34,0.6); }
  60%  { box-shadow: 0 0 8px 2px rgba(255,34,34,0.4),  0 0 0 10px rgba(255,34,34,0);   }
  100% { box-shadow: 0 0 4px 1px rgba(255,34,34,0.8),  0 0 0 0    rgba(255,34,34,0);   }
}

@keyframes pulse-amber {
  0%   { box-shadow: 0 0 0 0   rgba(251,191,36,0.7); }
  70%  { box-shadow: 0 0 0 7px rgba(251,191,36,0);   }
  100% { box-shadow: 0 0 0 0   rgba(251,191,36,0);   }
}

.status-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
  user-select: none;
}

/* ── Theme toggle ──────────────────────── */
.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  flex-shrink: 0;
  background: var(--glass-1);
  border: 1px solid var(--glass-border);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  outline: none;
  backdrop-filter: blur(12px);
  transition: all var(--t-base) var(--ease-out);
}

.theme-toggle:hover {
  background: var(--glass-2);
  border-color: rgba(56,189,248,0.40);
  color: var(--accent-cyan);
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  transform: rotate(18deg) scale(1.08);
}

html[data-theme="light"] .theme-toggle:hover {
  border-color: rgba(2,132,199,0.40);
  box-shadow: 0 2px 8px rgba(30,41,59,0.16);
}

/* ── Role badge + account switcher ──────── */
.nav-role-wrap {
  position: relative;
  flex-shrink: 0;
}

.nav-role-badge {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  font-family: var(--font-display);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 100px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--t-base) var(--ease-smooth);
  opacity: 0;
  pointer-events: none;
  user-select: none;
}

.nav-role-badge:not(:empty) { opacity: 1; pointer-events: all; }
.nav-role-badge:hover { filter: brightness(1.2); }

.nav-role-badge .badge-chevron {
  opacity: 0.55;
  font-size: 7px;
  transition: transform 0.2s var(--ease-out);
  line-height: 1;
}

.nav-role-wrap.open .badge-chevron { transform: rotate(180deg); }

/* Dropdown */
.nav-switch-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 210px;
  background: rgba(8,13,30,0.92);
  border: 1px solid var(--glass-border-2);
  border-radius: var(--r-md);
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  box-shadow: 0 12px 40px rgba(0,0,0,0.5);
  padding: 6px;
  z-index: 2000;
  opacity: 0;
  pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transition: opacity 0.18s var(--ease-out), transform 0.18s var(--ease-spring);
}

.nav-role-wrap.open .nav-switch-dropdown {
  opacity: 1;
  pointer-events: all;
  transform: translateY(0) scale(1);
}

.nav-switch-label {
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
  padding: 4px 10px 6px;
}

.nav-switch-divider { height: 1px; background: var(--glass-border); margin: 4px 0; }

.nav-switch-item {
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 8px 10px;
  border-radius: var(--r-sm);
  border: none;
  background: none;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease-out);
  text-align: left;
}

.nav-switch-item:hover { background: rgba(255,255,255,0.06); }
.nav-switch-item.current { background: rgba(255,255,255,0.04); cursor: default; }

.nav-switch-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }

.nav-switch-name {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600;
  color: var(--text-secondary); flex: 1;
}

.nav-switch-item.current .nav-switch-name { color: var(--text-primary); }

.nav-switch-role {
  font-size: 8px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim);
}

.nav-switch-item.current .nav-switch-check { font-size: 10px; color: var(--accent-teal); }

.nav-switch-scroll {
  max-height: 52vh;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--glass-border-2) transparent;
}
.nav-switch-scroll::-webkit-scrollbar { width: 3px; }
.nav-switch-scroll::-webkit-scrollbar-track { background: transparent; }
.nav-switch-scroll::-webkit-scrollbar-thumb { background: var(--glass-border-2); border-radius: 2px; }

.nav-switch-group { margin-bottom: 2px; }
.nav-switch-group:last-child { margin-bottom: 0; }

/* ── Account search filter ─────────────────────── */
.nav-switch-search-wrap {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 2px 2px 0;
  padding: 5px 10px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: var(--r-sm);
}

.nav-switch-search-icon {
  color: var(--text-dim);
  flex-shrink: 0;
}

.nav-switch-search {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  color: var(--text-primary);
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  min-width: 0;
  caret-color: var(--accent-cyan);
}

.nav-switch-search::placeholder {
  color: var(--text-dim);
  opacity: 0.7;
}

/* Visible focus indicator — the input clears its own outline, so surface
   focus on the wrap instead (keyboard a11y). */
.nav-switch-search-wrap:focus-within {
  border-color: var(--accent-cyan);
  box-shadow: 0 0 0 2px var(--glow-cyan, rgba(56,189,248,.35));
}

html[data-theme="light"] .nav-switch-search-wrap {
  background: rgba(0,0,0,0.04);
  border-color: rgba(0,0,0,0.10);
}

html[data-theme="light"] .nav-switch-search { color: var(--text-primary); }

.nav-switch-group-label {
  font-size: 7.5px; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  padding: 7px 10px 3px; opacity: 0.65;
}

/* ── Logout button ─────────────────────── */
.nav-logout-btn {
  display: none;
  align-items: center;
  gap: 5px;
  flex-shrink: 0;
  background: none;
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: var(--r-sm);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 5px 11px;
  cursor: pointer;
  outline: none;
  transition: all var(--t-base) var(--ease-out);
}

.nav-logout-btn.visible { display: flex; }

.nav-logout-btn:hover {
  color: var(--accent-rose);
  border-color: rgba(251,113,133,0.40);
  background: rgba(251,113,133,0.07);
}

/* ── Activity pill — employee only ─────── */
.nav-activity-btn {
  background: rgba(129,140,248,0.08);
  border: 1px solid rgba(129,140,248,0.38);
  border-radius: var(--r-sm);
  color: rgba(129,140,248,0.95);
  padding: 6px 16px;
  font-size: 12px;
  flex-shrink: 0;
  align-self: center;
  margin-left: 8px;
}

.nav-activity-btn:hover {
  background: rgba(129,140,248,0.14);
  border-color: rgba(129,140,248,0.62);
  color: rgba(129,140,248,1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  transform: translateY(-1px);
}

.nav-activity-btn.active {
  background: rgba(129,140,248,0.14);
  border-color: rgba(129,140,248,0.62);
  color: rgba(129,140,248,1);
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}

.nav-activity-btn.active::after { display: none; }

/* ── Bug report button ─────────────────── */
.nav-bug-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  flex-shrink: 0;
  background: rgba(251,113,133,0.06);
  border: 1px solid rgba(251,113,133,0.22);
  border-radius: var(--r-sm);
  color: rgba(251,113,133,0.7);
  cursor: pointer;
  outline: none;
  transition: all var(--t-base) var(--ease-out);
}

.nav-bug-btn:hover {
  background: rgba(251,113,133,0.12);
  border-color: rgba(251,113,133,0.50);
  color: var(--accent-rose);
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}

.nav-bug-btn.active {
  background: rgba(251,113,133,0.14);
  border-color: rgba(251,113,133,0.55);
  color: var(--accent-rose);
}

/* Need-Help button — cyan pill with icon + label */
.nav-help-btn {
  display: flex;
  align-items: center;
  gap: 6px;
  height: 32px;
  padding: 0 11px;
  flex-shrink: 0;
  background: rgba(56,189,248,0.07);
  border: 1px solid rgba(56,189,248,0.24);
  border-radius: var(--r-sm);
  color: rgba(125,211,252,0.85);
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
  outline: none;
  transition: all var(--t-base) var(--ease-out);
}
.nav-help-btn:hover {
  background: rgba(56,189,248,0.14);
  border-color: rgba(56,189,248,0.5);
  color: var(--accent-cyan);
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}
html[data-theme="light"] .nav-help-btn {
  background: rgba(2,132,199,0.06);
  border-color: rgba(2,132,199,0.22);
  color: rgba(2,132,199,0.8);
}
@media (max-width: 640px) {
  .nav-help-label { display: none; }
  .nav-help-btn { padding: 0; width: 32px; justify-content: center; }
}

/* ── Role badge colours ─────────────────── */
.nav-role-badge.admin    { color: var(--accent-cyan);  background: rgba(56,189,248,0.08);  border-color: rgba(56,189,248,0.28);  }
.nav-role-badge.employee { color: var(--accent-teal);  background: rgba(45,212,191,0.08);  border-color: rgba(45,212,191,0.28);  }

/* ── Live status tooltip ─────────────────── */
#nav-status { position: relative; }

.ns-tooltip {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: rgba(8,13,30,0.92);
  border: 1px solid rgba(255,34,34,0.25);
  border-radius: 10px;
  backdrop-filter: blur(16px) saturate(1.8);
  -webkit-backdrop-filter: blur(16px) saturate(1.8);
  box-shadow: 0 8px 32px rgba(0,0,0,0.5), 0 0 20px rgba(255,34,34,0.08);
  padding: 10px 14px;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-6px) scale(0.97);
  transition: opacity 0.18s ease, transform 0.18s cubic-bezier(0.34,1.56,0.64,1);
  z-index: 1100;
}

#nav-status:hover .ns-tooltip { opacity: 1; transform: translateY(0) scale(1); }

.ns-tip-row {
  display: flex; align-items: center;
  justify-content: space-between;
  gap: 16px; padding: 3px 0;
}

.ns-tip-label {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
}

.ns-tip-val {
  font-family: var(--font-display);
  font-size: 10px; font-weight: 600;
  color: var(--text-secondary);
}

/* ── Live status modal ───────────────────── */
.ns-modal-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.55);
  backdrop-filter: blur(6px);
  z-index: 3000;
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.22s ease;
}

.ns-modal-overlay.visible { opacity: 1; pointer-events: all; }
.ns-modal-overlay.visible .ns-modal { transform: translateY(0) scale(1); opacity: 1; }

.ns-modal {
  background: rgba(8,13,30,0.94);
  border: 1px solid rgba(255,34,34,0.20);
  border-radius: 16px;
  backdrop-filter: blur(16px) saturate(1.8);
  box-shadow: 0 24px 64px rgba(0,0,0,0.6), 0 0 40px rgba(255,34,34,0.08);
  width: 340px; overflow: hidden;
  transform: translateY(16px) scale(0.97);
  opacity: 0;
  transition: transform 0.28s cubic-bezier(0.34,1.56,0.64,1), opacity 0.22s ease;
}

.ns-modal-header {
  display: flex; align-items: center;
  justify-content: space-between;
  padding: 16px 18px 14px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.ns-modal-title {
  display: flex; align-items: center; gap: 9px;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 700;
  letter-spacing: 0.08em; color: var(--text-primary);
}

.ns-modal-close {
  width: 26px; height: 26px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 50%; color: var(--text-muted);
  cursor: pointer; outline: none;
  transition: all 0.15s ease;
}

.ns-modal-close:hover {
  background: rgba(251,113,133,0.12);
  border-color: rgba(251,113,133,0.35);
  color: var(--accent-rose);
}

.ns-modal-body { padding: 18px; }

.ns-stat-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 12px; margin-bottom: 16px;
}

.ns-stat {
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 10px; padding: 12px; text-align: center;
}

.ns-stat-val {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 700;
  color: var(--text-primary); line-height: 1; margin-bottom: 5px;
}

.ns-stat-label {
  font-size: 8.5px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim);
}

.ns-divider { height: 1px; background: rgba(255,255,255,0.06); margin-bottom: 16px; }

.ns-refresh-row {
  display: flex; align-items: center;
  justify-content: space-between; margin-bottom: 12px;
}

.ns-refresh-label {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-dim);
}

.ns-refresh-val {
  font-family: var(--font-display);
  font-size: 11px; font-weight: 600; color: var(--text-secondary);
}

.ns-progress-wrap { display: flex; flex-direction: column; gap: 6px; }

.ns-progress-track {
  height: 4px; background: rgba(255,255,255,0.06);
  border-radius: 4px; overflow: hidden;
}

.ns-progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #ff2222, rgba(255,34,34,0.5));
  border-radius: 4px; width: 0%;
  transition: width 0.9s ease;
}

.ns-progress-label {
  font-size: 9px; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim); text-align: right;
}

/* ── Meta list (key / value rows below the progress bar) ────────────── */
.ns-meta-list {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ns-meta-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.ns-meta-label {
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-dim);
}
.ns-meta-val {
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
  text-align: right;
  max-width: 65%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ns-meta-err { color: var(--accent-rose, #fb7185); }

/* ── Light mode overrides ─────────────── */
html[data-theme="light"] #main-nav {
  background: rgba(228,234,255,0.88);
  border-bottom-color: rgba(130,100,200,0.18);
}

html[data-theme="light"] #main-nav::before {
  background: rgba(15,23,42,0.08);
}

html[data-theme="light"] .nav-tab.active { color: rgb(2,132,199); }

html[data-theme="light"] #nav-indicator {
  background: rgba(2,132,199,0.08);
  border-color: rgba(2,132,199,0.22);
  box-shadow: 0 0 16px rgba(2,132,199,0.10);
}

html[data-theme="light"] .nav-tab.active::after {
  background: rgb(2,132,199);
}

html[data-theme="light"] .nav-status:has(.status-dot.live) {
  border-color: rgba(225,29,72,0.30);
  box-shadow: 0 0 14px rgba(225,29,72,0.10);
}

html[data-theme="light"] .nav-switch-dropdown {
  background: rgba(240,244,255,0.95);
  border-color: rgba(130,100,200,0.22);
}

html[data-theme="light"] .nav-switch-item:hover { background: rgba(0,0,0,0.05); }

html[data-theme="light"] .nav-role-badge.admin    { background: rgba(2,132,199,0.09);   border-color: rgba(2,132,199,0.32);   }
html[data-theme="light"] .nav-role-badge.employee { background: rgba(13,148,136,0.09);  border-color: rgba(13,148,136,0.32);  }

html[data-theme="light"] .nav-logout-btn         { border-color: rgba(130,100,200,0.18); }
html[data-theme="light"] .nav-logout-btn:hover   { border-color: rgba(225,29,72,0.35); background: rgba(225,29,72,0.06); }

html[data-theme="light"] .nav-bug-btn            { background: rgba(225,29,72,0.06); border-color: rgba(225,29,72,0.22); color: rgba(225,29,72,0.65); }
html[data-theme="light"] .nav-bug-btn:hover,
html[data-theme="light"] .nav-bug-btn.active     { background: rgba(225,29,72,0.10); border-color: rgba(225,29,72,0.45); color: rgb(225,29,72); }

html[data-theme="light"] .nav-activity-btn       { background: rgba(99,102,241,0.07); border-color: rgba(99,102,241,0.32); color: rgb(99,102,241); }
html[data-theme="light"] .nav-activity-btn:hover,
html[data-theme="light"] .nav-activity-btn.active { background: rgba(99,102,241,0.13); border-color: rgba(99,102,241,0.55); }

html[data-theme="light"] .ns-tooltip,
html[data-theme="light"] .ns-modal               { background: rgba(240,244,255,0.96); border-color: rgba(225,29,72,0.18); }
html[data-theme="light"] .ns-stat                { background: rgba(0,0,0,0.03); border-color: rgba(0,0,0,0.07); }

/* ── Patch notes nav buttons ──────────────────────────────────────────────── */
.nav-patchnotes-btn,
.nav-review-queue-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  flex-shrink: 0;
  background: rgba(56,189,248,0.06);
  border: 1px solid rgba(56,189,248,0.22);
  border-radius: var(--r-sm);
  color: rgba(56,189,248,0.75);
  cursor: pointer;
  outline: none;
  transition: all var(--t-base) var(--ease-out);
}
.nav-patchnotes-btn:hover,
.nav-review-queue-btn:hover {
  background: rgba(56,189,248,0.12);
  border-color: rgba(56,189,248,0.50);
  color: var(--accent-cyan);
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
  transform: translateY(-1px);
}
.nav-patchnotes-btn:active,
.nav-review-queue-btn:active { transform: translateY(0); }

.nav-review-queue-btn {
  background: rgba(167,139,250,0.06);
  border-color: rgba(167,139,250,0.24);
  color: rgba(167,139,250,0.75);
}
.nav-review-queue-btn:hover {
  background: rgba(167,139,250,0.14);
  border-color: rgba(167,139,250,0.55);
  color: var(--accent-purple);
  box-shadow: 0 2px 8px rgba(0,0,0,0.22);
}

html[data-theme="light"] .nav-patchnotes-btn      { background: rgba(2,132,199,0.07); border-color: rgba(2,132,199,0.28); color: rgba(2,132,199,0.75); }
html[data-theme="light"] .nav-patchnotes-btn:hover{ background: rgba(2,132,199,0.13); border-color: rgba(2,132,199,0.55); color: rgb(2,132,199); }
html[data-theme="light"] .nav-review-queue-btn    { background: rgba(124,58,237,0.07); border-color: rgba(124,58,237,0.28); color: rgba(124,58,237,0.75); }
html[data-theme="light"] .nav-review-queue-btn:hover{ background: rgba(124,58,237,0.13); border-color: rgba(124,58,237,0.55); color: rgb(124,58,237); }
