.th-sidebar{
	position:fixed;
	top:22px;
	left:22px;
	bottom:22px;
	width:280px;
	z-index:1040;
	display:flex;
	flex-direction:column;
	border-radius:30px;
	border:1px solid var(--th-border-base);
	background:var(--th-card-bg-glass);
	box-shadow:0 24px 70px var(--th-shadow-card);
	backdrop-filter:blur(22px);
	-webkit-backdrop-filter:blur(22px);
	overflow:visible;
	transition:.28s ease;
}

.th-sidebar-header{
	padding:22px;
	display:flex;
	align-items:center;
	justify-content:space-between;
	gap:14px;
	border-bottom:1px solid var(--th-border-base);
}

.th-sidebar-brand{
	display:flex;
	align-items:center;
	gap:14px;
	min-width:0;
}

.th-sidebar-logo{
	width:92px;
	height:92px;
	display:flex;
	align-items:center;
	justify-content:center;
	flex:0 0 92px;
	position:relative;
	margin-left:-18px;
	margin-right:-18px;
	border-radius:0;
	background:transparent;
	border:0;
	box-shadow:none;
	overflow:visible;
}


.th-sidebar-logo::before{
	content:"";
	position:absolute;
	inset:18px;
	border-radius:999px;
	background:
		radial-gradient(circle at 38% 30%, var(--th-overlay-white-shine), var(--th-color-transparent) 42%),
		radial-gradient(circle at 62% 72%, var(--th-glow-cyan), var(--th-color-transparent) 58%);
	filter:blur(12px);
	opacity:.85;
	z-index:1;
}

.th-sidebar-logo-img{
	width:118px;
	height:118px;
	object-fit:contain;
	position:relative;
	z-index:2;
	filter:var(--th-brand-logo-filter);
	transition:.22s ease;
}

.th-sidebar-logo:hover .th-sidebar-logo-img{
	transform:scale(1.05) rotate(-2deg);
}

body.th-sidebar-collapsed .th-sidebar-header{
	display:flex;
	justify-content:center;
	align-items:center;
	padding:28px 0 22px;
}

body.th-sidebar-collapsed .th-sidebar-brand{
	width:100%;
	justify-content:center;
}

body.th-sidebar-collapsed .th-sidebar-logo{
	width:72px;
	height:72px;
	flex:0 0 72px;
	margin:0 auto;
}

body.th-sidebar-collapsed .th-sidebar-logo::before{
	inset:14px;
	filter:blur(10px);
	opacity:.72;
}

body.th-sidebar-collapsed .th-sidebar-logo-img{
	width:88px;
	height:88px;
}

.th-sidebar-brand-text{
	display:flex;
	flex-direction:column;
	min-width:0;
}

.th-sidebar-brand-text strong{
	color:var(--th-color-text-main);
	font-size:1.05rem;
	font-weight:950;
	line-height:1.1;
}

.th-sidebar-brand-text span{
	color:var(--th-color-text-muted);
	font-size:.78rem;
	font-weight:800;
}

.th-sidebar-toggle,
.th-sidebar-mobile-btn{
	border:none;
	width:42px;
	height:42px;
	display:flex;
	align-items:center;
	justify-content:center;
	border-radius:15px;
	background:var(--th-badge-bg);
	color:var(--th-badge-text);
	font-size:1.1rem;
	transition:.22s ease;
}

.th-sidebar-toggle:hover,
.th-sidebar-mobile-btn:hover{
	transform:translateY(-2px);
	background:var(--th-icon-soft-bg);
}

.th-sidebar-nav{
	flex:1;
	padding:18px;
	overflow-y:auto;
	overflow-x:visible;
}

.th-sidebar-label{
	display:block;
	margin:16px 12px 9px;
	color:var(--th-color-text-muted);
	font-size:.72rem;
	font-weight:950;
	text-transform:uppercase;
	letter-spacing:.08em;
}

.th-sidebar-link{
	position:relative;
	width:100%;
	min-height:50px;
	margin-bottom:8px;
	padding:12px 14px;
	display:flex;
	align-items:center;
	gap:13px;
	border:none;
	border-radius:17px;
	background:transparent;
	color:var(--th-color-text-muted);
	font-size:.93rem;
	font-weight:900;
	text-align:left;
	transition:.22s ease;
	overflow:hidden;
}

.th-sidebar-link::before{
	content:"";
	position:absolute;
	inset:0;
	background:var(--th-gradient-cta);
	opacity:0;
	transition:.22s ease;
    border-radius:inherit;
}

