/* Toggle Button */
.sidebar-toggle {
  position: fixed;
  top: 1rem;
  left: 1rem;
  background: none;
  border: none;
  color: white;
  font-size: 1.6rem;
  z-index: 9999;
  cursor: pointer;
}

/* Sidebar Layout */
#custom-sidebar {
  position: fixed;
  top: 0;
  left: 0;
  width: 260px;
  height: 100vh;
  background: rgba(255, 255, 255, 0.06);
  backdrop-filter: blur(14px);
  border-top-right-radius: 12px;
  border-bottom-right-radius: 12px;
  color: white;
  z-index: 9998;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow-y: auto;
  text-align: left;
}
#custom-sidebar.collapsed {
  transform: translateX(-100%);
}
.sidebar-inner {
  display: flex;
  flex-direction: column;
  height: 100%;
  justify-content: space-between;
  padding: 1rem 0;
}

/* Menü zentriert */
.sidebar-center {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* Menü-Elemente */
.nav-links {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}
.nav-item {
  margin-bottom: 0.2rem;
  padding: 0 1rem;
}
#custom-sidebar .nav-item a,
#custom-sidebar .nav-label {
  color: white !important;
  text-decoration: none;
  font-size: 1rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  cursor: pointer;
  transition: background 0.3s ease, color 0.3s ease;
  padding: 0.6rem 0.8rem;
  border-radius: 8px;
  text-align: left;
}
#custom-sidebar .nav-item a:hover,
#custom-sidebar .nav-label:hover {
  background: rgba(255, 255, 255, 0.12);
  color: white !important;
}

/* Submenu Toggle Icon */
.has-sub .nav-label::after {
  content: "▾";
  font-size: 0.8rem;
  transform: rotate(0deg);
  transition: transform 0.3s ease;
}
.has-sub.open .nav-label::after {
  transform: rotate(180deg);
}

/* Submenu Animation */
.sub-links {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: all 0.4s ease;
  padding-left: 0;
  margin: 0;
}
.has-sub.open .sub-links {
  max-height: 500px;
  opacity: 1;
  margin-top: 0.1rem;
}

/* Submenüpunkte */
#custom-sidebar .sub-links {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: left;
}
#custom-sidebar .sub-links a {
  font-size: 0.9rem;
  padding: 0.45rem 1.4rem;
  color: white !important;
  border-radius: 6px;
  display: block;
  transition: background 0.2s ease;
  text-decoration: none;
  text-align: left;
}
#custom-sidebar .sub-links a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white !important;
}

/* Footer */
.sidebar-footer {
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
  padding: 1rem;
}
.footer-link {
  color: #ff5252;
  text-decoration: none;
  font-size: 1rem;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  transition: background 0.3s ease;
  text-align: left;
}
.footer-link:hover {
  background: rgba(255, 255, 255, 0.08);
}

.footer-profile {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.footer-profile-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.user-avatar-img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  margin-left: 0.3rem;
}
.user-name-footer {
  font-size: 0.9rem;
  color: white;
  white-space: nowrap;
  line-height: 1;
  text-align: left;
}

@media (max-width: 768px) {
  #custom-sidebar {
    width: 85%;
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
  }

  .sidebar-footer {
    padding-bottom: 2.5rem;
  }
}



