.home-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96) 0%, rgba(243, 247, 255, 0.98) 100%);
  border-bottom: 1px solid rgba(219, 228, 243, 0.9);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.05);
}

.home-topbar__inner {
  max-width: 1180px;
  margin: 0 auto;
  padding: 16px clamp(18px, 4vw, 44px);
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 26px;
}

.home-topbar__row {
  display: contents;
}

.home-brand {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
}

.home-nav {
  grid-column: 2;
  grid-row: 1;
  justify-self: center;
}

.home-user {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
}

.home-nav {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 14px;
  color: #6b7a94;
  justify-content: center;
}

.home-nav a {
  color: #526481;
  font-weight: 600;
  padding: 7px 16px;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.14);
  transition: background-color 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.home-nav a:hover {
  color: var(--home-primary-dark);
  background: rgba(42, 109, 245, 0.16);
  transform: translateY(-1px);
}

.home-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
}

.home-logo {
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: rgba(42, 109, 245, 0.16);
  display: grid;
  place-items: center;
}

.home-logo img {
  width: 24px;
  height: 24px;
  object-fit: contain;
}

.home-title {
  font-size: 18px;
  font-weight: 700;
  margin: 0;
  color: #53638e;
  letter-spacing: 0.2px;
}

.home-subtitle {
  display: none;
}

.home-user {
  width: 40px;
  height: 40px;
  border-radius: 14px;
  border: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(248, 250, 252, 0.92);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(71, 85, 105, 0.95);
  box-shadow: 0 10px 20px rgba(15, 23, 42, 0.08);
  transition: transform 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.home-user:hover {
  color: rgba(15, 23, 42, 0.8);
  background: rgba(42, 109, 245, 0.12);
  transform: translateY(-1px);
}

@media (max-width: 768px) {
  .home-brand,
  .home-nav,
  .home-user {
    grid-column: auto;
    justify-self: auto;
  }
  .home-topbar__inner {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 14px 16px 12px;
  }

  .home-topbar__row {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .home-nav {
    justify-content: flex-start;
    gap: 8px;
    font-size: 12px;
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 4px;
    -webkit-overflow-scrolling: touch;
  }

  .home-nav::-webkit-scrollbar {
    display: none;
  }

  .home-nav a {
    padding: 6px 12px;
    white-space: nowrap;
    background: rgba(148, 163, 184, 0.12);
    border: 1px solid rgba(148, 163, 184, 0.18);
  }

  .home-logo {
    width: 30px;
    height: 30px;
  }

  .home-logo img {
    width: 20px;
    height: 20px;
  }

  .home-title {
    font-size: 16px;
  }

  .home-user {
    width: 36px;
    height: 36px;
  }
}

@media (max-width: 480px) {
  .home-topbar__inner {
    padding: 12px 12px 8px;
  }

  .home-brand {
    gap: 10px;
  }

  .home-title {
    font-size: 15px;
  }

  .home-nav a {
    font-size: 11px;
    padding: 5px 10px;
  }

  .home-user {
    width: 34px;
    height: 34px;
  }
}