.th-sidebar-tooltip{
	position:fixed;
	z-index:9999;
	padding:10px 14px;
	border-radius:14px;
	background:var(--th-color-text-main);
	color:var(--th-hero-bg);
	font-size:.82rem;
	font-weight:900;
	white-space:nowrap;
	box-shadow:0 16px 38px var(--th-shadow-card);
	opacity:0;
	pointer-events:none;
	transform:translateX(-8px);
	transition:.16s ease;
}

.th-sidebar-tooltip.show{
	opacity:1;
	transform:translateX(0);
}

.th-sidebar-tooltip::before{
	content:"";
	position:absolute;
	top:50%;
	left:-6px;
	width:12px;
	height:12px;
	background:inherit;
	transform:translateY(-50%) rotate(45deg);
	border-radius:3px;
}

html[data-theme="dark"] .th-sidebar-tooltip{
	background:#f8fafc;
	color:#0f172a;
	box-shadow:0 16px 38px rgba(0,0,0,.45);
}

.th-sidebar-link i,
.th-sidebar-link span{
	position:relative;
	z-index:2;
}

.th-sidebar-link i{
	width:22px;
	font-size:1.12rem;
}

.th-sidebar-link:hover{
	color:var(--th-color-text-main);
	background:var(--th-badge-bg);
	transform:translateX(3px);
}

.th-sidebar-link.active{
	color:var(--th-color-white);
	box-shadow:0 16px 34px var(--th-glow-indigo);
}

.th-sidebar-link.active::before{
	opacity:1;
}

.th-sidebar-footer{
	padding:18px;
	border-top:1px solid var(--th-border-base);
}

.th-sidebar-user{
	display:flex;
	align-items:center;
	gap:12px;
	padding:12px;
	border-radius:20px;
	background:var(--th-badge-bg);
}

.th-sidebar-avatar{
	width:42px;
	height:42px;
	display:flex;
	align-items:center;
	justify-content:center;
	flex:0 0 auto;
	border-radius:16px;
	background:var(--th-gradient-brand);
	color:var(--th-color-white);
	font-size:.9rem;
	font-weight:950;
}

.th-sidebar-user-info{
	display:flex;
	flex-direction:column;
	min-width:0;
}

.th-sidebar-user-info strong{
	color:var(--th-color-text-main);
	font-size:.9rem;
	font-weight:950;
	white-space:nowrap;
	overflow:hidden;
	text-overflow:ellipsis;
}

.th-sidebar-user-info span{
	color:var(--th-color-text-muted);
	font-size:.76rem;
	font-weight:800;
}

.th-sidebar-backdrop{
	position:fixed;
	top:92px;
	left:0;
	right:0;
	bottom:0;
	z-index:1035;
	display:none;
	background:var(--th-overlay-white-strong);
	backdrop-filter:blur(4px);
}

body.th-sidebar-collapsed .th-sidebar{
	width:88px;
}

body.th-sidebar-collapsed .th-sidebar-brand-text,
body.th-sidebar-collapsed .th-sidebar-link span,
body.th-sidebar-collapsed .th-sidebar-label,
body.th-sidebar-collapsed .th-sidebar-user-info{
	display:none;
}

body.th-sidebar-collapsed .th-sidebar-toggle{
	display:none;
}

.th-sidebar-logo{
	cursor:pointer;
}

body.th-sidebar-collapsed .th-sidebar-logo:hover .th-sidebar-logo-img{
	transform:scale(1.08) rotate(-2deg);
}

body.th-sidebar-collapsed .th-sidebar-link{
	justify-content:center;
	padding:13px;
}

body.th-sidebar-collapsed .th-sidebar-user{
	justify-content:center;
	padding:10px;
}

body.th-sidebar-collapsed .th-sidebar-link{
	position:relative;
}

body.th-sidebar-collapsed .th-sidebar-link::before{
	z-index:1;
}

@media(max-width:991px){
	.th-sidebar{
		top:96px;
		left:16px;
		bottom:16px;
		width:calc(100% - 32px);
		max-width:360px;
		z-index:1048;
		border-radius:26px;
		transform:translateX(calc(-100% - 24px));
	}

	body.th-sidebar-open .th-sidebar{
		transform:translateX(0);
	}

	.th-sidebar-header{
		display:none;
	}

	.th-sidebar-nav{
		padding:18px;
	}

	.th-sidebar-footer{
		padding:16px 18px 18px;
	}

	body.th-sidebar-open .th-sidebar{
		transform:translateX(0);
	}

	body.th-sidebar-open .th-sidebar-backdrop{
		display:block;
	}

	body.th-sidebar-collapsed .th-sidebar{
		width:300px;
	}

	body.th-sidebar-collapsed .th-sidebar-brand-text,
	body.th-sidebar-collapsed .th-sidebar-link span,
	body.th-sidebar-collapsed .th-sidebar-label,
	body.th-sidebar-collapsed .th-sidebar-user-info{
		display:flex;
	}

	body.th-sidebar-collapsed .th-sidebar-label{
		display:block;
	}

	body.th-sidebar-collapsed .th-sidebar-link{
		justify-content:flex-start;
		padding:12px 14px;
	}
}

