.main-sidebar, .main-sidebar::before{
    width: 270px; 
}
.sidebar-mini.sidebar-collapse ul.nav-treeview,
.sidebar-mini.sidebar-collapse .logo .navbar-brand
{
    display: none !important
}
.sidebar-mini.sidebar-collapse .logo .hide{
    display: block !important
}

.sidebar-mini.sidebar-collapse .main-sidebar{
    width: 50px !important;
}
.sidebar-mini.sidebar-collapse .content-wrapper .content-header{
    margin-left: 51px;
}
.sidebar-mini.sidebar-collapse .content-wrapper .control-left-sidebar{
    left: 51px;
}

.sidebar-mini .content-wrapper .content-header{
    margin-left: inherit;
}
.sidebar-mini .content-wrapper .control-left-sidebar{
    left: 251px;
}

.main-sidebar{
    transition:transform 0.3s ease-in-out, width 0.3s ease-in-out;
}
.main-sidebar .logo{
    background: #fff;
    height: 40px;
}
.main-sidebar {
    /*    background-image: linear-gradient(180deg, #1b3357 10%, #000 100%);*/
    background-image: linear-gradient(180deg,  #031f4d 40%, #00000070 100%),url("/assets/images/background/leftAside.jpg");
}

.main-sidebar ul.nav-sidebar li.parentLink ul.nav-treeview {
    background: #fff !important;
    margin-left: 20px !important;
}
.main-sidebar li.parentLink ul.nav-treeview li > a {
    color: #000 !important;
}
.main-sidebar li.parentLink ul.nav-treeview li > a:hover {
    color: #0e3a77;
    font-weight: 600;
}
.nav-sidebar > .nav-item.menu-open > .nav-link{
    background-color: transparent !Important;
}

.main-sidebar ul.nav-sidebar li.parentLink.active > a {
    background-image: linear-gradient(90deg, #05225100 20%, #1765c894 100%);
    color: #fff;
    font-weight: bold;
}
.main-sidebar li.parentLink.active li.link.active > a {
    background-image: linear-gradient(90deg, #336bdd0a 20%, #4f83bba3 100%);
    color: #0e3a77;
    font-weight: 600;
}

/* ===== Overlay + Sidebar контейнер ===== */
#sidebar-root { position: fixed; inset: 0; z-index: 1040; pointer-events: none; }
#sidebar-overlay {
    position: absolute; inset: 0;
    background: rgba(0,0,0,.38);
    opacity: 0; transition: opacity .2s ease;
    pointer-events: none;
}
#sidebar-left {
    position: absolute; top: 0; left: 0;
    height: 100vh; width: 360px; max-width: 90vw;
    background: #0f172a; color: #e5e7eb;
    transform: translateX(-102%);
    transition: transform .28s cubic-bezier(.2,.7,.2,1);
    box-shadow: 6px 0 24px rgba(0,0,0,.25);
    display: flex; flex-direction: column;
}

/* Отворено състояние */
#sidebar-root.open { pointer-events: auto; }
#sidebar-root.open #sidebar-overlay { opacity: 1; pointer-events: auto; }
#sidebar-root.open #sidebar-left { transform: translateX(0); }

/* Забрана на скрол зад модала */
body.sidebar-open { overflow: hidden; }

/* ===== Header ===== */
.sidebar-header {
    display: flex; align-items: center; justify-content: space-between;
    padding: 14px 16px; border-bottom: 1px solid rgba(255,255,255,.06);
}
.sidebar-title { font-weight: 600; letter-spacing: .2px; }
#sidebar-close {
    border: 0; background: transparent; color: #e5e7eb;
    font-size: 20px; line-height: 1; padding: 6px 8px; cursor: pointer;
}
#sidebar-close:hover { color: #fff; }

/* ===== Content (скролиращо) ===== */
.sidebar-content { padding: 12px; overflow: auto; flex: 1 1 auto; }

/* Групови заглавия */
.sidebar-section { margin: 8px 0 14px; }
.sidebar-group-title{
    font-size: 12px; letter-spacing: .08em; font-weight: 700;
    text-transform: uppercase; color: #94a3b8;
    margin: 6px 6px 10px; padding-bottom: 6px;
    border-bottom: 1px solid rgba(255,255,255,.06);
}

/* ===== Landscape плочки ===== */
.app-row {
    display: flex; align-items: center;
    height: 24px; border-radius: 14px;
    text-decoration: none !important; 
    color: #e5e7eb;
    margin-bottom: 5px; 
    padding: 10px 12px;
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.06);
    transition: transform .16s ease, box-shadow .16s ease, background .16s ease, border-color .16s ease;
    position: relative; overflow: hidden;
}
.app-row:hover {
    transform: translateY(-2px);
    background: rgba(255,255,255,.06);
    border-color: rgba(255,255,255,.12);
}

/* икона вляво (цветен квадрат) */
.app-icon {
    width: 20px;  
    border-radius: 6px;
    display: grid;
    place-items: center;
    margin-right: 12px;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.4);
}
.app-icon i { font-size: 18px; color: #fff; }

/* текст вдясно */
.app-text {
    font-size: 14px; 
    line-height: 1.25;
    font-weight: 500; 
    color: #f3f4f6;
    white-space: nowrap; 
    overflow: hidden; 
    text-overflow: ellipsis;
}

/* Цветен glow при hover – според --accent-rgb */
.app-row { --accent-rgb: 99,102,241; }
.app-row:hover {
    box-shadow:
        0 0 0 2px rgba(var(--accent-rgb), .25),
        0 8px 22px rgba(var(--accent-rgb), .35),
        0 18px 46px rgba(var(--accent-rgb), .28);
}

/* Цветни градиенти за .app-icon + задаване на --accent-rgb */
.app-row.g1 .app-icon { background-image: linear-gradient(135deg,#60a5fa,#2563eb); } .app-row.g1 { --accent-rgb: 37,99,235; }
.app-row.g2 .app-icon { background-image: linear-gradient(135deg,#a78bfa,#7c3aed); } .app-row.g2 { --accent-rgb: 124,58,237; }
.app-row.g3 .app-icon { background-image: linear-gradient(135deg,#fb7185,#ef4444); } .app-row.g3 { --accent-rgb: 239,68,68; }
.app-row.g4 .app-icon { background-image: linear-gradient(135deg,#f59e0b,#d97706); } .app-row.g4 { --accent-rgb: 217,119,6; }
.app-row.g5 .app-icon { background-image: linear-gradient(135deg,#34d399,#059669); } .app-row.g5 { --accent-rgb: 5,150,105; }
.app-row.g6 .app-icon { background-image: linear-gradient(135deg,#22d3ee,#0ea5e9); } .app-row.g6 { --accent-rgb: 14,165,233; }
.app-row.g7 .app-icon { background-image: linear-gradient(135deg,#f472b6,#db2777); } .app-row.g7 { --accent-rgb: 219,39,119; }
.app-row.g8 .app-icon { background-image: linear-gradient(135deg,#93c5fd,#6366f1); } .app-row.g8 { --accent-rgb: 99,102,241; }

/* Малки екрани */
@media (max-width: 575.98px){
    .app-row { height: 58px; }
    .app-icon { width: 38px; height: 38px; margin-right: 10px; }
    .app-text { font-size: 13.5px; }
}
