:root{
    --primary:#e33434;
    --primary2:#991b1b;
    --primaryGlow:rgba(227,52,52,.35);

    --bg:#070707;
    --bg2:#111111;

    --panel:#121212;
    --panel2:#181818;

    --border:rgba(255,255,255,.08);
    --border2:rgba(227,52,52,.22);

    --text:#ffffff;
    --muted:rgba(255,255,255,.6);

    --success:#4ade80;
    --warning:#ffb547;
    --danger:#ff6363;
}

*{
    margin:0;
    padding:0;
    box-sizing:border-box;
}

html,
body{
    width:100%;
    height:100%;
    overflow:hidden;
    font-family:Inter,Arial,sans-serif;
}

body{
    color:var(--text);
    background:
        radial-gradient(circle at top right, rgba(227,52,52,.12), transparent 28%),
        radial-gradient(circle at bottom left, rgba(227,52,52,.06), transparent 24%),
        linear-gradient(135deg,var(--bg),var(--bg2));
}

.app-shell{
    width:100%;
    height:100%;
    display:flex;
    gap:16px;
    padding:18px;
}

.sidebar{
    width:270px;
    min-width:270px;
    height:100%;
    border-radius:20px;
    background:linear-gradient(180deg,var(--panel),var(--panel2));
    border:1px solid var(--border);
    padding:14px;
    display:flex;
    flex-direction:column;
    gap:18px;
    box-shadow:0 20px 50px rgba(0,0,0,.35);
}

.brand-card{
    width:100%;
    border-radius:18px;
    background:linear-gradient(180deg,rgba(227,52,52,.12),rgba(255,255,255,.02));
    border:1px solid var(--border2);
    padding:12px;
}

.brand-top{
    display:flex;
    align-items:center;
    gap:12px;
}

.brand-logo{
    width:52px;
    height:52px;
    border-radius:14px;
    object-fit:cover;
}

.brand-title{
    font-size:18px;
    font-weight:800;
}

.brand-subtitle{
    margin-top:4px;
    font-size:11px;
    line-height:1.4;
    color:var(--muted);
}

.nav-group{
    display:flex;
    flex-direction:column;
    gap:8px;
}

.nav-label{
    font-size:11px;
    letter-spacing:1px;
    color:var(--muted);
    margin:6px 4px;
}

.nav-item{
    width:100%;
    height:44px;
    border-radius:14px;
    padding:0 14px;
    display:flex;
    align-items:center;
    gap:12px;
    cursor:pointer;
    transition:.18s ease;
    color:rgba(255,255,255,.85);
    border:1px solid transparent;
}

.nav-item:hover{
    background:rgba(255,255,255,.04);
}

.nav-item.active{
    background:linear-gradient(90deg,rgba(227,52,52,.22),rgba(227,52,52,.06));
    border:1px solid rgba(227,52,52,.35);
    box-shadow:0 0 18px rgba(227,52,52,.12);
}

.nav-icon{
    width:20px;
    text-align:center;
}

.main-content{
    flex:1;
    height:100%;
    min-width:0;
    overflow:hidden;
}

#page-container{
    width:100%;
    height:100%;
}

.page{
    display:none;
    width:100%;
    height:100%;
    overflow-y:auto;
    overflow-x:hidden;
    padding-right:4px;
}

.page::-webkit-scrollbar{
    width:6px;
}

.page::-webkit-scrollbar-thumb{
    background:rgba(255,255,255,.10);
    border-radius:999px;
}

.PageContent{
    padding:4px;
    display:flex;
    flex-direction:column;
    gap:18px;
}
@media(max-width:860px){
    html,
    body{
        overflow:auto;
        height:auto;
        min-height:100%;
    }

    .app-shell{
        min-height:100vh;
        height:auto;
        flex-direction:column;
        padding:12px;
        gap:12px;
    }

    .sidebar{
        width:100%;
        min-width:0;
        height:auto;
        border-radius:18px;
        padding:12px;
        gap:12px;
    }

    .brand-card{
        padding:10px;
    }

    .brand-logo{
        width:46px;
        height:46px;
    }

    .nav-group{
        gap:6px;
    }

    #sidebar-nav{
        display:grid;
        grid-template-columns:repeat(3,1fr);
        gap:8px;
    }

    .nav-item{
        height:42px;
        justify-content:center;
        padding:0 10px;
    }

    .nav-icon{
        width:auto;
    }

    .main-content,
    #page-container,
    .page{
        height:auto;
        min-height:0;
        overflow:visible;
    }

    .page{
        padding-right:0;
    }
}

@media(max-width:520px){
    .app-shell{
        padding:9px;
    }

    .brand-top{
        align-items:flex-start;
    }

    .brand-title{
        font-size:16px;
    }

    .brand-subtitle{
        font-size:10px;
    }

    #sidebar-nav{
        grid-template-columns:1fr;
    }

    .nav-item{
        justify-content:flex-start;
    }

    .PageTitle{
        font-size:23px;
    }
}
