.topbar {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  background: rgba(247, 245, 241, .78);
  border-bottom: 1px solid rgba(232, 223, 207, .9);
}
.topbar-inner {
  max-width: var(--max, 1120px);
  height: 72px;
  margin: 0 auto;
  padding: 0 var(--cabinet-gap, 18px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-width: 0;
}
.topbar .brand {
  display: flex;
  align-items: center;
  gap: 14px;
  color: inherit;
  text-decoration: none;
  min-width: 0;
}
.topbar .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--navy, #15233f) 0%, #23355c 100%);
  color: #f3d98e;
  box-shadow: var(--shadow-sm, 0 6px 18px rgba(21, 35, 63, .06));
  flex: 0 0 auto;
}
.topbar .brand-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.profile-menu-wrapper { position: relative; }
.profile-btn {
  border: 1px solid var(--line, #e8dfcf);
  background: rgba(255,255,255,.92);
  border-radius: 999px;
  padding: 8px 12px 8px 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  color: var(--text, #172033);
  box-shadow: var(--shadow-sm, 0 6px 18px rgba(21, 35, 63, .06));
  font: inherit;
}
.profile-btn:hover { border-color: #d5c3a2; }
.profile-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--navy, #15233f);
  color: #f3d98e;
}
.profile-email-short {
  max-width: 160px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.profile-chevron {
  color: var(--muted, #6d7891);
  transition: transform .18s ease;
}
.profile-menu-wrapper.open .profile-chevron { transform: rotate(180deg); }
.profile-dropdown {
  display: none;
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid var(--line, #e8dfcf);
  border-radius: 18px;
  box-shadow: var(--shadow, 0 18px 50px rgba(21, 35, 63, .10));
  overflow: hidden;
}
.profile-dropdown.show { display: block; }
.profile-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  text-decoration: none;
  color: var(--text, #172033);
  border-bottom: 1px solid var(--line-soft, #efe7da);
  cursor: pointer;
  background: #fff;
}
.profile-menu-item:last-child { border-bottom: 0; }
.profile-menu-item:hover { background: #faf7f0; }
.profile-menu-item.disabled { opacity: .45; pointer-events: none; }
.menu-icon { width: 20px; text-align: center; }
.topbar .btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  padding: 10px 16px;
  cursor: pointer;
  text-decoration: none;
}
.topbar .btn-gold {
  background: linear-gradient(145deg, var(--gold, #c9a44a), var(--gold-2, #e8cb76));
  color: #fff;
}
.topbar .btn-sm { min-height: 40px; }
@media (max-width: 720px) {
  .topbar-inner {
    height: 64px;
    padding-left: 12px;
    padding-right: 12px;
  }
  .topbar .brand-mark { width: 38px; height: 38px; border-radius: 13px; }
  .topbar .brand-sub { display: none; }
  .profile-email-short { max-width: 118px; }
  .profile-btn { padding-right: 10px; gap: 8px; }
}