html[data-theme="dark"] .th-sidebar{
	background:var(--th-card-bg-glass);
	border-color:var(--th-border-base);
	box-shadow:
		0 26px 70px var(--th-shadow-card),
		inset 0 1px 0 var(--th-final-box-inset);
}

html[data-theme="dark"] .th-sidebar-header{
	border-bottom-color:var(--th-border-base);
}

html[data-theme="dark"] .th-sidebar-footer{
	border-top-color:var(--th-border-base);
}

html[data-theme="dark"] .th-sidebar-link{
	color:var(--th-color-text-muted);
}

html[data-theme="dark"] .th-sidebar-link:hover{
	color:var(--th-color-text-main);
	background:var(--th-badge-bg);
}

html[data-theme="dark"] .th-sidebar-user{
	background:var(--th-badge-bg);
	border:1px solid var(--th-badge-border);
}

html[data-theme="dark"] .th-sidebar-brand-text strong,
html[data-theme="dark"] .th-sidebar-user-info strong{
	color:var(--th-color-text-main);
}

html[data-theme="dark"] .th-sidebar-brand-text span,
html[data-theme="dark"] .th-sidebar-user-info span,
html[data-theme="dark"] .th-sidebar-label{
	color:var(--th-color-text-muted);
}

html[data-theme="dark"] .th-sidebar-tooltip{
	background:var(--th-color-text-main);
	color:var(--th-hero-bg);
	box-shadow:0 16px 38px var(--th-shadow-card);
}

/* =========================================================
	MOBILE NAVBAR
========================================================= */

.th-mobile-navbar{
	display:none;
}

.th-sidebar-mobile-btn{
	display:none;
}

@media(max-width:991px){
	.th-mobile-navbar{
		position:fixed;
		top:16px;
		left:16px;
		right:16px;
		z-index:1050;
		height:64px;
		padding:10px 12px 10px 14px;
		display:flex;
		align-items:center;
		justify-content:space-between;
		gap:14px;
		border-radius:22px;
		border:1px solid var(--th-border-base);
		background:var(--th-card-bg-glass);
		box-shadow:0 18px 50px var(--th-shadow-card);
		backdrop-filter:blur(20px);
		-webkit-backdrop-filter:blur(20px);
	}

	.th-mobile-brand{
		display:flex;
		align-items:center;
		gap:12px;
		min-width:0;
	}

	.th-mobile-logo{
		width:44px;
		height:44px;
		object-fit:contain;
		filter:drop-shadow(0 10px 20px var(--th-glow-cyan));
		flex:0 0 auto;
	}

	.th-mobile-brand-text{
		display:flex;
		flex-direction:column;
		line-height:1.05;
		min-width:0;
	}

	.th-mobile-brand-text strong{
		color:var(--th-color-text-main);
		font-size:1rem;
		font-weight:950;
		letter-spacing:-.03em;
		white-space:nowrap;
	}

	.th-mobile-brand-text span{
		color:var(--th-color-text-muted);
		font-size:.72rem;
		font-weight:800;
		white-space:nowrap;
	}

    .th-mobile-navbar .th-sidebar-mobile-btn{
        position:static;
        width:46px;
        height:46px;
        display:flex;
        align-items:center;
        justify-content:center;
        border:none;
        border-radius:16px;
        background:var(--th-gradient-cta);
        color:var(--th-color-white);
        font-size:1.45rem;
        box-shadow:0 14px 34px var(--th-glow-indigo);
    }

    html[data-theme="dark"] .th-mobile-navbar .th-sidebar-mobile-btn{
        background:var(--th-card-bg-hover);
        color:var(--th-color-text-main);
        border:1px solid var(--th-border-glass);
        box-shadow:0 14px 34px var(--th-shadow-card);
    }
}

/* =========================================================
	DARK MOBILE SIDEBAR CONTRAST
========================================================= */

