.tblab-cat-tree {
	width: 100%;
	margin: 0 0 18px;
	border: 1px solid #e8e1f3;
	border-radius: 22px;
	background:
		radial-gradient(circle at top left, rgba(124, 60, 255, .10), transparent 34%),
		linear-gradient(180deg, #ffffff 0%, #fbfaff 100%);
	box-shadow: 0 14px 38px rgba(31, 18, 64, .075);
	overflow: hidden;
}

.tblab-cat-tree-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 14px 16px;
	border-bottom: 1px solid #eee8f7;
	background: linear-gradient(135deg, #ffffff 0%, #f8f4ff 100%);
}

.tblab-cat-tree-title {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	color: #171020;
	font-size: 15px;
	font-weight: 950;
	letter-spacing: -.015em;
}

.tblab-cat-tree-dot {
	width: 11px;
	height: 11px;
	border-radius: 999px;
	background: #7c3cff;
	box-shadow: 0 0 0 5px rgba(124, 60, 255, .13);
	flex: 0 0 auto;
}

.tblab-cat-tree-actions {
	display: inline-flex;
	align-items: center;
	gap: 7px;
	flex: 0 0 auto;
}

.tblab-cat-tree-action {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 28px;
	padding: 0 10px;
	border: 1px solid #ddd2f0;
	border-radius: 999px;
	background: #ffffff;
	color: #5d506e;
	font-size: 11px;
	font-weight: 850;
	line-height: 1;
	cursor: pointer;
	transition: background .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.tblab-cat-tree-action:hover,
.tblab-cat-tree-action:focus {
	border-color: #7c3cff;
	background: #f3edff;
	color: #5b22d6;
	transform: translateY(-1px);
	outline: none;
}

.tblab-cat-tree-body {
	padding: 10px;
}

.tblab-cat-tree-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.tblab-cat-tree-item {
	margin: 0;
	padding: 0;
}

.tblab-cat-tree-row {
	display: grid;
	grid-template-columns: 34px minmax(0, 1fr);
	align-items: center;
	gap: 7px;
	min-height: 42px;
	margin: 3px 0;
	border-radius: 15px;
	transition: background .16s ease;
}

.tblab-cat-tree-row:hover {
	background: rgba(124, 60, 255, .045);
}

.tblab-cat-tree-toggle,
.tblab-cat-tree-toggle-placeholder {
	width: 30px;
	height: 30px;
	margin: 0;
	border-radius: 12px;
	flex: 0 0 auto;
}

.tblab-cat-tree-toggle {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid #e3daf1;
	background: #ffffff;
	cursor: pointer;
	transition: border-color .18s ease, background .18s ease, box-shadow .18s ease;
}

.tblab-cat-tree-toggle:hover,
.tblab-cat-tree-toggle:focus {
	border-color: #7c3cff;
	background: #f5f0ff;
	box-shadow: 0 7px 16px rgba(124, 60, 255, .12);
	outline: none;
}

.tblab-cat-tree-plus {
	position: relative;
	width: 12px;
	height: 12px;
	display: block;
}

.tblab-cat-tree-plus::before,
.tblab-cat-tree-plus::after {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 12px;
	height: 2px;
	border-radius: 999px;
	background: #6b35e8;
	transform: translate(-50%, -50%);
	transition: transform .18s ease, opacity .18s ease;
}

.tblab-cat-tree-plus::after {
	transform: translate(-50%, -50%) rotate(90deg);
}

.tblab-cat-tree-item.is-open > .tblab-cat-tree-row .tblab-cat-tree-plus::after {
	opacity: 0;
	transform: translate(-50%, -50%) rotate(0deg);
}

.tblab-cat-tree-link,
.tblab-cat-tree-parent {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	min-width: 0;
	min-height: 36px;
	padding: 0 12px;
	border: 1px solid transparent;
	border-radius: 14px;
	background: transparent;
	color: #21172f;
	font-size: 13px;
	font-weight: 850;
	line-height: 1.15;
	text-align: left;
	text-decoration: none !important;
	cursor: pointer;
	transition: color .18s ease, background .18s ease, border-color .18s ease, box-shadow .18s ease;
}

.tblab-cat-tree-parent {
	appearance: none;
	-webkit-appearance: none;
}

.tblab-cat-tree-name {
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.tblab-cat-tree-link:hover,
.tblab-cat-tree-link:focus,
.tblab-cat-tree-parent:hover,
.tblab-cat-tree-parent:focus {
	border-color: #e4daf4;
	background: #ffffff;
	color: #5b22d6;
	box-shadow: 0 8px 18px rgba(31, 18, 64, .055);
	outline: none;
}

.tblab-cat-tree-item.is-current > .tblab-cat-tree-row .tblab-cat-tree-link,
.tblab-cat-tree-item.is-current > .tblab-cat-tree-row .tblab-cat-tree-parent {
	border-color: #7c3cff;
	background: linear-gradient(135deg, #7c3cff 0%, #5f2be0 100%);
	color: #ffffff;
	box-shadow: 0 10px 24px rgba(124, 60, 255, .22);
}

.tblab-cat-tree-item.is-current > .tblab-cat-tree-row .tblab-cat-tree-toggle {
	border-color: rgba(255,255,255,.55);
	background: rgba(124, 60, 255, .10);
}

.tblab-cat-tree-item.has-current-descendant > .tblab-cat-tree-row .tblab-cat-tree-parent {
	border-color: #dfd2f2;
	background: #f5f0ff;
	color: #5b22d6;
	font-weight: 950;
}

.tblab-cat-tree-item.has-current-descendant > .tblab-cat-tree-row .tblab-cat-tree-toggle {
	border-color: #cdbdf0;
	background: #f5f0ff;
}

.tblab-cat-tree-children {
	margin-left: 17px;
	padding-left: 13px;
	border-left: 1px dashed #ded3f0;
}

.tblab-cat-tree-level-2 .tblab-cat-tree-link,
.tblab-cat-tree-level-2 .tblab-cat-tree-parent {
	font-size: 12.5px;
	font-weight: 800;
}

.tblab-cat-tree-level-3 .tblab-cat-tree-link,
.tblab-cat-tree-level-3 .tblab-cat-tree-parent {
	font-size: 12px;
	font-weight: 750;
	color: #554963;
}

.tblab-cat-tree [hidden] {
	display: none !important;
}

@media (max-width: 768px) {
	.tblab-cat-tree {
		border-radius: 18px;
		margin-bottom: 14px;
	}

	.tblab-cat-tree-head {
		padding: 12px;
		align-items: flex-start;
		flex-direction: column;
	}

	.tblab-cat-tree-actions {
		width: 100%;
		justify-content: flex-start;
	}

	.tblab-cat-tree-body {
		padding: 8px;
	}

	.tblab-cat-tree-row {
		grid-template-columns: 32px minmax(0, 1fr);
		gap: 6px;
		min-height: 40px;
	}

	.tblab-cat-tree-link,
	.tblab-cat-tree-parent {
		min-height: 35px;
		font-size: 12.5px;
	}

	.tblab-cat-tree-children {
		margin-left: 15px;
		padding-left: 10px;
	}
}
