*{box-sizing:border-box}

:root{
--bg:#07111f;
--bg2:#0d1a31;
--panel:rgba(255,255,255,.08);
--panel2:rgba(255,255,255,.11);
--stroke:rgba(255,255,255,.10);

--text:#eef4ff;
--muted:#9fb0d1;

--blue:#53a6ff;
--cyan:#62f3ff;
--violet:#8b7bff;
--green:#38d39f;
--gold:#ffd166;
--pink:#ff6ad5;
--danger:#ff7b94;

--shadow:0 20px 60px rgba(0,0,0,.35);

--radius:28px;
}

html,body{min-height:100%}

body{
margin:0;
color:var(--text);
font-family:Inter,system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;

background:
radial-gradient(circle at top left, rgba(83,166,255,.22), transparent 26%),
radial-gradient(circle at top right, rgba(139,123,255,.20), transparent 24%),
radial-gradient(circle at bottom center, rgba(56,211,159,.15), transparent 30%),
linear-gradient(135deg,var(--bg) 0%,var(--bg2) 55%,#08101b 100%);

overflow-x:hidden;
}

body.menu-open{
overflow:hidden;
}

a{text-decoration:none;color:inherit}

button{font:inherit}


/* glow background */

.glow,.glow2,.glow3{
position:fixed;
border-radius:50%;
filter:blur(82px);
opacity:.34;
pointer-events:none;
z-index:0;
}

.glow{width:260px;height:260px;background:#2f6bff;top:60px;left:20px}
.glow2{width:300px;height:300px;background:#7b61ff;top:90px;right:40px}
.glow3{width:280px;height:280px;background:#2ce3c7;bottom:20px;left:40%}


/* layout */

.appShell{
position:relative;
z-index:1;
display:grid;
grid-template-columns:290px minmax(0,1fr);
min-height:100vh;
}

/* modalità senza sidebar */

.appShell.noSidebar{
display:flex;
align-items:center;
justify-content:center;
min-height:100vh;
}

.appShell.noSidebar .mainWrap{
width:100%;
max-width:880px;
padding:20px;
}


/* sidebar */

.sidebar{
padding:26px 18px;
background:linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
border-right:1px solid rgba(255,255,255,.08);
backdrop-filter:blur(18px);

display:flex;
flex-direction:column;
justify-content:space-between;
}

.sidebarInner{
display:flex;
flex-direction:column;
gap:18px;
min-height:100%;
}

.mobileMenuHead{
display:none;
align-items:center;
justify-content:space-between;
gap:12px;
padding:4px 8px 2px;
}

.mobileMenuTitle{
font-size:12px;
font-weight:1000;
letter-spacing:.08em;
text-transform:uppercase;
color:#88a0c8;
}

.mobileMenuClose{
display:inline-flex;
align-items:center;
justify-content:center;
padding:10px 12px;
border-radius:14px;
border:1px solid rgba(255,255,255,.10);
background:rgba(255,255,255,.06);
color:var(--text);
font-weight:900;
cursor:pointer;
}

.brand{
display:flex;
align-items:center;
gap:14px;
padding:8px 10px 20px;
border-bottom:1px solid rgba(255,255,255,.08);
margin-bottom:24px;
}

.brandLogoWrap{
width:52px;
height:52px;
border-radius:18px;
background:linear-gradient(135deg,var(--cyan),var(--blue),var(--violet));
box-shadow:0 12px 34px rgba(83,166,255,.34);
display:flex;
align-items:center;
justify-content:center;
padding:10px;
}

.brandLogoWrap img{
max-width:100%;
max-height:100%;
filter:brightness(0) invert(1);
}

.brandTitle{
font-size:20px;
font-weight:900;
}

.brandSub{
font-size:12px;
color:var(--muted);
}


/* menu */

.group{margin-bottom:20px}

.groupTitle{
font-size:11px;
text-transform:uppercase;
letter-spacing:1.4px;
color:#88a0c8;
margin:0 12px 10px;
}

.menu a{
display:flex;
align-items:center;
gap:12px;

color:#dce7ff;

padding:14px 14px;

border-radius:18px;

margin-bottom:8px;

transition:.25s;
}

.menu a > span:first-child{
width:32px;
height:32px;
border-radius:12px;
display:inline-flex;
align-items:center;
justify-content:center;
background:rgba(255,255,255,.05);
border:1px solid rgba(255,255,255,.06);
font-size:12px;
font-weight:1000;
flex:0 0 auto;
}

.menu a:hover{
background:rgba(255,255,255,.06);
transform:translateX(2px);
}

.menu a.active{
background:linear-gradient(135deg, rgba(83,166,255,.18), rgba(98,243,255,.09));
border:1px solid rgba(98,243,255,.18);
font-weight:800;
}

.menu a.active > span:first-child{
background:linear-gradient(135deg, rgba(83,166,255,.24), rgba(98,243,255,.16));
border-color:rgba(98,243,255,.20);
}


/* user box */

.userBox{
background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
border:1px solid rgba(255,255,255,.10);
border-radius:24px;
padding:18px;
box-shadow:var(--shadow);
}

.userTop{
display:flex;
gap:12px;
align-items:center;
margin-bottom:14px;
}

.avatar{
width:54px;
height:54px;
border-radius:18px;
background:linear-gradient(135deg,var(--gold),#ff9f43);
display:flex;
align-items:center;
justify-content:center;
font-size:20px;
font-weight:1000;
color:#1a1200;
}

.userName{font-weight:900}

.userRole{
font-size:12px;
color:var(--muted);
margin-top:3px;
}

.userStats{
display:grid;
grid-template-columns:1fr 1fr;
gap:10px;
}

.miniStat{
padding:12px;
border-radius:16px;
background:rgba(255,255,255,.06);
border:1px solid rgba(255,255,255,.06);
}

.miniStat b{
display:block;
font-size:18px;
margin-bottom:4px;
}

.miniStat span{
font-size:11px;
color:var(--muted);
}


/* main */

.mainWrap{
min-width:0;
padding:24px;
display:flex;
flex-direction:column;
}

.pageContent{
width:min(1180px,100%);
margin:0 auto;
}


/* topbar */

.topbar{
display:flex;
justify-content:space-between;
align-items:center;
gap:16px;

margin-bottom:24px;

padding:18px 20px;

border-radius:24px;

background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));

border:1px solid rgba(255,255,255,.08);

backdrop-filter:blur(16px);

box-shadow:var(--shadow);
position:sticky;
top:16px;
z-index:18;
}

.topbarLeft{
display:flex;
align-items:center;
gap:14px;
}

.topbar h1{
margin:0 0 6px;
font-size:30px;
}

.topbar p{
margin:0;
color:var(--muted);
font-size:14px;
}


/* buttons */

.btn,.softBtn,.cta{
display:inline-flex;
align-items:center;
justify-content:center;

padding:13px 16px;

border-radius:18px;

background:rgba(255,255,255,.06);

border:1px solid rgba(255,255,255,.08);

color:var(--text);

font-weight:850;

cursor:pointer;

transition:.2s;
}

.btn:hover,
.softBtn:hover,
.cta:hover{
transform:translateY(-1px);
}

.cta{
background:linear-gradient(135deg,var(--cyan),var(--blue));
color:#07111f;
border:none;
box-shadow:0 14px 32px rgba(83,166,255,.28);
}

.logoutBtn{
background:linear-gradient(135deg,#ffb347,#ff7b94);
color:#1a1200;
border:none;
}

.hamburger{
min-width:46px;
height:46px;
border-radius:16px;
border:1px solid rgba(255,255,255,.10);
background:rgba(255,255,255,.08);
color:var(--text);
display:none;
align-items:center;
justify-content:center;
gap:10px;
cursor:pointer;
box-shadow:0 14px 30px rgba(0,0,0,.16);
padding:0 14px;
}

.hamburgerLines{
display:inline-flex;
flex-direction:column;
gap:4px;
}

.hamburgerLines span{
display:block;
width:16px;
height:2px;
border-radius:999px;
background:currentColor;
}

.hamburgerText{
font-size:12px;
font-weight:1000;
letter-spacing:.04em;
text-transform:uppercase;
}

.sidebarOverlay{
position:fixed;
inset:0;
background:rgba(3,10,22,.52);
backdrop-filter:blur(6px);
opacity:0;
pointer-events:none;
transition:opacity .24s ease;
z-index:24;
}

.mobileDock{
display:none;
}


/* hero */

.hero{
display:flex;
gap:16px;
align-items:center;

margin:0 0 18px;

padding:24px 26px;

border-radius:var(--radius);

background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));

border:1px solid rgba(255,255,255,.09);

box-shadow:var(--shadow);
}

.heroLogo{
width:260px;
max-width:32vw;
}

.heroTitle{
margin:0;
font-size:2rem;
font-weight:1100;
}

.heroSub{
margin:10px 0 0;
color:var(--muted);
font-weight:800;
font-size:.98rem;
}


/* card */

.card{
background:linear-gradient(180deg, rgba(255,255,255,.10), rgba(255,255,255,.05));
border:1px solid rgba(255,255,255,.09);
border-radius:var(--radius);
box-shadow:var(--shadow);
backdrop-filter:blur(16px);
padding:22px;
margin-bottom:18px;
}


/* grid */

.grid2{
display:grid;
grid-template-columns:1fr 1fr;
gap:14px;
margin-bottom:18px;
}


/* alert */

.alert.err{
padding:16px 18px;
border-radius:22px;
background:rgba(255,123,148,.12);
border:1px solid rgba(255,123,148,.20);
color:#ffd7df;
font-weight:900;
margin-bottom:18px;
}


/* responsive */

@media(max-width:1100px){

.appShell{
grid-template-columns:1fr;
}

.sidebar{
position:fixed;
top:0;
left:0;
bottom:0;
width:290px;
transform:translateX(-100%);
z-index:30;
transition:transform .24s ease;
overflow:auto;
}

.appShell.menu-open .sidebar{
transform:translateX(0);
}

.appShell.menu-open{
overflow:hidden;
}

.appShell.menu-open .sidebarOverlay{
opacity:1;
pointer-events:auto;
}

.mainWrap{
padding:16px;
}

.pageContent{
width:100%;
}

.hamburger{
display:inline-flex;
}

.topbar{
top:12px;
}

}

@media(max-width:860px){

.grid2{
grid-template-columns:1fr;
}

}

@media(max-width:780px){

.hero{
flex-direction:column;
text-align:center;
}

.heroLogo{
width:220px;
max-width:70vw;
}

.heroTitle{
font-size:1.7rem;
}

}

@media(max-width:640px){

body{
padding-bottom:96px;
}

.mainWrap{
padding:12px;
}

.pageContent{
width:100%;
}

.topbar{
padding:14px;
margin-bottom:14px;
border-radius:20px;
top:10px;
}

.topbarLeft{
width:100%;
align-items:flex-start;
}

.topbarTitles{
min-width:0;
}

.topbar h1{
font-size:1.35rem;
line-height:1.08;
}

.topbar p{
font-size:.92rem;
line-height:1.45;
}

.rightTools{
display:none;
}

.sidebar{
width:min(320px,86vw);
padding:18px 14px calc(24px + env(safe-area-inset-bottom));
justify-content:flex-start;
}

.mobileMenuHead{
display:flex;
}

.brand{
padding:4px 8px 16px;
margin-bottom:18px;
}

.brandTitle{
font-size:18px;
}

.brandSub{
font-size:11px;
}

.menu a{
padding:12px;
margin-bottom:6px;
border-radius:16px;
}

.menu a > span:first-child{
width:34px;
height:34px;
border-radius:12px;
}

.menu a span:last-child{
font-size:.92rem;
font-weight:900;
}

.userBox{
padding:14px;
border-radius:20px;
}

.mobileDock{
position:fixed;
left:12px;
right:12px;
bottom:calc(10px + env(safe-area-inset-bottom));
display:grid;
grid-template-columns:repeat(5,minmax(0,1fr));
gap:8px;
padding:8px;
border-radius:24px;
background:linear-gradient(180deg, rgba(10,21,39,.95), rgba(13,26,49,.95));
border:1px solid rgba(255,255,255,.10);
box-shadow:0 22px 42px rgba(0,0,0,.35);
backdrop-filter:blur(18px);
z-index:35;
}

.dockLink,
.dockMenuBtn{
min-width:0;
display:flex;
flex-direction:column;
align-items:center;
justify-content:center;
gap:5px;
padding:10px 6px;
border-radius:18px;
background:transparent;
border:1px solid transparent;
color:#dce7ff;
font:inherit;
cursor:pointer;
}

.dockLink.active,
.dockMenuBtn:active{
background:linear-gradient(135deg, rgba(83,166,255,.18), rgba(98,243,255,.10));
border-color:rgba(98,243,255,.20);
}

.dockIcon{
font-size:11px;
line-height:1;
font-weight:1000;
}

.dockLabel{
min-width:0;
max-width:100%;
font-size:9px;
line-height:1.1;
font-weight:900;
text-align:center;
overflow:hidden;
text-overflow:ellipsis;
white-space:nowrap;
}

.sidebarOverlay{
z-index:29;
}
}