@media(max-width:991px){
	html[data-theme="dark"] .th-sidebar{
		background:
			linear-gradient(180deg, rgba(6, 78, 59, .96), rgba(2, 44, 34, .98)),
			#022c22;
		border:1px solid rgba(134, 239, 172, .22);
		box-shadow:
			0 26px 70px rgba(0, 0, 0, .58),
			0 0 0 1px rgba(187, 247, 208, .08),
			inset 0 1px 0 rgba(255, 255, 255, .08);
	}

	html[data-theme="dark"] .th-sidebar-backdrop{
		background:rgba(0, 20, 12, .52);
		backdrop-filter:blur(8px);
		-webkit-backdrop-filter:blur(8px);
	}

	html[data-theme="dark"] .th-mobile-navbar{
		background:
			linear-gradient(135deg, rgba(6, 78, 59, .92), rgba(2, 44, 34, .96)),
			#022c22;
		border:1px solid rgba(134, 239, 172, .22);
		box-shadow:
			0 20px 55px rgba(0, 0, 0, .48),
			inset 0 1px 0 rgba(255, 255, 255, .08);
	}

	html[data-theme="dark"] .th-sidebar-link{
		color:rgba(220, 252, 231, .78);
	}

	html[data-theme="dark"] .th-sidebar-label{
		color:rgba(220, 252, 231, .72);
	}

	html[data-theme="dark"] .th-sidebar-user{
		background:rgba(20, 83, 45, .58);
		border:1px solid rgba(134, 239, 172, .24);
	}
}

/* =========================================================
	COLLAPSED SIDEBAR STEP STATUS
========================================================= */

body.th-sidebar-collapsed .th-sidebar-link{
	width:54px;
	height:54px;
	min-height:54px;
	margin:0 auto 12px;
	padding:0;
	justify-content:center;
	overflow:visible;
}

body.th-sidebar-collapsed .th-sidebar-link > i:not(.th-sidebar-step-state i){
	width:auto;
	font-size:1.25rem;
}

body.th-sidebar-collapsed .th-sidebar-step-state{
	position:absolute;
	right:-7px;
	bottom:-7px;
	z-index:4;
	width:24px;
	height:24px;
	margin-left:0;
	border-radius:999px;
	background:var(--th-card-bg-glass);
	border:2px solid var(--th-card-bg-glass);
	box-shadow:0 8px 18px var(--th-shadow-card);
	font-size:.75rem;
}

body.th-sidebar-collapsed .th-sidebar-link.active .th-sidebar-step-state{
	background:rgba(255, 255, 255, .18);
	border-color:rgba(255, 255, 255, .32);
	color:var(--th-color-white);
}

body.th-sidebar-collapsed .th-sidebar-link.th-step-status-completed .th-sidebar-step-state{
	background:#dcfce7;
	border-color:#ffffff;
	color:#16a34a;
}

body.th-sidebar-collapsed .th-sidebar-link.th-step-status-pending .th-sidebar-step-state{
	background:#ffffff;
	border-color:#e2e8f0;
	color:#64748b;
}

body.th-sidebar-collapsed .th-sidebar-link.th-step-status-active .th-sidebar-step-state{
	background:#052e16;
	border-color:#ffffff;
	color:#86efac;
}

html[data-theme="dark"] body.th-sidebar-collapsed .th-sidebar-step-state{
	background:#052e16;
	border-color:rgba(134, 239, 172, .22);
	box-shadow:0 8px 18px rgba(0, 0, 0, .38);
}

html[data-theme="dark"] body.th-sidebar-collapsed .th-sidebar-link.th-step-status-pending .th-sidebar-step-state{
	background:#022c22;
	border-color:rgba(134, 239, 172, .24);
	color:rgba(220, 252, 231, .72);
}

html[data-theme="dark"] body.th-sidebar-collapsed .th-sidebar-link.th-step-status-completed .th-sidebar-step-state{
	background:rgba(34, 197, 94, .18);
	border-color:rgba(134, 239, 172, .34);
	color:#86efac;
}

.th-sidebar-mobile-actions{
	display:none;
}

@media(max-width:991px){
	.th-sidebar-mobile-actions{
		position:relative;
		display:flex;
		justify-content:center;
		align-items:center;
		width:100%;
		padding:20px 16px 18px;
		margin-bottom:8px;
		border-bottom:1px solid var(--th-border-base);
		overflow:visible !important;
		z-index:1065;
	}

	.th-sidebar-mobile-actions .th-main-actions,
	.th-sidebar-mobile-actions .th-header-actions-group{
		position:relative !important;
		width:100%;
		display:flex;
		justify-content:center;
		align-items:center;
		gap:14px;
		flex-wrap:wrap;
		overflow:visible !important;
	}

	.th-sidebar-mobile-actions .th-preferences-main{
		width:56px;
		height:56px;
		min-width:56px;
		border-radius:22px;
	}
}