.nav-header {
  margin-bottom: 22px;
}

.nav-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 18px 20px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-xl);
  background: var(--bg-surface);
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-soft);
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.brand-logo {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border-radius: 15px;
  color: var(--accent-primary);
  background: linear-gradient(180deg, rgba(69, 110, 245, 0.18), rgba(69, 110, 245, 0.07));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.brand-copy {
  display: grid;
  gap: 2px;
}

.brand-title {
  font-size: 1.55rem;
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--text-strong);
}

.brand-subtitle {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 1;
}

.nav-link {
  padding: 11px 16px;
  border-radius: 999px;
  font-weight: 600;
  color: var(--text-muted);
  transition: background-color 160ms ease, color 160ms ease, transform 160ms ease;
}

.nav-link:hover {
  color: var(--text-strong);
  background: rgba(255, 255, 255, 0.68);
}

.nav-link.is-active {
  color: var(--accent-primary);
  background: var(--accent-primary-soft);
}

.nav-user {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-icon-btn,
.nav-user-card {
  height: 48px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.8);
  box-shadow: var(--shadow-card);
}

.nav-icon-btn {
  width: 48px;
  display: grid;
  place-items: center;
  color: var(--text-base);
  cursor: pointer;
}

.nav-user-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 14px 0 10px;
}

.user-avatar {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(69, 110, 245, 0.18), rgba(69, 110, 245, 0.06));
  color: var(--accent-primary);
  font-weight: 800;
}

.user-info {
  display: grid;
}

.user-name {
  font-weight: 700;
  color: var(--text-strong);
}

.user-level {
  font-size: 0.82rem;
  color: var(--text-muted);
}

@media (max-width: 1080px) {
  .nav-container {
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 4px;
  }
}

@media (max-width: 680px) {
  .brand-subtitle,
  .nav-user-card {
    display: none;
  }

  .app-shell {
    width: min(var(--container), calc(100% - 20px));
    padding-top: 12px;
  }

  .nav-container {
    padding: 14px;
  }
}

@media (min-width: 900px) {
  .nav-header {
    margin-bottom: 12px;
  }

  .nav-container {
    min-height: 68px;
    padding: 10px 16px;
    border-radius: 20px;
  }

  .brand-logo {
    width: 38px;
    height: 38px;
    border-radius: 12px;
  }

  .brand-title {
    font-size: 1.3rem;
  }

  .brand-subtitle {
    font-size: 0.72rem;
  }

  .nav-link {
    padding: 8px 12px;
    font-size: 0.9rem;
  }

  .nav-icon-btn,
  .nav-user-card {
    height: 40px;
    border-radius: 13px;
  }

  .nav-icon-btn {
    width: 40px;
  }

  .nav-user-card {
    padding-right: 10px;
  }

  .user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 9px;
  }
}

body[data-theme="dark"] .nav-container,
body[data-theme="dark"] .nav-icon-btn,
body[data-theme="dark"] .nav-user-card,
body[data-theme="dark"] .nav-link:hover {
  background: rgba(27, 38, 57, 0.9);
}

.nav-icon-btn.is-muted {
  color: var(--text-muted);
  opacity: 0.62;
}
