.sidebar {
  display: flex;
  flex-direction: column;
  padding: 0 1rem 1rem 1rem;
  height: 100%;
  overflow-y: auto;
}

.sidebar__logo {
  margin: -1rem -1rem 1rem -1rem;
  padding: 1rem;
  background-color: var(--mantine-color-other-backgroundColors-header);
  border-bottom: 1px solid var(--mantine-color-other-colors-border);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 64px;
}

.sidebar__logo img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.sidebar__content {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.sidebar__nav {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.sidebar__tree {
  flex: 1;
  overflow-y: auto;
}

.sidebar__section {
  padding: 1rem;
  border-bottom: 1px solid var(--mantine-color-other-colors-border);
}

.sidebar__title {
  color: var(--mantine-color-other-colors-bodyLight);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 0.5rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.sidebar__list {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.sidebar__item {
  color: var(--mantine-color-other-colors-bodyLight);
  padding: 0.5rem;
  border-radius: var(--mantine-radius-sm);
  cursor: pointer;
  transition: all 0.2s ease;
  display: flex;
  align-items: center;
}

.sidebar__item svg {
  color: var(--mantine-color-other-colors-bodyLight);
  margin-right: 0.5rem;
}

.sidebar__item:hover {
  background-color: color-mix(
    in srgb,
    var(--mantine-color-dark-6) 30%,
    transparent
  );
  color: var(--mantine-color-other-colors-bodyLight);
}

.sidebar__item:hover svg {
  color: var(--mantine-color-other-colors-bodyLight);
}

.sidebar__item--active {
  background-color: color-mix(
    in srgb,
    var(--mantine-color-dark-6) 50%,
    transparent
  );
  color: var(--mantine-color-other-colors-bodyLight);
}

.sidebar__item--active svg {
  color: var(--mantine-color-other-colors-bodyLight);
}

.sidebar :global(.mantine-NavLink-root) {
  color: var(--mantine-color-other-colors-bodyLight);
  background-color: transparent;
  border-radius: var(--mantine-radius-sm);
}

.sidebar :global(.mantine-NavLink-root:hover) {
  background-color: color-mix(
    in srgb,
    var(--mantine-color-dark-6) 30%,
    transparent
  );
  color: var(--mantine-color-other-colors-bodyLight);
}

.sidebar :global(.mantine-NavLink-root[data-active]) {
  background-color: color-mix(
    in srgb,
    var(--mantine-color-dark-6) 50%,
    transparent
  );
  color: var(--mantine-color-other-colors-bodyLight);
}

.sidebar :global(.mantine-NavLink-icon) {
  color: var(--mantine-color-other-colors-bodyLight);
}

.sidebar :global(.mantine-NavLink-root:hover .mantine-NavLink-icon),
.sidebar :global(.mantine-NavLink-root[data-active] .mantine-NavLink-icon) {
  color: var(--mantine-color-other-colors-bodyLight);
}

/* Make the Stack take remaining height and enable scrolling */
.sidebar :global(.mantine-Stack-root) {
  height: 100%;
  overflow: hidden;
}

/* Make the executable tree section scrollable */
.sidebar :global(.mantine-ScrollArea-root) {
  flex: 1;
  min-height: 0;
}

/* Style the tree nodes */
.sidebar :global(.mantine-Tree-root) {
  padding: 0.5rem 0;
}

.sidebar :global(.mantine-Tree-node) {
  padding: 0.25rem 0;
  color: var(--mantine-color-other-colors-bodyLight);
}

.sidebar :global(.mantine-Tree-node[data-selected]) {
  background-color: color-mix(
    in srgb,
    var(--mantine-color-dark-6) 50%,
    transparent
  );
  color: var(--mantine-color-other-colors-bodyLight);
}

.sidebar :global(.mantine-Tree-node:hover) {
  background-color: color-mix(
    in srgb,
    var(--mantine-color-dark-6) 30%,
    transparent
  );
  color: var(--mantine-color-other-colors-bodyLight);
}
