/* Build 006E.3 — Navigation & Theme Polish */

.shell>aside{
  height:100vh;
  min-height:0;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto auto auto minmax(120px,1fr) auto auto;
  gap:12px;
  padding:18px 14px 12px;
}

.theme-logo{
  flex:none;
}

.role-mode-card.role-mode-compact{
  margin:0;
  padding:0;
  border:0;
  background:transparent;
}

.role-mode-toggle.role-mode-toggle-compact{
  display:grid;
  grid-template-columns:24px minmax(0,1fr) 38px;
  gap:8px;
  align-items:center;
  width:100%;
  min-height:40px;
  padding:8px 9px;
  border:1px solid var(--border);
  border-radius:12px;
  background:var(--surface);
  color:var(--text);
  text-align:left;
}

.role-mode-toggle-compact>span:first-child{
  font-size:17px;
}

.role-mode-toggle-compact>#roleModeToggleTitle{
  font-size:12px;
  font-weight:700;
}

#developerBuildLabel{
  margin:0;
  padding:0 2px 4px;
  line-height:1.45;
  min-height:0;
}

.shell>aside>nav{
  min-height:0;
  overflow-y:auto;
  overflow-x:hidden;
  align-content:start;
  padding-right:5px;
  scrollbar-width:thin;
  scrollbar-color:
    color-mix(in srgb,var(--accent) 48%,var(--muted))
    transparent;
}

.shell>aside>nav::-webkit-scrollbar{
  width:7px;
}

.shell>aside>nav::-webkit-scrollbar-track{
  background:transparent;
}

.shell>aside>nav::-webkit-scrollbar-thumb{
  border-radius:999px;
  background:color-mix(in srgb,var(--accent) 48%,var(--muted));
}

.aside-household{
  min-height:0;
  max-height:170px;
  overflow:hidden;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  gap:7px;
  margin:0;
}

.aside-member-list{
  min-height:0;
  overflow-y:auto;
  scrollbar-width:thin;
}

.aside-bottom{
  flex:none;
  margin:0;
  display:grid;
  gap:8px;
  padding-top:8px;
  border-top:1px solid color-mix(in srgb,var(--border) 70%,transparent);
}

.aside-bottom .language-control{
  gap:4px;
}

.aside-bottom #theme{
  width:100%;
  min-height:40px;
  position:relative;
  z-index:2;
}

.aside-bottom>span{
  margin:0;
  padding:0 2px;
  font-size:12px;
}

.developer-return-button{
  display:none!important;
}

#developerModeBadge{
  display:none!important;
}

html[data-role-mode="user"] #developerBuildLabel{
  display:none!important;
}

html[data-role-mode="user"] .shell>aside{
  grid-template-rows:auto auto minmax(160px,1fr) auto auto;
}

html[data-role-mode="user"] .role-mode-card{
  display:block!important;
}

html[data-role-mode="user"] .role-mode-toggle{
  display:grid!important;
}

@media(max-height:760px){
  .shell>aside{
    gap:8px;
    padding-top:12px;
  }

  .theme-logo img{
    max-height:82px;
    object-fit:contain;
  }

  .aside-household{
    max-height:128px;
  }

  nav button{
    padding-block:9px;
  }
}

@media(max-width:760px){
  .shell>aside{
    height:auto;
    max-height:none;
    overflow:visible;
    display:flex;
  }

  .shell>aside>nav,
  .aside-member-list{
    overflow:visible;
  }

  .aside-household{
    max-height:none;
  }
}
