.sidebar {
  width: 320px;
  background: var(--bg-accent);
  border-right: 1px solid var(--border);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  z-index: 1000;
  position: relative;
}

/* Desktop: beim Schließen komplett aus dem Layout entfernen damit main wächst */
@media (min-width: 1100px) {
  .sidebar.hidden {
    display: none;
  }
}

/* Mobile: Overlay */
@media (max-width: 1099px) {
  .sidebar {
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    opacity: 0;
  }

  .sidebar:not(.hidden) {
    transform: translateX(0);
    opacity: 1;
  }
}

.sidebar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 14px;
  border-bottom: 1px solid var(--border);
  background: var(--glass);
}

.sidebar-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 16px;
}

.sidebar-logo {
  height: 28px;
  width: 28px;
  border-radius: 6px;
  object-fit: cover;
}

.primary-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  border: none;
  padding: 12px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-strong));
  color: white;
  cursor: pointer;
  box-shadow: 0 8px 25px var(--accent-glow);
  font-weight: 600;
}

.sidebar-actions {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px;
  border-bottom: 1px solid var(--border);
}

.chat-list {
  margin: 0;
  padding: 10px;
  list-style: none;
  overflow-y: auto;
  flex: 1;
}

.chat-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  margin: 8px 0;
  border-radius: 14px;
  background: var(--glass);
  border: 1px solid var(--border);
  cursor: pointer;
  position: relative;
  overflow: hidden;
}

.chat-item.active {
  border-color: var(--accent);
  background: linear-gradient(135deg, var(--accent-glow), transparent);
  box-shadow: 0 0 20px var(--accent-glow);
}

.chat-title {
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.delete-btn {
  background: transparent;
  border: none;
  color: var(--text-secondary);
  cursor: pointer;
  border-radius: 8px;
  height: 28px;
  width: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-icons {
  display: flex;
  flex-direction: row;   /* Buttons nebeneinander */
  gap: 8px;              /* Abstand */
  justify-content: flex-start; /* oder flex-end, wenn rechtsbündig */
  align-items: center;
}
