/* Retter-Portal v1.3.37
   Eingeklappte Sidebar als ruhige, exakt zentrierte Iconleiste.
   Navigation im ausgeklappten Zustand minimal kompakter. */

/* Ausgeklappt: Schrift nur leicht reduzieren – in beiden Themes identisch. */
html body .sidebar nav a.sidebar-nav-link,
html body[data-theme="light"] .sidebar nav a.sidebar-nav-link,
html body[data-theme="dark"] .sidebar nav a.sidebar-nav-link{
  min-height:45px!important;
  padding:10px 12px!important;
  gap:10px!important;
  font-size:.91rem!important;
  line-height:1.16!important;
  font-weight:810!important;
  letter-spacing:-.008em!important;
}
html body .sidebar .nav-section,
html body[data-theme="light"] .sidebar .nav-section,
html body[data-theme="dark"] .sidebar .nav-section{
  font-size:.68rem!important;
  line-height:1.2!important;
  letter-spacing:.13em!important;
}

@media(min-width:1101px){
  /* Breite und Hauptinhalt bleiben immer synchron. */
  html body.sidebar-collapsed .sidebar{
    width:82px!important;
    min-width:82px!important;
    max-width:82px!important;
    padding-left:8px!important;
    padding-right:8px!important;
  }
  html body.sidebar-collapsed .main{
    width:calc(100% - 82px)!important;
    margin-left:82px!important;
  }

  /* Markenbereich sauber und kompakt zentrieren. */
  html body.sidebar-collapsed .sidebar-brand-row{
    display:grid!important;
    grid-template-columns:1fr!important;
    justify-items:center!important;
    align-items:center!important;
    gap:8px!important;
    margin:0 0 10px!important;
    padding:8px 0 12px!important;
  }
  html body.sidebar-collapsed .sidebar .brand{
    display:flex!important;
    width:100%!important;
    min-width:0!important;
    justify-content:center!important;
    align-items:center!important;
    margin:0!important;
    padding:0!important;
  }
  html body.sidebar-collapsed .sidebar .brand-logo-wrap,
  html body.sidebar-collapsed .sidebar .brand-logo{
    width:44px!important;
    min-width:44px!important;
    max-width:44px!important;
    height:44px!important;
    min-height:44px!important;
    max-height:44px!important;
  }
  html body.sidebar-collapsed .sidebar-collapse-toggle{
    grid-column:1!important;
    grid-row:2!important;
    justify-self:center!important;
    align-self:center!important;
    width:30px!important;
    min-width:30px!important;
    max-width:30px!important;
    height:30px!important;
    min-height:30px!important;
    max-height:30px!important;
    margin:0!important;
    border-radius:9px!important;
  }
  html body.sidebar-collapsed .sidebar-collapse-toggle__icon{
    width:14px!important;
    height:14px!important;
  }

  /* Navigation als einheitliche Iconleiste statt breiter Kästen. */
  html body.sidebar-collapsed .sidebar .sidebar-nav{
    width:100%!important;
    min-width:0!important;
    align-items:center!important;
    gap:2px!important;
  }
  html body.sidebar-collapsed .sidebar nav a.sidebar-nav-link{
    display:flex!important;
    width:52px!important;
    min-width:52px!important;
    max-width:52px!important;
    height:48px!important;
    min-height:48px!important;
    max-height:48px!important;
    margin:3px auto!important;
    padding:0!important;
    justify-content:center!important;
    align-items:center!important;
    gap:0!important;
    border-radius:15px!important;
    font-size:0!important;
    overflow:visible!important;
  }
  html body.sidebar-collapsed .sidebar nav a.sidebar-nav-link.active{
    background:linear-gradient(145deg,rgba(225,29,72,.16),rgba(37,99,235,.075))!important;
    border-color:rgba(251,113,133,.30)!important;
    box-shadow:0 7px 18px rgba(2,6,23,.14)!important;
  }
  html body.sidebar-collapsed .sidebar nav a.sidebar-nav-link.active::before{
    display:none!important;
    content:none!important;
  }
  html body.sidebar-collapsed .sidebar nav a.sidebar-nav-link > .sidebar-nav-icon{
    display:grid!important;
    place-items:center!important;
    flex:0 0 23px!important;
    width:23px!important;
    min-width:23px!important;
    max-width:23px!important;
    height:23px!important;
    min-height:23px!important;
    max-height:23px!important;
    margin:0!important;
    padding:0!important;
  }
  html body.sidebar-collapsed .sidebar nav a.sidebar-nav-link > .sidebar-nav-icon svg{
    width:20px!important;
    height:20px!important;
  }
  html body.sidebar-collapsed .sidebar::-webkit-scrollbar{width:4px!important;}
}

/* Heller Modus behält exakt dieselbe Geometrie. */
@media(min-width:1101px){
  html body[data-theme="light"].sidebar-collapsed .sidebar nav a.sidebar-nav-link.active{
    background:linear-gradient(145deg,rgba(225,29,72,.105),rgba(37,99,235,.055))!important;
    border-color:rgba(225,29,72,.24)!important;
    box-shadow:0 6px 16px rgba(71,85,105,.10)!important;
  }
}
