/* ==========================================
   App-Sidebar + Page-Layout (nur Desktop)
   ========================================== */

.page-layout {
    display: flex;
    align-items: flex-start;
}

.app-sidebar {
    width: 205px;
    flex-shrink: 0;
    background: rgba(10, 102, 59, 0.35);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-right: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0 12px 12px 0;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    align-items: flex-start;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    width: 100%;
    padding: 8px 0;
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    color: var(--secondary-text-color);
    text-decoration: none;
    font-size: 15px;
    border-left: 3px solid transparent;
    transition: background-color 0.15s ease, color 0.15s ease, border-left-color 0.15s ease;
}

.sidebar-link:hover,
.sidebar-link:focus {
    background: rgba(25, 125, 78, 0.5);
    color: var(--text-color);
    border-left-color: var(--main-brand-color);
    outline: none;
}

.sidebar-link .material-symbols-rounded {
    font-size: 22px;
    flex-shrink: 0;
}

.sidebar-label {
    line-height: 1.2;
}

.sidebar-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.12);
    margin: 8px 14px;
}

.sidebar-logout-form {
    margin: 0;
    padding: 0;
}

.sidebar-logout {
    width: 100%;
    background: none;
    border: none;
    cursor: pointer;
    font-family: inherit;
    text-align: left;
}

.page-layout > .container,
.page-layout > main {
    flex: 1;
    min-width: 0;
    padding: 0 2rem;
}

/* Kein Sidebar (nicht angemeldet): Inhalt zentrieren */
.page-layout:not(.has-sidebar) > .container {
    max-width: 860px;
    margin: 0 auto;
    padding: 2rem;
}

/* Sidebar nur auf Desktop */
@media (max-width: 975px) {
    .app-sidebar {
        display: none;
    }

    .page-layout {
        max-width: 100vw;
        overflow-x: hidden;
    }

    .page-layout > .container,
    .page-layout > main {
        padding: 16px 16px;
        padding-bottom: 80px;
    }
}

/* ==========================================
   Mobile Bottom Navigation
   ========================================== */

.mobile-bottom-nav {
    display: none;
}

@media (max-width: 975px) {
    .mobile-bottom-nav {
        display: flex;
        align-items: center;
        justify-content: space-around;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 60px;
        background: rgba(10, 102, 59, 0.45);
        backdrop-filter: blur(18px);
        -webkit-backdrop-filter: blur(18px);
        border-top: 1px solid rgba(255, 255, 255, 0.14);
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.3);
        z-index: 100;
    }

    .mobile-nav-link {
        display: flex;
        align-items: center;
        justify-content: center;
        flex: 1;
        height: 100%;
        color: var(--secondary-text-color);
        text-decoration: none;
        transition: color 0.15s ease, background-color 0.15s ease;
    }

    .mobile-nav-link:hover,
    .mobile-nav-link:focus {
        color: var(--text-color);
        background: rgba(25, 125, 78, 0.5);
        outline: none;
    }

    .mobile-nav-link .material-symbols-rounded {
        font-size: 24px;
    }

    .mobile-nav-logout-form {
        display: contents;
    }

    .mobile-nav-logout-form .mobile-nav-link {
        width: 100%;
        background: none;
        border: none;
        cursor: pointer;
        font-family: inherit;
    }
}
