:root {
  --bg: #f3f4f6;
  --bg-soft: #f8fafc;
  --card: #ffffff;
  --border: #e5e7eb;
  --text: #111827;
  --muted: #4b5563;
  --primary: #3b82f6;
  --shadow: 0 10px 25px rgba(17, 24, 39, 0.08);
}

#topbar-mount {
  width: 100vw !important;
  margin-left: calc(50% - 50vw) !important;
  margin-right: calc(50% - 50vw) !important;
  align-self: stretch;
  position: relative;
  z-index: 4000;
}

#topbar-mount .topbar {
  width: 100% !important;
  margin: 0 !important;
  max-width: none !important;
  box-sizing: border-box;
  position: relative;
  left: 0 !important;
  right: 0 !important;
  border-radius: 0 !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.9), rgba(255,255,255,0.78));
  color: var(--text);
  border-bottom: 1px solid rgba(148, 163, 184, 0.2);
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

#topbar-mount .topbar::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(59,130,246,0.35), transparent);
}

#topbar-mount .topbar-inner {
  width: 100% !important;
  max-width: 1220px !important;
  margin: 0 auto !important;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 18px;
  box-sizing: border-box;
  position: relative;
}

#topbar-mount .tb-left,
#topbar-mount .tb-right {
  width: 150px;
  display: flex;
  align-items: center;
}

#topbar-mount .tb-left a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-weight: 800;
}

#topbar-mount .tb-left img {
  display: block;
  height: clamp(26px, 3vw, 38px);
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 8px 16px rgba(37,99,235,0.18));
}

#topbar-mount .tb-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 6px;
  border: 1px solid rgba(148, 163, 184, 0.18);
  border-radius: 999px;
  background: rgba(255,255,255,0.68);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.7);
}

#topbar-mount .tb-nav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  text-decoration: none;
  color: #334155;
  font-weight: 800;
  font-size: 14px;
  line-height: 1;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  box-sizing: border-box;
  transition: background 0.16s ease, color 0.16s ease, transform 0.12s ease, box-shadow 0.16s ease;
}

#topbar-mount .tb-nav a:hover {
  background: rgba(241, 245, 249, 0.95);
  color: #0f172a;
  transform: translateY(-1px);
}

#topbar-mount .tb-nav a.active {
  background: linear-gradient(135deg, #1d9bf0, #2563eb);
  color: #fff;
  box-shadow: 0 10px 20px rgba(37,99,235,0.24);
}

#topbar-mount .tb-dropdown {
  position: relative;
  display: flex;
  align-items: center;
}

#topbar-mount .tb-dropdown > a::after {
  content: "\25BE";
  margin-left: 6px;
  font-size: 11px;
  color: #64748b;
}

#topbar-mount .tb-dropdown-menu {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  min-width: 0;
  width: max-content;
  max-width: min(300px, calc(100vw - 24px));
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 8px;
  background: rgba(255,255,255,0.96);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 16px;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  z-index: 3000;
}

#topbar-mount .tb-dropdown-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -12px;
  height: 12px;
}

#topbar-mount .tb-dropdown-menu a {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  box-sizing: border-box;
  text-align: left;
  white-space: nowrap;
  padding: 10px 12px;
  border-radius: 12px;
}

#topbar-mount .tb-dropdown-menu a:hover {
  background: #f8fbff;
}

@media (min-width: 801px) {
  #topbar-mount .tb-dropdown:hover .tb-dropdown-menu,
  #topbar-mount .tb-dropdown:focus-within .tb-dropdown-menu {
    display: flex;
  }
}

#topbar-mount .mobile-menu-btn {
  display: none;
  position: relative;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  background: rgba(255,255,255,0.88);
  border: 1px solid rgba(148, 163, 184, 0.22);
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(15, 23, 42, 0.12);
  cursor: pointer;
  font-size: 0;
}

#topbar-mount .mobile-menu-btn span {
  position: absolute;
  left: 11px;
  right: 11px;
  height: 2px;
  background: #0f172a;
  border-radius: 999px;
}

#topbar-mount .mobile-menu-btn span:nth-child(1) {
  top: 14px;
}

#topbar-mount .mobile-menu-btn span:nth-child(2) {
  top: 21px;
}

#topbar-mount .mobile-menu-btn span:nth-child(3) {
  top: 28px;
}

@media (max-width: 800px) {
  #topbar-mount .mobile-menu-btn {
    display: inline-flex;
    position: absolute;
    left: 10px;
    top: 6px;
    z-index: 20;
  }

  #topbar-mount .tb-dropdown {
    width: 100%;
    display: block;
  }

  #topbar-mount .tb-dropdown > a::after {
    display: none;
  }

  #topbar-mount .tb-dropdown-menu {
    display: none !important;
  }

  #topbar-mount .tb-nav > a,
  #topbar-mount .tb-dropdown > a {
    display: block;
    width: 100%;
    box-sizing: border-box;
    border: 1px solid rgba(148, 163, 184, 0.18);
    background: rgba(248, 250, 252, 0.95);
    border-radius: 14px;
    text-align: center;
    padding: 10px 12px;
    min-height: 42px;
  }

  #topbar-mount .topbar {
    padding: 1px 6px;
  }

  #topbar-mount .topbar-inner {
    gap: 6px;
    padding: 4px 8px 6px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 36px;
  }

  #topbar-mount .tb-left {
    position: static;
    width: auto !important;
    margin-left: 0;
  }

  #topbar-mount .tb-left img {
    height: 19px !important;
    width: auto !important;
    margin-left: 0 !important;
  }

  #topbar-mount .tb-nav {
    width: 84%;
    max-width: 540px;
    min-width: 240px;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 6px;
    margin: 0 auto;
    border-radius: 16px;
    padding: 6px;
    background: rgba(255,255,255,0.82);
  }

  #topbar-mount .tb-nav > a,
  #topbar-mount .tb-dropdown > a {
    min-height: 34px;
    padding: 6px 10px;
    font-size: 13px;
    border-radius: 12px;
  }

  body[data-sim-mobile-menu] #topbar-mount .mobile-menu-btn {
    position: fixed;
    left: 10px;
    top: 10px;
    z-index: 13000;
  }
}
