/* Sidebar reference: original AgrarMarkt layout from user image 3. */
:root{--am-sidebar:#062628;--am-green:#59dc48}
body.site-guest .site-sidebar.portal-sidebar [data-portal-navigation]>a,
body.market-guest .app-sidebar.portal-sidebar [data-portal-navigation]>a,
body.market-guest .app-sidebar.portal-sidebar [data-portal-navigation]>button,
.portal-sidebar [data-portal-navigation]>a,
.portal-sidebar [data-portal-navigation]>button{display:grid!important;position:relative;grid-template-columns:46px minmax(0,1fr) auto;align-items:center;justify-items:stretch;width:100%;min-height:48px;padding:0 16px 0 20px;border:0;border-radius:0;background:transparent;color:#c8d5d4;font-family:"Roboto Condensed Local","Arial Narrow",Arial,sans-serif;font-size:14px;font-style:normal;font-weight:700;line-height:1.12;text-align:left;text-decoration:none;text-shadow:none;transform:none;cursor:pointer}
.portal-sidebar [data-portal-navigation]>:is(a,button)>span{display:block;min-width:0;font-weight:700}
.portal-sidebar [data-portal-navigation]>:is(a,button) svg{display:block;width:22px;height:22px;color:#b3ccd2;stroke-width:2.2}
.portal-sidebar [data-portal-navigation]>:is(a,button):hover{background:#0b3838;color:#fff}
.portal-sidebar [data-portal-navigation]>:is(a,button).active{background:#0d443b;color:#fff}
.portal-sidebar [data-portal-navigation]>:is(a,button)::before{position:absolute;inset:0 auto 0 0;width:5px;background:transparent;content:""}
.portal-sidebar [data-portal-navigation]>:is(a,button).active::before{background:#59dc48;box-shadow:0 0 14px #59dc488c}
.portal-sidebar [data-portal-navigation]>:is(a,button).active svg{color:#fff}
.portal-sidebar [data-portal-navigation]>:is(a,button).nav-child{grid-template-columns:25px minmax(0,1fr) auto;min-height:43px;padding-left:51px;padding-right:7px;background:#0b2729}
.portal-sidebar [data-portal-navigation]>.nav-child svg{width:18px;height:18px}
.portal-sidebar [data-portal-navigation]>.nav-child>span{font-size:13px}
.portal-sidebar :is(.site-brand,.app-brand){display:flex;align-items:center;flex:0 0 84px;min-height:84px;padding:6px 7px 6px 10px}
.portal-sidebar :is(.site-brand,.app-brand)>img{display:block;width:188px;height:68px;object-fit:contain}
.portal-sidebar :is(.site-navigation,.app-navigation){display:grid;align-content:start;flex:1 1 auto;min-height:0;padding:0;gap:1px;overflow-y:auto;overflow-x:hidden;scrollbar-width:thin;scrollbar-color:#2d6962 transparent}
body.site-guest .portal-sidebar .site-sidebar-community,
.portal-sidebar :is(.site-sidebar-community,.sidebar-community){position:relative;display:flex!important;align-items:flex-end;flex:0 0 140px;min-height:140px;margin-top:0;padding:0 18px 26px;background:#052123 url(../agrarmarket-farm-hero.png) 15% bottom/auto 100% no-repeat;box-shadow:inset 0 0 0 999px #041c1e57,inset 0 30px 40px #042628f2}
.portal-sidebar :is(.site-sidebar-community,.sidebar-community)>p{position:relative;z-index:1;margin:0;color:#fff;font-family:"Segoe Script","Bradley Hand",cursive;font-size:15px;font-style:italic;font-weight:400;line-height:1.45;text-shadow:0 2px 5px #000;transform:translateY(-11px) rotate(-5deg)}
/* One fixed grid column, never an implicit row above the page content. */
.agrar-start-integrated .site-app-shell{display:grid;grid-template-columns:205px minmax(0,1fr);align-items:start;min-height:100vh}
.agrar-start-integrated .site-sidebar{position:sticky;inset:auto;top:0;z-index:50;display:flex;flex-direction:column;width:205px;height:100dvh;overflow:hidden;background:#062628;border-right:1px solid #164649}
.agrar-start-integrated .am-start-main{margin-left:0;min-width:0}
.agrar-start-integrated .am-market-toggle{display:none}
.agrar-start-integrated>.skip-link{position:fixed!important;left:14px!important;top:12px!important;z-index:10001;transform:translateY(calc(-100% - 30px));margin:0;white-space:nowrap}
.agrar-start-integrated>.skip-link:focus-visible{transform:none}
.agrar-start-integrated>.skip-link:not(:focus-visible){width:1px;height:1px;padding:0;border:0;overflow:hidden;clip-path:inset(50%)}
@media(max-width:900px){
 .agrar-start-integrated .site-app-shell{display:block}
 .agrar-start-integrated .site-sidebar{position:fixed;top:0;left:-235px;z-index:80;width:220px;transition:left .2s ease}
 body.site-sidebar-open.agrar-start-integrated .site-sidebar{left:0}
 .agrar-start-integrated .am-market-toggle{display:grid}
 .agrar-start-integrated .site-sidebar-overlay{position:fixed;inset:0;z-index:79;display:block;border:0;background:#000a0cb3;opacity:0;visibility:hidden;transition:opacity .2s ease,visibility .2s ease}
 body.site-sidebar-open.agrar-start-integrated .site-sidebar-overlay{opacity:1;visibility:visible}
 .agrar-start-integrated .site-app-main{margin:0}
}
@media(prefers-reduced-motion:reduce){.agrar-start-integrated .site-sidebar{transition:none}}

/* Exact login rule: three public destinations; Startseite is guest-only. */
body:not(.market-authenticated) :is(.site-sidebar,.app-sidebar).portal-sidebar [data-portal-navigation]>[data-nav-visibility="member"],
body.market-authenticated :is(.site-sidebar,.app-sidebar).portal-sidebar [data-portal-navigation]>[data-nav-visibility="guest"]{display:none!important}
