/* 统一顶栏样式 (2026-06-16). 所有页面共用.
   用法: <link rel="stylesheet" href="/topbar.css"> + <script src="/topbar.js"></script>
   topbar.js 自动注入 .topbar div, 检测当前页高亮.
*/
.topbar {
  display: flex; align-items: center; gap: 18px;
  padding: 8px 12px;
  background: #1a1d22;
  border-radius: 0 0 6px 6px;
  border-bottom: 2px solid #2c2f36;
  box-sizing: border-box;
  font-family: system-ui, -apple-system, sans-serif;
}
.topbar h1 {
  margin: 0; font-size: 17px; color: #ddd;
  padding-right: 12px; border-right: 1px solid #2c2f36;
  font-weight: 600;
}
.topbar .nav-link {
  color: #888; text-decoration: none; font-size: 13px;
  padding: 4px 10px; border-radius: 4px;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.topbar .nav-link:hover { background: #2c2f36; color: #ddd; }
.topbar .nav-link.active { color: #5a8; background: #1e2f24; font-weight: 600; }
/* 服务器下拉 (右贴 meta 之前) */
.topbar .topbar-server {
  margin-left: auto;
  background: #181a1d; color: #ddd;
  border: 1px solid #2c2f36; border-radius: 4px;
  padding: 4px 8px; font-size: 13px; cursor: pointer;
  font-family: inherit;
}
.topbar .topbar-server:hover { border-color: #5a8; }
.topbar .topbar-server:focus { outline: none; border-color: #5a8; }
/* 右贴 slot — 页面 JS 可填 meta 文字. 有 server 下拉时不再 margin-left:auto */
.topbar .topbar-server + .topbar-meta { margin-left: 12px; }
.topbar .topbar-meta {
  margin-left: auto;
  color: #888; font-size: 12px;
  text-align: right;
  font-variant-numeric: tabular-nums;
  min-width: 1px;
}
