/* includes/sidebar.css */
/* CSS per la sidebar comune */

/* Sidebar Styles */
.sidebar {
  position: fixed;
  left: 0;
  top: 0;
  width: 260px;
  height: 100vh;
  background: white;
  border-right: 1px solid #ddd;
  padding: 20px 0;
  z-index: 1000;
  overflow-y: auto;
  transition: transform 0.3s ease;
}

.sidebar.hidden {
  transform: translateX(-100%);
}

.sidebar-header {
  padding: 0 20px 20px 20px;
  border-bottom: 1px solid #eee;
  margin-bottom: 20px;
}

.sidebar-logo {
  display: flex;
  align-items: center;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Poppins', sans-serif;
  color: #333;
  text-decoration: none;
}

.sidebar-logo .magic-icon {
  margin-right: 10px;
  color: #333;
}

.sidebar-nav {
  padding: 0 10px;
}

.nav-item {
  display: flex;
  align-items: center;
  padding: 12px 15px;
  margin-bottom: 5px;
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.2s ease;
  text-decoration: none;
  color: #333;
}

.nav-item:hover {
  background: #f5f5f5;
  color: #333;
}

.nav-item.active {
  background: #333;
  color: white;
}

.nav-item i {
  width: 20px;
  margin-right: 12px;
  text-align: center;
  font-size: 1.1rem;
}

.nav-item span {
  font-size: 0.95rem;
  font-weight: 500;
}

/* Mobile Toggle */
.mobile-toggle {
  display: none;
  position: fixed;
  top: 20px;
  right: 20px;
  background: white;
  border: 1px solid #ddd;
  border-radius: 8px;
  width: 45px;
  height: 45px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
  z-index: 1001;
  box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Content area adjustment */
.main-content {
  margin-left: 260px;
  transition: margin-left 0.3s ease;
}

.main-content.sidebar-hidden {
  margin-left: 0;
}

/* Mobile Responsive */
@media (max-width: 768px) {
  .sidebar {
    transform: translateX(-100%);
  }
  
  .sidebar.show {
    transform: translateX(0);
  }
  
  .mobile-toggle {
    display: flex;
  }
  
  .main-content {
    margin-left: 0;
  }
  
  .sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 999;
  }
  
  .sidebar-overlay.show {
    display: block;
  }
}