/* =========================================================
   BSG FINAL UI FIX
   Stand: 27.08.2026
   ========================================================= */

/* ---------------------------------------------------------
   PORTAL-LAYOUT / FOOTER IMMER UNTEN
   --------------------------------------------------------- */

/*
   Wichtig:
   body wird NICHT zu einem Flex-Container gemacht.
   Dadurch bleiben Suche, Formulare, Kalender usw. unverändert.
*/
.main{
    min-height:100vh !important;
    display:flex !important;
    flex-direction:column !important;
}

.main > .topbar{
    flex:0 0 auto !important;
}

/*
   Die alte .content-Regel besitzt "margin:auto".
   Das kann in einem Flex-Layout auch vertikal zentrieren.
   Deshalb hier ausdrücklich oben/unten = 0.
*/
.main > .content{
    flex:1 0 auto !important;
    width:100% !important;
    max-width:1400px !important;
    margin:0 auto !important;
    padding:32px !important;

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

/*
   Alle normalen Seiteninhalte bleiben oben.
   Nur der Footer bekommt auto-Abstand und wandert auf kurzen
   Seiten bis an den unteren Rand des Browserfensters.
*/
.main > .content > .app-legal-footer{
    margin-top:auto !important;
    padding-top:34px !important;
}

.app-legal-footer{
    width:100% !important;
    flex:0 0 auto !important;
    padding-bottom:2px !important;
    color:#738078 !important;
    font-size:12px !important;
}

.app-legal-footer-inner{
    min-height:62px;
    display:flex !important;
    align-items:center !important;
    justify-content:space-between !important;
    gap:20px !important;
    padding:14px 18px !important;

    border:1px solid #dfe7e1 !important;
    border-radius:14px !important;
    background:#fff !important;
    box-shadow:0 2px 8px rgba(20,45,28,.025) !important;
}

.app-legal-footer-left{
    display:flex !important;
    align-items:center !important;
    gap:9px !important;
    min-width:0;
}

.app-legal-mark{
    display:inline-grid !important;
    place-items:center !important;
    height:28px !important;
    padding:0 10px !important;
    border-radius:8px !important;
    background:#e8f4eb !important;
    color:#087a2d !important;
    font-weight:900 !important;
    letter-spacing:.03em;
}

.app-legal-footer-links{
    display:flex !important;
    align-items:center !important;
    gap:12px !important;
}

.app-legal-footer-links a{
    display:inline-flex !important;
    align-items:center !important;
    gap:7px !important;
    color:#506057 !important;
    font-weight:700 !important;
    text-decoration:none !important;
}

.app-legal-footer-links a:hover{
    color:#087a2d !important;
}

.app-legal-footer-links svg{
    width:17px !important;
    height:17px !important;
    fill:none !important;
    stroke:currentColor !important;
    stroke-width:1.8 !important;
    stroke-linecap:round !important;
    stroke-linejoin:round !important;
}

.app-legal-divider{
    width:1px !important;
    height:20px !important;
    background:#dce4de !important;
}

/* ---------------------------------------------------------
   BENUTZER + LOGOUT OBEN RECHTS
   --------------------------------------------------------- */
.topbar-userarea{
    display:flex !important;
    align-items:center !important;
    gap:12px !important;
    flex:0 0 auto !important;
}

.topbar-userarea .userchip{
    margin:0 !important;
}

.topbar-logout{
    min-height:40px !important;
    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:8px !important;
    padding:0 14px !important;

    border:1px solid #d8e2da !important;
    border-radius:11px !important;
    background:#fff !important;
    color:#26342a !important;

    font-size:13px !important;
    font-weight:800 !important;
    line-height:1 !important;
    text-decoration:none !important;

    box-shadow:0 1px 3px rgba(20,45,28,.035) !important;
    transition:
        background-color .16s ease,
        border-color .16s ease,
        color .16s ease,
        transform .16s ease !important;
}

.topbar-logout:hover{
    background:#f0f8f2 !important;
    border-color:#9dc9a8 !important;
    color:#087a2d !important;
    transform:translateY(-1px);
}

.topbar-logout-svg{
    width:18px !important;
    height:18px !important;
    display:block !important;
    fill:none !important;
    stroke:currentColor !important;
    stroke-width:1.9 !important;
    stroke-linecap:round !important;
    stroke-linejoin:round !important;
}

/* ---------------------------------------------------------
   SUCHLEISTEN
   --------------------------------------------------------- */
.card.searchbar-card,
.searchbar-card{
    display:block !important;
    width:100% !important;
    padding:18px 20px !important;
    border-radius:16px !important;
}

.card.searchbar-card form.searchbar-form,
.searchbar-card form.searchbar-form,
.searchbar-form{
    display:flex !important;
    flex-direction:row !important;
    align-items:center !important;
    justify-content:flex-start !important;
    gap:12px !important;

    width:100% !important;
    max-width:820px !important;
    margin:0 !important;
}

.card.searchbar-card input[type="search"],
.searchbar-card input[type="search"],
.searchbar-form input[type="search"],
.searchbar-form input[name="q"]{
    display:block !important;
    flex:1 1 auto !important;
    width:100% !important;
    min-width:280px !important;
    height:48px !important;
    box-sizing:border-box !important;
    margin:0 !important;

    padding:0 42px 0 44px !important;
    border:1px solid #d3ddd6 !important;
    border-radius:13px !important;

    background-color:#f7faf8 !important;
    color:#172019 !important;
    font-family:inherit !important;
    font-size:14px !important;
    line-height:normal !important;

    outline:none !important;
    appearance:none !important;
    -webkit-appearance:none !important;

    background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='19' viewBox='0 0 24 24' fill='none' stroke='%23738277' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cpath d='m21 21-4.35-4.35'/%3E%3C/svg%3E") !important;
    background-repeat:no-repeat !important;
    background-position:15px center !important;
}

.searchbar-form input[type="search"]::placeholder,
.searchbar-form input[name="q"]::placeholder{
    color:#879189 !important;
    opacity:1 !important;
}

.searchbar-form input[type="search"]:hover,
.searchbar-form input[name="q"]:hover{
    background-color:#fff !important;
    border-color:#b8c7bd !important;
}

.searchbar-form input[type="search"]:focus,
.searchbar-form input[name="q"]:focus{
    background-color:#fff !important;
    border-color:#078536 !important;
    box-shadow:0 0 0 4px rgba(7,133,54,.10) !important;
}

.searchbar-form button.btn,
.searchbar-form a.btn,
.searchbar-form .btn{
    flex:0 0 auto !important;
    height:48px !important;
    min-width:110px !important;
    margin:0 !important;
    padding:0 22px !important;

    display:inline-flex !important;
    align-items:center !important;
    justify-content:center !important;

    border-radius:13px !important;
    font-size:14px !important;
    font-weight:800 !important;
    white-space:nowrap !important;
}

/* ---------------------------------------------------------
   LOGIN: DATENSCHUTZ / IMPRESSUM
   --------------------------------------------------------- */
.public-legal-links{
    margin-top:18px !important;
    padding-top:16px !important;
    border-top:1px solid #e1e8e3 !important;

    display:flex !important;
    align-items:center !important;
    justify-content:center !important;
    gap:12px !important;

    color:#718077 !important;
}

.public-legal-links a{
    display:inline-flex !important;
    align-items:center !important;
    gap:6px !important;

    color:#5d6b62 !important;
    font-size:12px !important;
    font-weight:700 !important;
    text-decoration:none !important;
}

.public-legal-links a:hover{
    color:#087a2d !important;
}

.public-legal-links svg{
    width:15px !important;
    height:15px !important;
    fill:none !important;
    stroke:currentColor !important;
    stroke-width:1.9 !important;
    stroke-linecap:round !important;
    stroke-linejoin:round !important;
}

.public-legal-divider{
    width:1px !important;
    height:17px !important;
    background:#dce4de !important;
}

/* ---------------------------------------------------------
   SIDEBAR SCROLL
   --------------------------------------------------------- */
.sidebar{
    height:100vh !important;
    display:flex !important;
    flex-direction:column !important;
    overflow:hidden !important;
}

.sidebar .brandbox{
    flex:0 0 auto !important;
}

.sidebar nav{
    flex:1 1 auto !important;
    min-height:0 !important;
    overflow-y:auto !important;
    overflow-x:hidden !important;
    padding-bottom:18px !important;
    scrollbar-width:thin;
    scrollbar-color:#829087 transparent;
}

.sidebar nav::-webkit-scrollbar{
    width:6px;
}
.sidebar nav::-webkit-scrollbar-track{
    background:transparent;
}
.sidebar nav::-webkit-scrollbar-thumb{
    background:#59665e;
    border-radius:20px;
}

/* ---------------------------------------------------------
   RESPONSIVE
   --------------------------------------------------------- */
@media(max-width:900px){
    .main > .content{
        padding:20px !important;
    }
}

@media(max-width:700px){
    .main > .content{
        padding:14px !important;
    }

    .topbar-userarea{
        gap:7px !important;
    }

    .topbar-logout{
        width:40px !important;
        min-width:40px !important;
        padding:0 !important;
    }

    .topbar-logout-text{
        display:none !important;
    }

    .card.searchbar-card form.searchbar-form,
    .searchbar-card form.searchbar-form,
    .searchbar-form{
        flex-direction:column !important;
        align-items:stretch !important;
        max-width:none !important;
    }

    .searchbar-form input[type="search"],
    .searchbar-form input[name="q"]{
        width:100% !important;
        min-width:0 !important;
    }

    .searchbar-form button.btn,
    .searchbar-form a.btn,
    .searchbar-form .btn{
        width:100% !important;
    }

    .app-legal-footer-inner{
        flex-direction:column !important;
        justify-content:center !important;
        text-align:center !important;
        gap:11px !important;
    }
}
