.topbar {
  position: sticky;
  top: 0;
  z-index: 100;
  min-height: 72px;
  height: auto;
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 0 max(24px, calc((100vw - 1440px) / 2));
  overflow: visible;
  background: #fff;
  border-bottom: 1px solid #dce5f0;
  box-shadow: 0 3px 14px rgba(20, 33, 61, .04);
}

.topbar .brand {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #17233c;
  text-decoration: none;
}

.topbar .brand > span,
.topbar .brand .logo {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 11px;
  background: linear-gradient(135deg, #2f75b5, #183f72);
  color: #fff;
  font-size: 20px;
  font-weight: 900;
}

.topbar .brand div { display: flex; flex-direction: column; }
.topbar .brand small { color: #74829b; font-size: 12px; }

.topbar nav {
  min-width: 0;
  margin-left: auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.topbar nav a {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 9px 14px;
  border-radius: 10px;
  color: #344563;
  text-decoration: none;
  font-weight: 500;
}

.topbar nav a:hover { background: #f1f6fb; color: #146cb0; }
.topbar nav a.active { background: #e5f0fb; color: #146cb0; font-weight: 800; }

@media (max-width: 760px) {
  .topbar {
    min-height: 62px;
    padding: 8px 12px;
  }

  .topbar .brand { display: none; }

  .topbar nav {
    width: 100%;
    margin: 0;
    justify-content: center;
    overflow-x: auto;
    scrollbar-width: thin;
  }

  .topbar nav a { padding: 9px 12px; }
}

@media (max-width: 480px) {
  .topbar { padding-inline: 6px; }
  .topbar nav { justify-content: flex-start; }
  .topbar nav a { padding-inline: 10px; font-size: 13px; }
}
