/* 共享导航栏样式 — 所有已登录页面引用 common.css */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: system-ui, -apple-system, sans-serif; }

/* 导航栏 */
.navbar {
  height: 52px; background: #1e3a5f; display: flex; align-items: center;
  padding: 0 20px; gap: 4px; position: sticky; top: 0; z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.18);
}
.navbar-brand { font-size: 15px; font-weight: 700; color: #fff; margin-right: 16px; white-space: nowrap; }
.brand-short { display: none; }
.navbar-collapse { display: contents; }
.navbar-links { display: flex; gap: 4px; flex: 1; align-items: center; }
.nav-icon { margin-right: 4px; }
.nav-short { display: none; }
.nav-link {
  padding: 7px 14px; border-radius: 6px; color: rgba(255,255,255,0.82);
  text-decoration: none; font-size: 14px; font-weight: 500;
  transition: background .15s; white-space: nowrap;
}
.nav-link:hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-link.active { background: rgba(255,255,255,0.18); color: #fff; }
.navbar-right { display: flex; align-items: center; gap: 8px; }
.navbar-user { font-size: 13px; color: rgba(255,255,255,0.85); padding: 0 6px; white-space: nowrap; }
.nav-btn {
  padding: 5px 12px; border-radius: 5px; font-size: 12px; font-weight: 500;
  color: rgba(255,255,255,0.85); text-decoration: none;
  border: 1px solid rgba(255,255,255,0.2); transition: background .15s; white-space: nowrap;
}
.nav-btn:hover { background: rgba(255,255,255,0.12); color: #fff; }
.nav-btn.logout { border-color: rgba(255,100,100,0.5); color: rgba(255,180,180,0.9); }
.nav-btn.logout:hover { background: rgba(220,38,38,0.25); color: #fff; }
.navbar-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,0.3); color: #fff; font-size: 20px; padding: 2px 8px; border-radius: 5px; cursor: pointer; margin-left: auto; }
.nav-project-sep { font-size: 14px; color: rgba(255,255,255,0.5); padding: 7px 4px; }
.nav-project-name { font-size: 14px; color: rgba(255,255,255,0.85); padding: 7px 4px; white-space: nowrap; }
.nav-back { font-size: 13px !important; color: rgba(255,255,255,0.6) !important; }

@media (max-width: 768px) {
  .navbar { flex-wrap: wrap; height: auto; min-height: 48px; padding: 8px 12px; }
  .navbar-toggle { display: block; }
  .brand-full { display: none; }
  .brand-short { display: inline; }
  .nav-full { display: none; }
  .nav-short { display: inline; }
  .navbar-collapse { display: none; width: 100%; flex-direction: column; gap: 8px; padding-top: 8px; }
  .navbar.open .navbar-collapse { display: flex; }
  .navbar-links { flex-direction: column; gap: 2px; width: 100%; }
  .nav-link { padding: 8px 12px; width: 100%; border-radius: 6px; }
  .navbar-right { width: 100%; justify-content: flex-start; gap: 6px; padding: 6px 0; border-top: 1px solid rgba(255,255,255,0.1); flex-wrap: wrap; }
  .nav-project-sep { display: none; }
  .nav-project-name { font-size: 13px; padding: 4px 12px; display: block; width: 100%; overflow: hidden; text-overflow: ellipsis; }
}
