/* =========================================================
   LANDLORD LITE – GEMEINSAME SIDEBAR
   ========================================================= */

/* ===== DESKTOP ===== */

.sidebar {
    position: fixed;
    top: 0;
    left: 0;

    width: 260px;
    height: 100vh;

    padding: 24px 20px;
    box-sizing: border-box;

    background: linear-gradient(180deg, #238b32 0%, #126622 100%);
    color: white;

    display: flex;
    flex-direction: column;

    overflow-y: auto;
    overflow-x: hidden;

    z-index: 1000;
}

/* Rechter Inhalt scrollt, Sidebar bleibt stehen */
.main {
    margin-left: 260px !important;
    min-height: 100vh;
    box-sizing: border-box;
}


/* ===== LOGO ===== */

.brand-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.brand-name {
    color: white;
    font-size: 24px;
    font-weight: 700;
}

.sidebar-subtitle {
    color: rgba(255, 255, 255, 0.78);
    font-size: 14px;
    margin-bottom: 24px;
}


/* ===== NAVIGATION ===== */

.sidebar a {
    color: white;
    text-decoration: none;
}

.nav-item,
.bottom-link {
    width: 100%;
    min-height: 44px;

    display: flex;
    align-items: center;
    gap: 10px;

    padding: 10px 12px;
    box-sizing: border-box;

    border-radius: 10px;

    color: white;
    text-decoration: none;

    transition: background 0.2s ease;
}

.nav-item:hover,
.bottom-link:hover,
.submenu a:hover {
    background: rgba(255, 255, 255, 0.10);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.14);
}


/* ===== UNTERMENÜ ===== */

.submenu {
    margin-top: 4px;
    margin-bottom: 8px;
}

.submenu a {
    display: flex;
    align-items: center;
    gap: 8px;

    padding: 8px 12px;
    box-sizing: border-box;

    border-radius: 8px;

    color: white;
    text-decoration: none;
}


/* =========================================================
   SUPPORT + KONTOEINSTELLUNGEN
   ========================================================= */

/* Wird von sidebar.js erzeugt, falls auf der Seite nicht vorhanden */
.sidebar-bottom {
    width: 100%;

    margin-top: auto !important;
    padding-top: 18px;
    padding-bottom: 6px;

    box-sizing: border-box;
}

.sidebar-bottom .bottom-link {
    display: flex;
    align-items: center;
    gap: 10px;

    width: 100%;
    min-height: 42px;

    padding: 8px 10px;
    margin-top: 4px;

    color: white !important;
    text-decoration: none !important;

    border-radius: 10px;
}


/* ===== MOBILE ELEMENTE AUF DESKTOP VERSTECKEN ===== */

.mobile-menu-btn,
.sidebar-overlay {
    display: none;
}


/* =========================================================
   HANDY
   ========================================================= */

@media (max-width: 768px) {

    body {
        margin-left: 0 !important;
        padding-left: 0 !important;
    }

    /* Inhalt nutzt komplette Breite */
    .main {
        width: 100% !important;
        max-width: 100% !important;

        margin-left: 0 !important;

        box-sizing: border-box;
    }


    /* ===== AUSFAHRBARE SIDEBAR ===== */

    .sidebar {
        position: fixed !important;

        top: 0 !important;
        left: 0 !important;

        width: min(82vw, 300px) !important;

        height: 100dvh !important;
        min-height: 100dvh !important;

        margin: 0 !important;
        padding: 22px 18px;

        display: flex !important;
        flex-direction: column !important;

        overflow-y: auto;
        overflow-x: hidden;

        transform: translateX(-105%);
        transition: transform 0.25s ease;

        z-index: 9001 !important;

        box-shadow: 8px 0 30px rgba(0, 0, 0, 0.22);
    }

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


    /* Support + Konto bleiben unten */
    .sidebar-bottom {
        margin-top: auto !important;
        padding-top: 18px;
        padding-bottom: 18px;
    }


    /* ===== DUNKLER HINTERGRUND ===== */

    .sidebar-overlay {
        display: block;

        position: fixed;
        inset: 0;

        background: rgba(0, 0, 0, 0.38);

        opacity: 0;
        visibility: hidden;
        pointer-events: none;

        transition:
            opacity 0.25s ease,
            visibility 0.25s ease;

        z-index: 9000;
    }

    .sidebar-overlay.open {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
    }


    /* ===== MENÜBUTTON ===== */

    .mobile-menu-btn {
        position: fixed;

        top: 14px;
        left: 14px;

        width: 46px;
        height: 46px;

        margin: 0;
        padding: 0;

        border: 0;
        border-radius: 12px;

        background: #176d27;

        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;

        gap: 5px;

        cursor: pointer;

        z-index: 9002;

        box-shadow: 0 5px 18px rgba(0, 0, 0, 0.20);
    }

    .mobile-menu-btn span {
        display: block;

        width: 21px;
        height: 2px;

        background: white;
        border-radius: 20px;

        transition:
            transform 0.2s ease,
            opacity 0.2s ease;
    }


    /* Hamburger wird beim Öffnen zu X */

    .mobile-menu-btn.open span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .mobile-menu-btn.open span:nth-child(2) {
        opacity: 0;
    }

    .mobile-menu-btn.open span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }
}
/* ===== DESKTOP INHALT NEBEN SIDEBAR ===== */

@media (min-width: 769px) {
    body {
        padding-left: 260px !important;
        box-sizing: border-box !important;
    }

    .main {
        margin-left: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }
}
/* ===== SIDEBAR IMMER KOMPLETTE BILDSCHIRMHÖHE ===== */

@media (min-width: 769px) {
    .sidebar {
        position: fixed !important;
        top: 0 !important;
        bottom: 0 !important;
        left: 0 !important;

        width: 260px !important;

        height: 100vh !important;
        min-height: 100vh !important;
        max-height: 100vh !important;

        overflow-y: auto !important;

        display: flex !important;
        flex-direction: column !important;
    }

    .sidebar-bottom {
        margin-top: auto !important;
        flex-shrink: 0 !important;
    }
}