.topbar {
  position: sticky;
  top: 18px;
  z-index: 50;
  width: min(1320px, calc(100% - 64px));
  height: 70px;
  margin: 18px auto 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 18px 0 22px;
  border: 1px solid rgba(142, 157, 168, 0.22);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.76);
  box-shadow: 0 16px 54px rgba(39, 58, 71, 0.1);
  backdrop-filter: blur(24px);
  color: #23323d;
  transition: background 220ms ease, border-color 220ms ease, box-shadow 220ms ease, color 220ms ease;
}

.topbar--sub {
  position: fixed;
  left: 50%;
  margin: 0;
  transform: translateX(-50%);
}

.brand {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 230px;
}

.brand img {
  width: 112px;
  height: 44px;
  object-fit: contain;
  transition: filter 220ms ease;
}

.brand strong {
  display: block;
  font-size: 18px;
  font-weight: 850;
  letter-spacing: 0;
  color: inherit;
}

.nav-links {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  color: #334451;
  font-size: 14px;
  font-weight: 400;
}

.topbar > .btn {
  position: relative;
  z-index: 2;
  margin-left: auto;
}

.topbar > .btn.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-height: 46px;
  padding: 0 22px;
  border: 1px solid rgba(16, 24, 32, 0.08);
  border-radius: 999px;
  color: #fff;
  background: #101820;
  box-shadow: 0 16px 34px rgba(16, 24, 32, 0.16);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  cursor: pointer;
}

.nav-links a,
.nav-trigger {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  color: inherit;
  background: transparent;
  cursor: pointer;
  white-space: nowrap;
  font-weight: inherit;
  transition: color 180ms ease, background 180ms ease;
}

.nav-links a:hover,
.nav-item:hover .nav-trigger {
  color: #1B6DE1;
  background: rgba(27, 109, 225, 0.08);
}

.nav-item {
  position: relative;
}

.nav-menu {
  position: absolute;
  left: 50%;
  top: calc(100% + 10px);
  width: 320px;
  padding: 12px;
  border: 1px solid rgba(68, 88, 103, 0.12);
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 24px 60px rgba(39, 58, 71, 0.14);
  backdrop-filter: blur(22px);
  transform: translateX(-50%) translateY(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease, visibility 180ms ease;
}

.nav-item:hover .nav-menu,
.nav-item:focus-within .nav-menu {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.nav-menu a,
.nav-menu span {
  display: grid;
  gap: 4px;
  min-height: auto;
  padding: 12px;
  border-radius: 14px;
  color: #1e2f38;
  font-size: 14px;
  font-weight: 400;
  background: transparent;
}

.nav-menu a:hover {
  background: rgba(27, 109, 225, 0.08);
}

.nav-menu small {
  color: #65717a;
  font-size: 12px;
  line-height: 1.45;
  font-weight: 400;
}

.topbar.is-dark {
  color: rgba(247, 251, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(5, 8, 12, 0.78);
  box-shadow: 0 18px 58px rgba(0, 0, 0, 0.28);
}

.topbar.is-dark .nav-links {
  color: rgba(247, 251, 255, 0.88);
}

.topbar.is-dark .brand img {
  filter: brightness(0) invert(1);
}

.topbar.is-dark .nav-links a:hover,
.topbar.is-dark .nav-item:hover .nav-trigger {
  color: #00FFC2;
  background: rgba(0, 255, 194, 0.12);
}

.topbar.is-dark > .btn.btn-primary {
  border-color: rgba(0, 255, 194, 0.64);
  color: #031110;
  background: #00FFC2;
  box-shadow: 0 16px 40px rgba(0, 255, 194, 0.2);
}

.topbar.is-dark .nav-menu {
  border-color: rgba(255, 255, 255, 0.16);
  background: rgba(8, 12, 18, 0.92);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.34);
}

.topbar.is-dark .nav-menu a,
.topbar.is-dark .nav-menu span {
  color: rgba(247, 251, 255, 0.92);
}

.topbar.is-dark .nav-menu a:hover {
  background: rgba(0, 255, 194, 0.12);
}

.topbar.is-dark .nav-menu small {
  color: rgba(216, 228, 238, 0.62);
}

.is-muted-link {
  opacity: 0.62;
  cursor: default;
}

.shared-consult-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  place-items: center;
  padding: 24px;
}

.shared-consult-modal.is-open {
  display: grid;
}

.shared-consult-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 12, 18, 0.46);
  backdrop-filter: blur(12px);
}

.shared-consult-dialog {
  position: relative;
  z-index: 1;
  width: min(520px, 100%);
  padding: 30px;
  border: 1px solid rgba(68, 88, 103, 0.16);
  border-radius: 28px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 28px 90px rgba(16, 24, 32, 0.22);
}

.shared-consult-close {
  position: absolute;
  right: 18px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(68, 88, 103, 0.12);
  border-radius: 999px;
  color: #42525c;
  background: #ffffff;
  cursor: pointer;
}

.shared-consult-dialog h3 {
  margin: 0;
  color: #111a22;
  font-size: 28px;
  line-height: 1.2;
}

.shared-consult-dialog > p {
  margin: 12px 0 0;
  color: #65717a;
  line-height: 1.7;
}

.shared-consult-form {
  display: grid;
  gap: 14px;
  margin-top: 22px;
}

.shared-consult-field {
  display: grid;
  gap: 8px;
}

.shared-consult-field label {
  color: #26343d;
  font-size: 13px;
  font-weight: 850;
}

.shared-consult-field input,
.shared-consult-field textarea {
  width: 100%;
  border: 1px solid rgba(68, 88, 103, 0.16);
  border-radius: 14px;
  color: #101820;
  background: rgba(247, 250, 251, 0.92);
  outline: none;
}

.shared-consult-field input {
  height: 46px;
  padding: 0 14px;
}

.shared-consult-field textarea {
  min-height: 108px;
  padding: 13px 14px;
  line-height: 1.6;
  resize: vertical;
}

.shared-consult-form .btn {
  width: 100%;
  min-height: 46px;
  border-color: rgba(16, 24, 32, 0.08);
  color: #ffffff;
  background: #101820;
}

.shared-consult-message {
  min-height: 22px;
  margin: 0;
  color: #1B6DE1;
  font-size: 13px;
}

body.modal-open {
  overflow: hidden;
}

@media (max-width: 1024px) {
  .topbar {
    width: calc(100% - 28px);
  }

  .nav-links {
    display: none;
  }

  .brand {
    min-width: 0;
  }
}
