/* Navbar canônica da aplicação autenticada e das páginas públicas do shell. */
:root {
  --hd-green-ink: oklch(0.18 0.044 154);
  --hd-green-deep: oklch(0.24 0.058 154);
  --hd-gold: oklch(0.78 0.120 84);
  --hd-nav-height: 72px;
  --hd-page-x: clamp(16px, 2vw, 28px);
}

.home-app-nav {
  position: fixed;
  inset: 0 0 auto;
  z-index: 1000;
  height: var(--hd-nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 0 var(--hd-page-x);
  background: linear-gradient(90deg, var(--hd-green-ink), var(--hd-green-deep));
  border-bottom: 1px solid oklch(0.90 0.024 152 / 0.14);
  box-shadow: 0 4px 8px oklch(0.16 0.040 154 / 0.14);
  font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
}

.home-app-brand,
.home-app-user,
.home-app-nav__link,
.home-app-nav__mentor {
  min-height: 44px;
}

.home-app-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  color: #fff;
  text-decoration: none;
}

.home-app-brand__mark {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: oklch(0.97 0.018 152 / 0.12);
  border: 1px solid oklch(0.96 0.020 152 / 0.18);
  color: oklch(0.89 0.080 152);
}

.home-app-brand__mark img {
  width: 24px;
  height: 24px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.9;
}

.home-app-brand__copy {
  display: grid;
  line-height: 1.1;
}

.home-app-brand__name {
  font-size: 0.96rem;
  font-weight: 780;
}

.home-app-brand__name span {
  color: oklch(0.78 0.15 152);
}

.home-app-brand__meta {
  margin-top: 2px;
  color: oklch(0.88 0.020 152 / 0.72);
  font-size: 0.76rem;
  font-weight: 600;
}

.home-app-nav__center,
.home-app-nav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.home-app-nav__center {
  flex: 1;
  justify-content: center;
}

.home-app-nav__divider {
  width: 1px;
  height: 32px;
  background: oklch(0.95 0.018 152 / 0.20);
}

.home-app-user-menu {
  position: relative;
}

.home-app-nav__link,
.home-app-nav__mentor {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 999px;
  padding: 0 14px;
  color: oklch(0.92 0.018 152);
  text-decoration: none;
  font-size: 0.86rem;
  font-weight: 700;
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.home-app-nav__link:hover,
.home-app-nav__mentor:hover,
.home-app-nav__link.is-current {
  background: oklch(0.96 0.024 152 / 0.14);
  color: #fff;
}

.home-app-nav__mentor span {
  display: inline-grid;
  place-items: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  padding: 0 7px;
  background: var(--hd-gold);
  color: var(--hd-green-deep);
  font-size: 0.72rem;
  font-weight: 850;
}

.home-app-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  padding: 5px 6px 5px 14px;
  background: oklch(0.98 0.018 152 / 0.12);
  border: 1px solid oklch(0.96 0.024 152 / 0.14);
  color: #fff;
  text-decoration: none;
  cursor: pointer;
  font: inherit;
}

.home-app-user__text {
  display: grid;
  line-height: 1.1;
  text-align: right;
}

.home-app-user__text strong {
  max-width: 140px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.84rem;
  font-weight: 800;
}

.home-app-user__text small {
  margin-top: 2px;
  color: oklch(0.88 0.018 152 / 0.72);
  font-size: 0.72rem;
  font-weight: 600;
}

.home-app-user__avatar {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: oklch(0.93 0.030 152);
  color: var(--hd-green-deep);
  font-size: 0.95rem;
  font-weight: 850;
}

.home-app-user__avatar img {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
}

.home-app-user__dropdown {
  right: 0;
  left: auto;
  border-radius: 12px;
}

.home-app-nav :where(a, button):focus-visible {
  outline: 3px solid oklch(0.74 0.130 152 / 0.62);
  outline-offset: 3px;
}

@media (min-width: 1200px) {
  .home-app-nav {
    inset: 0 0 auto;
    width: 100%;
    height: var(--hd-nav-height);
    transform: none;
    padding: 0 clamp(18px, 2.8vw, 42px);
    border: 0;
    border-bottom: 1px solid oklch(0.62 0.10 152 / 0.18);
    border-radius: 0;
    background:
      radial-gradient(120% 180% at 88% -40%, oklch(0.62 0.155 152 / 0.14), transparent 60%),
      linear-gradient(180deg, oklch(0.165 0.028 158 / 0.94) 0%, oklch(0.135 0.022 158 / 0.92) 100%);
    box-shadow: 0 1px 0 oklch(1 0 0 / 0.08) inset, 0 12px 34px oklch(0.135 0.022 158 / 0.4);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
  }

  .home-app-brand,
  .home-app-user {
    color: #fff;
  }

  .home-app-brand__mark {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(235, 249, 241, 0.24), rgba(214, 240, 226, 0.1));
    border-color: rgba(230, 247, 238, 0.24);
    box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.24), 0 6px 14px rgba(0, 0, 0, 0.12);
  }

  .home-app-brand__mark img {
    width: 36px;
    height: 36px;
    opacity: 1;
  }

  .home-app-nav__link {
    color: oklch(0.92 0.018 152);
    background: linear-gradient(135deg, rgba(240, 251, 245, 0.12), rgba(214, 240, 226, 0.08));
    border: 1px solid rgba(214, 240, 226, 0.2);
    box-shadow: 0 8px 18px rgba(7, 24, 17, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  .home-app-nav__link:hover,
  .home-app-nav__link.is-current {
    background: linear-gradient(135deg, rgba(240, 251, 245, 0.18), rgba(214, 240, 226, 0.12));
    border-color: rgba(214, 240, 226, 0.32);
    color: #fff;
    transform: translateY(-1px);
  }

  .home-app-user {
    background: linear-gradient(135deg, rgba(240, 251, 245, 0.12), rgba(214, 240, 226, 0.08));
    border-color: rgba(214, 240, 226, 0.2);
    box-shadow: 0 8px 18px rgba(7, 24, 17, 0.16);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }
}

@media (max-width: 1199px) {
  .home-app-nav__center {
    display: none;
  }
}

@media (max-width: 767px) {
  :root {
    --hd-nav-height: 64px;
    --navbar-height: 64px;
  }

  .home-app-nav {
    padding-inline: 12px;
  }

  .home-app-brand__meta,
  .home-app-user__text,
  .home-app-nav__mentor,
  .home-app-nav__link,
  .home-app-nav__divider {
    display: none;
  }

  .home-app-brand__name {
    max-width: 160px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  .home-app-nav *,
  .home-app-nav *::before,
  .home-app-nav *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
