.topbar{
display:flex;
justify-content:space-between;
align-items:center;
margin-bottom:40px;
}

.user-pill{
padding:12px 20px;
border-radius:30px;
background:rgba(56,189,248,.15);
}

.stats-grid{
display:grid;
grid-template-columns:repeat(auto-fit,minmax(240px,1fr));
gap:24px;
margin-bottom:50px;
}

.stat-card,
.module-card{
padding:32px;
border-radius:24px;
background:rgba(255,255,255,.05);
}

.network-panel{
padding:40px;
border-radius:28px;
background:rgba(255,255,255,.04);
margin-bottom:50px;
}

.module-grid{
display:grid;
}

.feature-panel{
display:none;
}

.feature-panel.active-panel{
display:block;
}

/* -------------------------
GENEALOGY TREE
--------------------------*/

.genealogy-tree{
padding:50px 20px;
text-align:center;
}

.tree-level{
display:flex;
justify-content:center;
align-items:center;
gap:60px;
}

.sponsor-level{
margin-bottom:40px;
}

.frontline-level{
margin-top:30px;
align-items:flex-start;
}

/* vertical connector */
.tree-connect{
width:4px;
height:50px;
margin:auto;
background:linear-gradient(
to bottom,
#38bdf8,
#6366f1
);
border-radius:8px;
}

/* nodes */
.tree-node{
width:78px;
height:78px;

border-radius:50%;

display:flex;
align-items:center;
justify-content:center;

font-weight:700;

background:linear-gradient(
135deg,
#38bdf8,
#6366f1
);

box-shadow:
0 0 20px rgba(56,189,248,.35),
0 0 40px rgba(99,102,241,.15);

transition:.3s;
}

.tree-node:hover{
transform:translateY(-4px) scale(1.03);
}

.tree-node.sponsor{
width:92px;
height:92px;
font-size:18px;
}

/* downline branches */
.tree-branch{
display:flex;
flex-direction:column;
align-items:center;
gap:22px;
position:relative;
}

/* small horizontal connector */
.tree-branch:before{
content:'';
position:absolute;
top:38px;
width:2px;
height:34px;
background:#38bdf8;
}

.subline{
margin-top:35px;
display:flex;
gap:20px;
}

.tree-node.mini{
width:58px;
height:58px;
font-size:13px;
background:linear-gradient(
135deg,
#34d399,
#38bdf8
);
}

.branch-children{
max-height:0;
overflow:hidden;
opacity:0;
transition:.35s ease;
}

.branch-children.expanded{
max-height:200px;
opacity:1;
margin-top:35px;
}

.expand-node{
cursor:pointer;
}
/* -------------------------
Network Metrics
--------------------------*/

.metrics-panel{
margin-top:50px;
padding:40px;
border-radius:30px;
background:rgba(255,255,255,.04);
}

.metrics-grid{
display:grid;
grid-template-columns:repeat(4,1fr);
gap:24px;
margin-top:30px;
}

.metric-card{
padding:28px;
border-radius:24px;
background:rgba(255,255,255,.05);
}

.metric-card h4{
margin-top:0;
font-size:14px;
color:#94a3b8;
}

.metric-value{
font-size:34px;
font-weight:700;
margin:15px 0;
}

.progress-bar{
height:12px;
border-radius:30px;
overflow:hidden;
background:rgba(255,255,255,.08);
}

.progress-fill{
height:100%;
border-radius:30px;
background:linear-gradient(
90deg,
#38bdf8,
#34d399
);
}

.p62{width:62%;}
.p40{width:40%;}
.p71{width:71%;}

.overall p{
margin-top:15px;
font-size:13px;
color:#94a3b8;
line-height:1.5;
}

/* -------------------------
Rank Progress
--------------------------*/

.rank-panel{
margin-top:50px;
padding:40px;
border-radius:30px;
background:rgba(255,255,255,.04);
}

.rank-grid{
display:grid;
grid-template-columns:repeat(4,1fr);
gap:24px;
margin-top:30px;
}

.rank-card{
padding:30px;
border-radius:24px;
background:rgba(255,255,255,.05);
}

.rank-card h4{
margin-top:0;
font-size:14px;
color:#94a3b8;
}

.rank-name{
font-size:36px;
font-weight:700;
margin:20px 0;
}

.rank-number{
font-size:34px;
font-weight:700;
margin:20px 0;
}

.p72{
width:72%;
}

.p80{
width:80%;
}

.coach-card p{
line-height:1.7;
color:#d1d5db;
}

@media(max-width:1200px){

.rank-grid{
grid-template-columns:repeat(2,1fr);
}

}

@media(max-width:1200px){

.metrics-grid{
grid-template-columns:repeat(2,1fr);
}
}
/* responsive */
@media(max-width:1000px){

.frontline-level{
flex-direction:column;
gap:50px;
}	
}