/* sidebar.css - Left sidebar navigation */

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: var(--sidebar-w);
  background: var(--bg-dark);
  display: flex;
  flex-direction: column;
  z-index: 100;
  transition: width var(--transition);
  overflow: hidden;
}

.sidebar.expanded {
  width: var(--sidebar-w-expanded);
}

/* Logo area */
.sidebar-logo {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-dark);
  flex-shrink: 0;
  cursor: pointer;
}

.sidebar-logo-text {
  font-size: 20px;
  font-weight: 900;
  color: #fff;
  letter-spacing: 3px;
  white-space: nowrap;
  overflow: hidden;
}

.sidebar:not(.expanded) .sidebar-logo-text {
  font-size: 16px;
  letter-spacing: 2px;
}

/* Navigation buttons */
.sidebar-nav {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 0;
  gap: 2px;
}

.sidebar-btn {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  height: 52px;
  padding: 0 0 0 20px;
  background: none;
  border: none;
  color: rgba(255,255,255,0.45);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  position: relative;
  white-space: nowrap;
  text-align: left;
}

.sidebar-btn:hover {
  color: rgba(255,255,255,0.7);
  background: rgba(255,255,255,0.05);
}

.sidebar-btn.active {
  color: #fff;
  background: rgba(255,255,255,0.08);
}

.sidebar-btn.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 8px;
  bottom: 8px;
  width: 3px;
  background: var(--green);
  border-radius: 0 3px 3px 0;
}

.sidebar-btn-icon {
  font-size: 22px;
  width: 32px;
  text-align: center;
  flex-shrink: 0;
  line-height: 1;
}

.sidebar-btn-label {
  font-size: 14px;
  opacity: 0;
  transition: opacity var(--transition);
  overflow: hidden;
}

.sidebar.expanded .sidebar-btn-label {
  opacity: 1;
}

/* Toggle button at bottom */
.sidebar-toggle {
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-top: 1px solid var(--border-dark);
  flex-shrink: 0;
}

.sidebar-toggle button {
  background: none;
  border: none;
  color: rgba(255,255,255,0.35);
  font-size: 18px;
  cursor: pointer;
  width: 100%;
  height: 100%;
  transition: color var(--transition);
}

.sidebar-toggle button:hover {
  color: rgba(255,255,255,0.6);
}

.sidebar.expanded .sidebar-toggle button {
  transform: scaleX(-1);
}

/* Responsive: overlay sidebar on small screens */
@media (max-width: 768px) {
  .sidebar {
    width: 0;
    transform: translateX(-100%);
  }

  .sidebar.expanded {
    width: var(--sidebar-w-expanded);
    transform: translateX(0);
    box-shadow: 4px 0 20px rgba(0,0,0,0.3);
  }

  #main-content {
    margin-left: 0 !important;
  }

  /* Mobile hamburger always visible */
  .mobile-menu-btn {
    display: flex !important;
  }
}

@media (min-width: 769px) {
  .mobile-menu-btn {
    display: none !important;
  }
}

.mobile-menu-btn {
  position: fixed;
  top: 12px;
  left: 12px;
  z-index: 99;
  width: 44px;
  height: 44px;
  background: var(--bg-dark);
  border: none;
  border-radius: 10px;
  color: #fff;
  font-size: 22px;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
}
