/* sidebar.css */
.sidebar {
  position: fixed;
  left: -300px;
  top: 0;
  height: 100%;
  width: 300px;
  min-width: 300px;
  background-color: #2c3e50;
  color: white;
  transition: all 0.3s ease;
  z-index: 1000;
  box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar.open {
  left: 0;
}

.sidebar-toggle {
  position: absolute;
  right: -40px;
  top: 10px;
  width: 40px;
  height: 40px;
  background: #2c3e50;
  color: white;
  border: none;
  font-size: 20px;
  cursor: pointer;
  border-radius: 0 5px 5px 0;
}

.sidebar-content {
  padding: 20px;
  overflow-y: auto;
  height: 100%;
}

.sidebar h4 {
  margin-top: 0;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-btn {
  display: flex;
  align-items: center;
  width: 100%;
  padding: 10px 15px;
  margin-bottom: 5px;
  background: #34495e;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.2s;
}

.sidebar-btn:hover {
  background: #3d566e;
}

.sidebar-icon {
  width: 20px;
  height: 20px;
  margin-right: 10px;
}

.sidebar-btn span {
  white-space: nowrap;
}

/* Затемнение основного контента при открытой панели */
.sidebar-overlay {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.5);
  z-index: 999;
  display: none;
}

.sidebar.open ~ .sidebar-overlay {
  display: block;
}

/* Адаптация для мобильных устройств */
@media (max-width: 768px) {
  .sidebar {
    width: 200px;
    left: -300px;
  }
}