[Tex/LaTex] tikz dash rectangle in nest nodes

nodestikz-pgf

I want to use dash rectangle in outer node but use solid rectangle in inner nodes.
But my sample code below actually dashed all node for inner or outer nodes.

\documentclass[tikz]{standalone}

\begin{document}

\begin{tikzpicture}[
  inner/.style={draw,fill=blue!5,thick,inner sep=3pt,minimum width=8em},
  outer/.style={draw=gray,dashed,fill=green!1,thick,inner sep=5pt}
  ]
%---------------------------------------------------%
\node[outer] (A) {
    \begin{tikzpicture}[node distance=1cm,outer sep = 0pt]
      \node [inner,minimum width=18em] (A1) {Mr. A};
      \node [inner,anchor=south west,minimum width=8em] (A2) at ([yshift=1em]A1.north west) {Mr. A1};
      \node [inner,anchor=south east,minimum width=8em] (A3) at ([yshift=1em]A1.north east) {Mr. A2};
      \node (text) [anchor=north] at ([yshift=4em]A1.north) {Hello Tikz};
    \end{tikzpicture}
}; 
\end{tikzpicture}

\end{document} 

The output looks like below:

enter image description here

I only use dashed on outer style but actually inner nodes has got such attribute also! I don't want that!

Best Answer

Using fit and backgrounds for avoiding nested tikzpicture. The Zarko's answer is easier than mine but i wanted to illustrate this option. It can be useful in other contexts.

\documentclass[tikz]{standalone}
\usetikzlibrary{fit,backgrounds} % <- added
\begin{document}

\begin{tikzpicture}[
  inner/.style={draw,fill=blue!5,thick,inner sep=3pt,minimum width=8em},
  outer/.style={draw=gray,dashed,fill=green!1,thick,inner sep=5pt}
  ]
%---------------------------------------------------%
  \node [inner,minimum width=18em] (A1) {Mr. A};
  \node [inner,anchor=south west,minimum width=8em] (A2) at ([yshift=1em]A1.north west) {Mr. A1};
  \node [inner,anchor=south east,minimum width=8em] (A3) at ([yshift=1em]A1.north east) {Mr. A2};
  \node (text) [anchor=north] at ([yshift=4em]A1.north) {Hello Tikz};
\begin{pgfonlayer}{background}
\node[outer,fit=(A1) (A2) (A3) (text)] (A) {};
\end{pgfonlayer}
\end{tikzpicture}

\end{document} 

The result is the same.