/*-------------------------------*/
/* SIDEBAR – DESKTOP */
/*-------------------------------*/

.sidebar {
    width: 240px; /* Sidebar wieder LINKS */
    background-color: #2f343a;
    color: white;
    padding: 1rem;
    height: calc(100vh - 60px);
    position: fixed; /* FIXIERT LINKS */
    top: 60px; /* unter deinem Header */
    left: 0;
    overflow-y: auto; /* SCROLLBAR */
    transition: width 0.3s ease, transform 0.3s ease;
    z-index: 2000;
}

    /* COLLAPSED MODE (DESKTOP) */
    .sidebar.collapsed {
        width: 60px;
    }
        .sidebar.collapsed .nav-item {
            display: none !important;
        }

/*-------------------------------*/
/* TOGGLE BUTTON */
/*-------------------------------*/
.toggle-btn {
    background: #1e88ff;
    border: none;
    border-radius: 50%;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 30px; /* GRÖSSER für Mobil + Desktop */
    line-height: 1; /* verhindert Verschiebung */
    color: white; /* WEISS erzwingen */

    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0,0,0,0.3);
    transition: background 0.15s ease, transform 0.15s ease;
    -webkit-tap-highlight-color: transparent; /* mobile fix */
}

    .toggle-btn:hover {
        background: #166cd1;
        transform: translateY(-2px);
    }

    .toggle-btn:active {
        transform: scale(0.92);
    }

/*-------------------------------*/
/* MOBILE OVERLAY */
/*-------------------------------*/
@media (max-width: 900px) {

    /* Standard: Sidebar komplett versteckt */
    .sidebar {
        display: none !important;
    }

        /* Wenn Mobile-Menü geöffnet -> Sidebar anzeigen */
        .sidebar.mobile-open {
            display: block !important;
            position: fixed;
            top: 60px;
            left: 0;
            width: 240px;
            height: calc(100vh - 60px);
            background-color: #2f343a;
            overflow-y: auto;
            z-index: 5000;
            padding: 1rem;
        }

        /* Sidebar-Collapse ist im Mobile-Modus irrelevant */
        .sidebar.collapsed {
            display: none !important;
            width: 0 !important;
        }

        /* Text im Mobile immer sichtbar */
        .sidebar .nav-item-text {
            display: inline !important;
        }
}
