/* ============================================================
   VAULTIX — SITE NAVBAR (floating pill)
   /assets/nav.css
   Self-contained: safe to load alongside any page styles.
   ============================================================ */

.vx-nav {
  position: sticky;
  top: 0;
  z-index: 90;
  padding: 16px 24px 0;
  /* No backdrop band: the pill stands on its own, so it never paints a
     dark rectangle onto pages with a slightly different background. */
  background: none;
  pointer-events: none;
}

/* `display: inline-flex` on buttons/links beats the [hidden] attribute,
   which is why the Login button used to stay visible after signing in. */
.vx-nav [hidden] { display: none !important; }

.vx-nav-inner {
  position: relative;
  pointer-events: auto;
  display: flex;
  align-items: center;
  gap: 20px;
  width: 100%;
  max-width: 1160px;
  height: 66px;
  margin: 0 auto;
  padding: 0 10px 0 16px;
  border-radius: 17px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(11, 15, 28, 0.8);
  backdrop-filter: blur(20px) saturate(165%);
  -webkit-backdrop-filter: blur(20px) saturate(165%);
  box-shadow:
    0 10px 30px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.07);
}

/* thin accent hairline along the top edge of the pill */
.vx-nav-inner::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 18%;
  right: 18%;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(139, 92, 246, 0.55), rgba(91, 140, 255, 0.55), transparent);
  border-radius: 1px;
  pointer-events: none;
}

/* ---------- brand ---------- */
.vx-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  text-decoration: none;
  color: inherit;
}

.vx-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  object-fit: cover;
  flex: 0 0 auto;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.45), 0 0 0 1px rgba(255, 255, 255, 0.08);
  transition: transform 220ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vx-brand:hover .vx-logo { transform: translateY(-1px) scale(1.04); }

.vx-brand-name {
  font-size: 17.5px;
  font-weight: 650;
  letter-spacing: -0.026em;
  color: #f3f5fd;
}

/* ---------- links ---------- */
.vx-links {
  display: flex;
  align-items: center;
  gap: 2px;
  margin-left: 4px;
}

.vx-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 15px;
  border-radius: 9px;
  border: 0;
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.008em;
  color: #939aae;
  text-decoration: none;
  white-space: nowrap;
  transition: color 170ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vx-ico {
  width: 16px;
  height: 16px;
  flex: 0 0 auto;
  opacity: 0.72;
  transition: opacity 170ms, color 170ms;
}

.vx-link:hover .vx-ico { opacity: 0.95; }
.vx-link.active .vx-ico { opacity: 1; color: #a78bfa; }

/* The crown is drawn a touch larger so its detail survives at this size. */
.vx-link .vx-ico-crown { width: 18px; height: 18px; }

.vx-link:hover { color: #f3f5fd; }

/* Active = white text + a short gradient underline. */
.vx-link.active { color: #fff; font-weight: 550; }

.vx-link.active::after {
  content: "";
  position: absolute;
  left: 15px;
  right: 15px;
  bottom: 4px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, #5b8cff, #8b5cf6);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}

/* ---------- right side ---------- */
.vx-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}

.vx-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 36px;
  padding: 0 13px;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.045);
  color: #f3f5fd;
  font-size: 13px;
  font-weight: 550;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background 180ms cubic-bezier(0.22, 1, 0.36, 1),
              border-color 180ms cubic-bezier(0.22, 1, 0.36, 1),
              transform 180ms cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 180ms cubic-bezier(0.22, 1, 0.36, 1);
}

.vx-btn:hover { background: rgba(255, 255, 255, 0.085); border-color: rgba(255, 255, 255, 0.2); }
.vx-btn:active { transform: translateY(1px); }
.vx-btn svg { width: 15px; height: 15px; flex: 0 0 auto; }

.vx-btn-invite {
  background: linear-gradient(135deg, #3b7bff 0%, #5b8cff 100%);
  border-color: transparent;
  color: #fff;
  box-shadow: 0 8px 22px rgba(91, 140, 255, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.24);
}

.vx-btn-invite:hover {
  border-color: transparent;
  transform: translateY(-1px);
  box-shadow: 0 12px 30px rgba(112, 108, 255, 0.44), inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* ---------- account ---------- */
.vx-account { position: relative; }

.vx-account-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 9px 0 4px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.045);
  color: #f3f5fd;
  font: inherit;
  font-size: 12.5px;
  font-weight: 550;
  cursor: pointer;
  transition: background 180ms, border-color 180ms;
}

.vx-account-btn:hover { background: rgba(255, 255, 255, 0.085); border-color: rgba(255, 255, 255, 0.2); }

.vx-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  background: #10141f;
  flex: 0 0 auto;
}

