/* ==========================================================================
   3. SIDEBAR (Premium Glassmorphism)
   ========================================================================== */
.side-header {
    position: fixed;
    top: 20px;
    left: 20px;
    bottom: 20px;
    width: 250px;
    background: rgba(13, 16, 23, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 25px 20px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: 15px 0 40px rgba(0, 0, 0, 0.6);
    z-index: 100;
}

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 25px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 15px;
}

.logo {
    width: 200px;
    height: 200px;
    filter: drop-shadow(0 0 8px #814DFC);
}

.logo-text {
    font-weight: 900;
    font-size: 18px;
    letter-spacing: 1.5px;
    background: linear-gradient(90deg, #FFF, #A880FF);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.side-header a:not(.btn-login) {
    display: flex;
    align-items: center;
    color: #8F95A3;
    border-radius: 10px;
    padding: 14px 18px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    animation: flyInLeft 1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.side-header a i {
    width: 24px;
    font-size: 16px;
    transition: transform 0.2s ease;
}

/* Gestaffelte Animationen */
.side-header a:nth-child(1) {
    animation-delay: 0.05s;
}

.side-header a:nth-child(2) {
    animation-delay: 0.10s;
}

.side-header a:nth-child(3) {
    animation-delay: 0.15s;
}

.side-header a:nth-child(4) {
    animation-delay: 0.20s;
}

.side-header a:nth-child(5) {
    animation-delay: 0.25s;
}

.side-header a:not(.btn-login):hover {
    color: #FFF;
    background: rgba(129, 77, 252, 0.15);
    transform: translateX(5px);
}

    .side-header a:not(.btn-login):hover i {
        transform: scale(1.15);
    }

.side-header a.active {
    color: #FFF;
    background: linear-gradient(90deg, rgba(129, 77, 252, 0.3) 0%, rgba(129, 77, 252, 0.05) 100%);
    border-left: 3px solid #814DFC;
    padding-left: 15px; /* Ausgleich für Border */
}

/* ==========================================================================
   SIDEBAR FILE-TREE DROPDOWNS
   ========================================================================== */

.nav-group {
    display: flex;
    flex-direction: column;
}

.nav-heading {
    display: flex;
    align-items: center;
    min-width: 0;
}

.tree-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 24px;
    width: 24px;
    height: 36px;
    padding: 0;
    border: none;
    outline: none;
    background: transparent;
    color: #8F95A3;
    cursor: pointer;
}

    .tree-toggle i {
        width: auto;
        font-size: 11px;
        transition: transform 0.2s ease;
    }

.nav-group.open > .nav-heading .tree-toggle i {
    transform: rotate(90deg);
}

.tree-children {
    display: none;
    flex-direction: column;
    position: relative;
    margin-left: 11px;
    padding-left: 20px;
}

    .tree-children::before {
        content: "";
        position: absolute;
        top: 0;
        bottom: 12px;
        left: 0;
        width: 1px;
        background: currentColor;
        opacity: 0.35;
    }

.nav-group.open > .tree-children {
    display: flex;
}

.side-header .tree-children a {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 32px;
    padding: 4px 0 4px 12px;
    border: none;
    border-radius: 0;
    background: transparent;
    color: #8F95A3;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    animation: none;
}

.tree-children a::before {
    content: "";
    position: absolute;
    left: 0;
    top: 50%;
    width: 9px;
    height: 1px;
    background: currentColor;
    opacity: 0.35;
}

.side-header .tree-children a:hover {
    color: #FFF;
    background: transparent;
    transform: translateX(3px);
}

.side-header .nav-heading .nav-parent {
    flex: 1;
    min-width: 0;
}

    .side-header .nav-heading .nav-parent:hover {
        color: #FFF;
        background: rgba(129, 77, 252, 0.15);
        transform: translateX(5px);
    }

    .side-header .nav-heading .nav-parent.active {
        color: #FFF;
        background: linear-gradient(90deg, rgba(129, 77, 252, 0.3) 0%, rgba(129, 77, 252, 0.05) 100%);
        border-left: 3px solid #814DFC;
        padding-left: 15px;
    }
