/* ================================
   SIDEBAR NAVIGATION
   Linke Sidebar mit Burger-Menu
   ================================ */

/* Sidebar Basis-Styling */
.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 50px;
  background: transparent;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: none;
  border-right: none;
  transition: width 0.4s var(--transition-bounce);
  overflow-x: hidden;
  overflow-y: auto;
  z-index: 1100;
}

.sidebar::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(to right, 
    var(--bg-primary) 0%, 
    transparent 100%);
  opacity: 0.95;
  z-index: -1;
}

.sidebar.expanded {
  width: 250px;
}

/* Burger Button */
.sidebar .burger {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 60px;
  cursor: pointer;
  color: #1a1a1a;
  border-bottom: none;
  background: transparent;
  transition: all 0.3s var(--transition-smooth);
  position: relative;
  overflow: hidden;
}

.sidebar .burger::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  opacity: 0;
  transition: opacity 0.3s var(--transition-smooth);
  z-index: -1;
}

.sidebar .burger:hover {
  background: transparent;
}

.sidebar .burger:hover::before {
  opacity: 0;
}

.sidebar .burger i {
  font-size: 1rem;
  transition: transform 0.4s var(--transition-bounce), color 0.3s ease;
}

.sidebar .burger:hover i {
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.sidebar.expanded .burger i {
  transform: rotate(180deg);
}

/* Menu-Container */
.sidebar .menu {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar .menu li {
  margin: 0;
}

/* Menu-Items */
.sidebar .menu li a {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 0;
  color: #1a1a1a;
  text-decoration: none;
  border-radius: 0;
  position: relative;
  overflow: hidden;
  transition: all 0.4s var(--transition-smooth);
  background: transparent;
  border: none;
  box-shadow: none;
  z-index: 1;
  min-height: 40px;
  width: 100%;
  margin: 0;
}

/* Im expandierten Zustand */
.sidebar.expanded .menu li a {
  width: 100%;
  padding: 12px;
  justify-content: flex-start;
}

/* Hover-Effekt */
.sidebar .menu li a::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: var(--primary-gradient);
  z-index: -1;
  transition: all 0.3s ease;
}

/* Icon-Styling */
.sidebar .menu li a i {
  width: 18px;
  height: 18px;
  margin-right: 0;
  font-size: 1rem;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--primary-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

/* Im expandierten Zustand */
.sidebar.expanded .menu li a i {
  margin-right: 16px;
}

/* Text-Labels im Menü */
.sidebar .menu li a span {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  opacity: 0;
  max-width: 0;
  transform: translateX(10px);
  transition: all 0.3s var(--transition-smooth);
  letter-spacing: 0.2px;
}

/* Text im expandierten Zustand */
.sidebar.expanded .menu li a span {
  opacity: 1;
  transform: translateX(0);
  max-width: 200px;
}

/* Aktiver Menüpunkt */
.sidebar .menu li a.active {
  background: var(--primary-gradient);
  color: white;
  border-color: transparent;
  box-shadow: var(--shadow-md);
}

.sidebar.expanded .menu li a.active {
  transform: translateX(5px);
}

.sidebar .menu li a.active i {
  background: white;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Hover-Effekte */
.sidebar .menu li a:hover {
  color: white;
  box-shadow: 0 2px 8px rgba(30, 136, 229, 0.15);
}

.sidebar.expanded .menu li a:hover {
  transform: translateX(4px);
}

.sidebar .menu li a:hover::before {
  left: 0;
}

.sidebar .menu li a:hover i {
  transform: scale(1.05);
  background: white;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.sidebar.expanded .menu li a:hover i {
  transform: translateX(2px) scale(1.05);
}

/* === DARK MODE === */
body.dark-mode .sidebar {
  background: transparent;
  border-right: none;
  box-shadow: none;
}

body.dark-mode .sidebar::before {
  background: linear-gradient(to right, 
    var(--bg-primary) 0%, 
    transparent 100%);
  opacity: 0.95;
}

body.dark-mode .sidebar .burger {
  background: transparent;
  border-bottom: none;
  color: #cbd5e1;
}

body.dark-mode .sidebar .burger::before {
  background: linear-gradient(135deg, #1E88E5, #00BCD4);
}

body.dark-mode .sidebar .burger:hover {
  background: transparent;
  color: white;
}

body.dark-mode .sidebar .menu li a {
  background: transparent;
  border-color: transparent;
  color: rgba(203, 213, 225, 0.9);
}

body.dark-mode .sidebar .menu li a:hover {
  background: transparent;
  border-color: rgba(129, 140, 248, 0.4);
  color: white;
}

body.dark-mode .sidebar .menu li a.active {
  background: transparent;
  color: white;
  border-color: rgba(129, 140, 248, 0.6);
  box-shadow: none;
}

body.dark-mode .sidebar .menu li a i {
  background: linear-gradient(135deg, #1E88E5, #00BCD4);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.dark-mode .sidebar .menu li a:hover i {
  background: white;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

body.dark-mode .sidebar .menu li a.active i {
  background: white;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
