/* Top header menu (replaces tab bar) */
:root{
  --topnav-bg: rgba(15, 23, 42, .72);
  --topnav-line: rgba(148, 163, 184, .18);
  --topnav-text: #e5e7eb;
  --topnav-muted: #94a3b8;
}

.topnav{
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--topnav-bg);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--topnav-line);
}

.topnav-inner{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
}

.brand{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--topnav-text);
  font-weight: 700;
  letter-spacing: .2px;
}
.brand img{border-radius: 7px;}
.brand span{white-space: nowrap;}

.navlinks{
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.navlink{
  text-decoration: none;
  color: var(--topnav-muted);
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid transparent;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.navlink:hover{
  color: var(--topnav-text);
  background: rgba(148, 163, 184, .08);
  border-color: rgba(148, 163, 184, .18);
}

.topnav-right{
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.userpill{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, .18);
  background: rgba(2, 6, 23, .35);
  max-width: 260px;
}
.userpill .dot{
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #22c55e;
  box-shadow: 0 0 0 4px rgba(34, 197, 94, .15);
}
.userpill .email{
  color: var(--topnav-text);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

@media (max-width: 768px){
  .navlinks{display:none;}
  .userpill{display:none;}
}
