/* BolsaHoy shared public navigation. Loaded after page-local CSS on main pages. */
.app-header.bh-float-nav {
  position: fixed;
  top: 42px;
  left: 0;
  right: 0;
  z-index: 40;
  width: min(1180px, calc(100% - 24px));
  margin: 0 auto;
  padding: 0 !important;
  min-height: 0 !important;
  display: block;
  border-radius: 999px;
  background: rgba(var(--bh-header-rgb, 255, 255, 255), .72);
  border: 1px solid var(--line, rgba(10, 20, 40, .1));
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  box-shadow: 0 16px 34px rgba(10, 20, 40, .12);
}

[data-theme="dark"] .app-header.bh-float-nav {
  background: rgba(var(--bh-header-rgb, 9, 13, 20), .72);
  border-color: rgba(255, 255, 255, .12);
  box-shadow: 0 18px 42px rgba(0, 0, 0, .32);
}

.header-row {
  min-height: 58px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 5px 16px 5px 18px;
}

.brand {
  min-width: 168px;
  margin-right: 22px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  text-decoration: none;
  flex: 0 0 auto;
}

.brand > img {
  width: 128px;
  max-width: 128px;
  height: auto !important;
  display: block;
  object-fit: contain;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.nav::-webkit-scrollbar { display: none; }

.nav a,
.nav-drop > a {
  position: relative;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  padding: 0 12px;
  border-radius: 999px;
  color: var(--ink-2, var(--bh-ink-muted, #6b7890));
  text-decoration: none;
  font-size: 14px;
  font-weight: 850;
  opacity: .9;
  white-space: nowrap;
  transition: color 150ms ease, background 150ms ease, opacity 150ms ease;
}

.nav a::after,
.nav-drop > a::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--blue, var(--bh-blue, #1f80ff));
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 150ms ease;
}

.nav a:hover,
.nav a.active,
.nav-drop:hover > a,
.nav-drop:focus-within > a,
.nav-drop.is-open > a {
  color: var(--blue, var(--bh-blue, #1f80ff));
  background: rgba(31, 128, 255, .1);
  opacity: 1;
}

.nav a:hover::after,
.nav a.active::after,
.nav-drop:hover > a::after,
.nav-drop:focus-within > a::after,
.nav-drop.is-open > a::after {
  transform: scaleX(1);
}

.nav-drop {
  position: relative;
  display: flex;
  align-items: center;
  flex: 0 0 auto;
}

.nav-drop-panel {
  position: fixed;
  top: 0;
  left: 0;
  min-width: 250px;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--line, rgba(10, 20, 40, .1));
  background: rgba(var(--bh-header-rgb, 255, 255, 255), .98);
  box-shadow: 0 18px 44px rgba(8, 9, 11, .28);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-6px);
  transition: opacity 160ms ease, transform 160ms ease, visibility 160ms ease;
}

[data-theme="dark"] .nav-drop-panel {
  background: rgba(var(--bh-header-rgb, 9, 13, 20), .98);
  border-color: rgba(255, 255, 255, .12);
}

.nav-drop:hover .nav-drop-panel,
.nav-drop:focus-within .nav-drop-panel,
.nav-drop.is-open .nav-drop-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0);
}

.nav-drop-panel a {
  position: static;
  min-height: 0;
  display: block;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-2, var(--bh-ink-muted, #6b7890));
  font-size: 13px;
  font-weight: 800;
  white-space: nowrap;
  opacity: 1;
}

.nav-drop-panel a::after { display: none; }
.nav-drop-panel a:hover {
  color: var(--blue, var(--bh-blue, #1f80ff));
  background: rgba(31, 128, 255, .1);
}

.actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
}

.account-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 118px;
  min-height: 40px;
  padding: 0 14px 0 8px;
  border-radius: 999px;
  justify-content: flex-start;
  border: 1px solid rgba(255, 255, 255, .4);
  background: rgba(31, 128, 255, .32);
  color: #fff;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}

.account-btn:hover { background: rgba(31, 128, 255, .46); }

.account-btn.signed {
  color: var(--white, #fff);
  border-color: rgba(31, 128, 255, .8);
  background: linear-gradient(135deg, var(--blue, #1f80ff), #051a36);
}

.account-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, var(--blue, #1f80ff), var(--ink, #08090b));
  color: var(--white, #fff);
  font-size: 12px;
  font-weight: 950;
  overflow: hidden;
  flex-shrink: 0;
}

.account-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.mobile-nav-account span:first-child img,
.mob-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.nav-bolsabot {
  background: rgba(31, 128, 255, .15) !important;
  border: 1px solid rgba(31, 128, 255, .3) !important;
  border-radius: 999px !important;
  padding: 4px 12px !important;
  color: var(--blue, #1f80ff) !important;
  font-weight: 700 !important;
  transition: all .18s ease !important;
}

.nav-bolsabot:hover {
  background: rgba(31, 128, 255, .3) !important;
}

.hamburger-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  background: rgba(var(--fg-rgb, 10, 20, 40), .08);
  border: 1px solid rgba(var(--fg-rgb, 10, 20, 40), .12);
  cursor: pointer;
  padding: 10px;
}

.hamburger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--ink, #101522);
  border-radius: 2px;
  transition: transform 180ms ease, opacity 180ms ease;
}

.hamburger-btn.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger-btn.open span:nth-child(2) { opacity: 0; }
.hamburger-btn.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.mobile-nav-overlay,
.mob-overlay {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 998;
  background: rgba(0, 0, 0, .58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
}

.mobile-nav-overlay.open,
.mob-overlay.open {
  display: block;
  animation: bhHeaderFade .18s ease;
}

@keyframes bhHeaderFade { from { opacity: 0; } to { opacity: 1; } }

.mobile-nav,
.mob-nav {
  position: fixed;
  top: 0;
  right: -100%;
  bottom: 0;
  z-index: 999;
  width: min(248px, 74vw);
  background: #070b14;
  border-left: 1px solid rgba(255, 255, 255, .1);
  display: flex;
  flex-direction: column;
  box-shadow: -18px 0 48px rgba(0, 0, 0, .45);
  transition: right .24s ease;
}

.mobile-nav.open,
.mob-nav.open { right: 0; }

.mobile-nav-header,
.mob-nav-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 14px 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}

.mobile-nav-logo {
  display: block;
  width: auto;
  max-width: 128px;
  height: 20px;
  object-fit: contain;
}

.mobile-nav-close,
.mob-nav-close {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, .08);
  border: 0;
  color: rgba(255, 255, 255, .72);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.mobile-nav-links,
.mob-nav-links {
  flex: 1;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
}

.mobile-nav-link,
.mob-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 10px;
  color: rgba(255, 255, 255, .76);
  font-size: 14px;
  font-weight: 750;
  text-decoration: none;
  line-height: 1.15;
  transition: background 150ms ease, color 150ms ease;
}

.mobile-nav-link:hover,
.mob-link:hover {
  background: rgba(255, 255, 255, .08);
  color: #fff;
}

.mobile-nav-bolsabot {
  background: rgba(31, 128, 255, .13);
  border: 1px solid rgba(31, 128, 255, .26);
  color: #4fa0ff !important;
  margin-top: 6px;
}

.mobile-nav-footer,
.mob-nav-bottom {
  padding: 10px;
  border-top: 1px solid rgba(255, 255, 255, .08);
}

.mobile-nav-account,
.mob-account-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .82);
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.mobile-nav-account + .mobile-nav-account,
.mob-account-btn + .mob-account-btn { margin-top: 8px; }

.mobile-nav-account span:first-child,
.mob-avatar {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--blue, #1f80ff), var(--blue-2, #0d54c8));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 900;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}

@media (max-width: 880px) {
  .hamburger-btn { display: flex !important; }
  .nav,
  #navBolsaBot { display: none !important; }
  .account-btn > span:last-child { display: none; }

  .app-header.bh-float-nav {
    width: min(100% - 18px, 1180px);
    top: 30px;
    border-radius: 999px;
  }

  .header-row {
    width: 100%;
    min-height: 46px;
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 4px 8px 4px 12px;
  }

  .brand {
    min-width: 0;
    margin-right: 0;
  }

  .brand > img {
    width: 116px;
    max-width: 116px;
  }

  .actions {
    margin-left: auto;
    gap: 6px;
  }

  .bh-theme-toggle {
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
  }

  .account-btn {
    min-width: 36px;
    width: 36px;
    height: 36px;
    min-height: 36px;
    padding: 0;
    justify-content: center;
  }

  .account-avatar {
    width: 26px;
    height: 26px;
  }

  .hamburger-btn {
    width: 36px;
    height: 36px;
    padding: 9px;
  }
}

@media (max-width: 390px) {
  .brand > img {
    width: 106px;
    max-width: 106px;
  }

  .mobile-nav,
  .mob-nav {
    width: min(232px, 72vw);
  }
}