.vx-account-name {
  max-width: 108px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.vx-account-chevron { width: 13px; height: 13px; color: #616879; flex: 0 0 auto; }

.vx-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  min-width: 208px;
  padding: 6px;
  border-radius: 13px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: radial-gradient(120% 90% at 100% 0%, rgba(91, 140, 255, 0.14), transparent 62%), linear-gradient(180deg, #151c2c, #0a0e18);
  backdrop-filter: blur(18px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.06);
  z-index: 95;
}

.vx-menu[hidden] { display: none; }

.vx-menu-label {
  font-size: 9.5px;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #616879;
  padding: 7px 10px 6px;
}

.vx-menu a {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  color: #8d94a9;
  text-decoration: none;
  transition: background 150ms, color 150ms;
}

.vx-menu a:hover { background: rgba(255, 255, 255, 0.06); color: #f3f5fd; }
.vx-menu a svg { width: 15px; height: 15px; opacity: 0.75; }
.vx-menu .vx-danger:hover { background: rgba(255, 98, 111, 0.12); color: #ff8b95; }

/* ---------- mobile ---------- */
.vx-burger {
  display: none;
  width: 36px;
  height: 36px;
  place-items: center;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(255, 255, 255, 0.045);
  color: #f3f5fd;
  cursor: pointer;
}

.vx-burger svg { width: 17px; height: 17px; }

.vx-mobile {
  position: absolute;
  top: calc(100% + 10px);
  left: 0;
  right: 0;
  padding: 8px;
  border-radius: 15px;
  border: 1px solid rgba(255, 255, 255, 0.13);
  background: rgba(13, 17, 28, 0.985);
  backdrop-filter: blur(18px);
  box-shadow: 0 26px 60px rgba(0, 0, 0, 0.6);
  display: flex;
  flex-direction: column;
  gap: 2px;
  z-index: 95;
}

.vx-mobile[hidden] { display: none; }

.vx-mobile a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 10px;
  border-radius: 9px;
  font-size: 14px;
  color: #b9c0d2;
  text-decoration: none;
}

.vx-mobile a:hover, .vx-mobile a.active { background: rgba(255, 255, 255, 0.06); color: #fff; }
.vx-mobile svg { width: 16px; height: 16px; opacity: 0.7; }

@media (max-width: 980px) {
  .vx-nav { padding: 10px 14px 0; }
  .vx-nav-inner { height: 60px; gap: 10px; padding: 0 8px 0 12px; border-radius: 15px; }
  .vx-links { display: none; }
  .vx-burger { display: grid; }
  .vx-logo { width: 32px; height: 32px; border-radius: 9px; }
  .vx-brand-name { font-size: 16px; }
  .vx-btn-invite span { display: none; }
  .vx-btn-invite { padding: 0 11px; }
  .vx-account-name, .vx-account-chevron { display: none; }
  .vx-account-btn { padding: 0 4px; }
}

@media (max-width: 420px) {
  .vx-brand-name { display: none; }
}

/* ============================================================
   MOBILE NAV — profile matches login, burger centred with a label
   ============================================================ */
@media (max-width: 980px) {
  /* equal footprint for sign-in and profile */
  .vx-btn,
  .vx-account-btn {
    height: 36px;
    border-radius: 9px;
  }

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

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

  .vx-btn-invite {
    height: 36px;
  }

  /* the three lines sit dead centre and carry a label */
  .vx-burger {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto;
    min-width: 0;
    height: 34px;
    padding: 0 12px;
    border-radius: 9px;
    white-space: nowrap;
  }

  .vx-burger svg {
    flex: 0 0 auto;
  }
}

@media (max-width: 420px) {
  .vx-burger {
    padding: 0 9px;
    gap: 6px;
  }

  .vx-brand-name {
    font-size: 15px;
  }
}

/* ============================================================
   MOBILE NAV — name in the profile, centred button that fits
   ============================================================ */
@media (max-width: 980px) {
  /* the account chip can show the name, but never wider than sign-in */
  .vx-account-name {
    display: inline-block;
    max-width: 62px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 12px;
  }

  .vx-account-btn {
    width: auto;
    max-width: 128px;
    padding: 0 10px 0 4px;
    gap: 6px;
    flex: 0 1 auto;
  }

  .vx-account-chevron { display: none; }

  /* keep the centred button above the hero artwork */
  .vx-nav-inner { z-index: 4; }
  .vx-burger { z-index: 5; }
}

/* ============================================================
   MOBILE NAV — burger sits left of centre with a label + chevron
   ============================================================ */
@media (max-width: 980px) {
  .vx-burger {
    position: absolute;
    left: 38%;
    transform: translateX(-50%);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    width: auto;
    height: 36px;
    padding: 0 13px;
    border-radius: 9px;
    white-space: nowrap;
    z-index: 5;
  }

  .vx-burger-lines {
    flex: 0 0 auto;
    width: 16px;
    height: 16px;
    display: block;
  }

  .vx-burger-label {
    font-size: 12.5px;
    font-weight: 550;
    letter-spacing: 0.1px;
    line-height: 1;
  }

  .vx-nav-inner { z-index: 4; }
}
