.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 200;
  height: var(--topbar-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 28px;
}

.topbar-left  { display: flex; align-items: center; gap: 28px; }
.topbar-right { display: flex; align-items: center; gap: 12px; }

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.logo-icon {
  width: 30px;
  height: 30px;
  background: var(--accent);
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-family: 'Space Mono';
  font-weight: 700;
  font-size: 11px;
  letter-spacing: -0.5px;
}
.logo-name { font-weight: 700; font-size: 17px; color: var(--text); letter-spacing: -0.5px; }
.logo-sep  { color: var(--border2); font-weight: 300; margin: 0 2px; }
.logo-sub  { color: var(--text2); font-weight: 500; font-size: 15px; }

.topnav { display: flex; gap: 2px; }
.topnav-link {
  padding: 8px 16px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--text2);
  text-decoration: none;
  transition: all .15s;
  cursor: pointer;
}
.topnav-link:hover { background: var(--surface); color: var(--text); }
.topnav-link.active { background: var(--accent-soft); color: var(--accent); }

.env-badge {
  font-family: 'Space Mono';
  font-size: 11px;
  padding: 4px 10px;
  background: var(--success-soft);
  border: 1px solid #bbf7d0;
  color: var(--success);
  border-radius: 4px;
  font-weight: 700;
}
.version-badge {
  font-family: 'Space Mono';
  font-size: 11px;
  padding: 4px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text3);
  border-radius: 4px;
}
.avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.layout { display: flex; padding-top: var(--topbar-h); min-height: 100vh; }

.sidebar {
  width: var(--sidebar-w);
  background: var(--white);
  border-right: 1px solid var(--border);
  position: fixed;
  top: var(--topbar-h);
  bottom: 0;
  left: 0;
  overflow-y: auto;
  padding: 20px 0;
  z-index: 100;
}
.nav-group { padding: 0 12px; margin-bottom: 20px; }
.nav-group-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.5px;
  text-transform: uppercase;
  color: var(--text3);
  padding: 0 12px 6px;
}
.nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 500;
  color: var(--text2);
  cursor: pointer;
  transition: all .12s;
  text-decoration: none;
}
.nav-link:hover  { background: var(--surface); color: var(--text); }
.nav-link.active { background: var(--accent-soft); color: var(--accent); }
.nav-badge {
  font-family: 'Space Mono';
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 3px;
}
.badge-post { background: var(--success-bg); color: var(--success); }
.badge-get  { background: #dbeafe; color: var(--accent); }

.main {
  margin-left: var(--sidebar-w);
  flex: 1;
  padding: 36px 48px 80px;
  max-width: 920px;
}
.main.wide { max-width: none; }
.main.solo { margin-left: 0; }

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 8px;
}
.page-title {
  font-size: 32px;
  font-weight: 700;
  letter-spacing: -0.8px;
  margin-bottom: 10px;
}
.page-title.size-sm { font-size: 24px; }
.page-desc {
  color: var(--text2);
  font-size: 15px;
  line-height: 1.7;
  margin-bottom: 36px;
  max-width: 680px;
}
.section-spacer { margin-top: 48px; }

@media (max-width: 768px) {
  .sidebar { display: none; }
  .main { margin-left: 0; padding: 24px 16px 60px; max-width: none; }
  .topnav { display: none; }
  .topbar { padding: 0 16px; }
}
