/**
 * Auth switcher — login / register (KernelBox: accent + topbar).
 */

.kb-login-portal main,
.kb-login-portal .kb-main{
	padding: 0;
	padding-top: var(--kb-header-height, 118px);
	margin: 0;
	max-width: none;
	width: 100%;
	box-sizing: border-box;
}

.kb-login-portal .kb-article__header,
.kb-login-portal .kb-article__title,
.kb-login-portal.woocommerce-account .woocommerce-MyAccount-navigation{
	display: none !important;
}

.kb-login-portal-wrap{
	min-height: calc(100vh - var(--kb-header-height, 118px));
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(20px, 3vw, 40px) clamp(16px, 3vw, 24px);
	background: linear-gradient(180deg, #fafbfd 0%, #f0f3f8 100%);
}

.kb-auth{
	--kb-auth-brand: var(--kb-accent, #3ac7a3);
	--kb-auth-brand-dark: #2a9d7e;
	--kb-auth-brand-deep: var(--kb-topbar, #241b4a);
	--kb-auth-input-bg: #f3f4f6;
	--kb-auth-text: var(--kb-text, #0f172a);
	--kb-auth-muted: #9ca3af;
	--kb-auth-h: clamp(340px, 44vh, 390px);
	width: 100%;
	max-width: 900px;
}

.kb-auth__card{
	position: relative;
	background: #fff;
	border-radius: 22px;
	overflow: hidden;
	box-shadow:
		0 4px 24px rgba(15, 23, 42, 0.06),
		0 24px 64px rgba(109, 74, 240, 0.08);
	min-height: var(--kb-auth-h);
}

/* White form columns (under sliding curtain) */
.kb-auth__base{
	display: flex;
	width: 100%;
	min-height: var(--kb-auth-h);
}

.kb-auth__half{
	flex: 1 1 50%;
	min-width: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: clamp(16px, 2.5vw, 22px) clamp(16px, 2.2vw, 24px);
	box-sizing: border-box;
}

.kb-auth__form-stack{
	width: 100%;
	max-width: 320px;
	margin: 0 auto;
}

.kb-auth__visual{
	display: block;
	width: min(148px, 58%);
	height: auto;
	margin: 0 auto 8px;
	object-fit: contain;
	filter: none;
}

/* Sliding brand curtain (swipe) */
.kb-auth__curtain{
	position: absolute;
	top: 0;
	right: 0;
	width: 50%;
	height: 100%;
	z-index: 4;
	overflow: hidden;
	transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.kb-auth--register-active .kb-auth__curtain{
	transform: translateX(-100%);
}

.kb-auth__curtain-track{
	display: flex;
	width: 200%;
	height: 100%;
	transition: transform 0.55s cubic-bezier(0.4, 0, 0.2, 1);
	will-change: transform;
}

.kb-auth--register-active .kb-auth__curtain-track{
	transform: translateX(-50%);
}

.kb-auth__curtain-panel{
	flex: 0 0 50%;
	width: 50%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	text-align: center;
	padding: clamp(18px, 3vw, 28px);
	box-sizing: border-box;
	color: #fff;
	background: linear-gradient(
		165deg,
		#5fe0c4 0%,
		var(--kb-auth-brand, #3ac7a3) 48%,
		var(--kb-auth-brand-dark, #2a9d7e) 100%
	);
}

.kb-auth__solo{
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	min-height: var(--kb-auth-h);
	padding: clamp(28px, 4vw, 40px) clamp(24px, 4vw, 36px);
	box-sizing: border-box;
}

.kb-auth__title{
	margin: 0 0 10px;
	font-size: clamp(1.35rem, 2.8vw, 1.65rem);
	font-weight: 800;
	color: var(--kb-auth-text);
	text-align: center;
	letter-spacing: -0.02em;
}

.kb-auth__overlay-title{
	margin: 0 0 10px;
	font-size: clamp(1.2rem, 2.6vw, 1.5rem);
	font-weight: 800;
	line-height: 1.2;
}

.kb-auth__overlay-text{
	margin: 0 0 22px;
	max-width: 26ch;
	font-size: 14px;
	line-height: 1.5;
	opacity: 0.92;
}

.kb-auth__divider{
	margin: 0 0 12px;
	text-align: center;
	font-size: 13px;
	color: var(--kb-auth-muted);
}

.kb-auth .woocommerce-form-login,
.kb-auth .woocommerce-form-register{
	margin: 0;
	padding: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	width: 100%;
}

.kb-auth .woocommerce-form-login .kb-auth__btn,
.kb-auth .woocommerce-form-register .kb-auth__btn{
	float: none;
	clear: both;
}

.kb-auth .woocommerce-privacy-policy-text,
.kb-auth .form-row.woocommerce-privacy-policy,
.kb-auth p.woocommerce-form-row.woocommerce-form-row--wide.form-row.privacy{
	display: none !important;
}

.kb-auth__field{
	margin: 0 0 10px;
}

.kb-auth__field label{
	margin: 0;
}

.kb-auth__field .input-text{
	width: 100%;
	box-sizing: border-box;
	height: 42px;
	padding: 0 14px;
	border: 0;
	border-radius: 10px;
	background: var(--kb-auth-input-bg);
	font-size: 14px;
	color: var(--kb-auth-text);
	outline: none;
	transition: box-shadow 0.2s ease, background 0.2s ease;
}

.kb-auth__field .input-text::placeholder{
	color: #a8b0bd;
}

.kb-auth__field .input-text:focus{
	background: #fff;
	box-shadow: 0 0 0 2px rgba(58, 199, 163, 0.45);
}

.kb-auth__forget{
	margin: 0 0 10px;
	text-align: center;
}

.kb-auth__forget a{
	font-size: 13px;
	color: var(--kb-auth-muted);
	text-decoration: none;
}

.kb-auth__forget a:hover{
	color: var(--kb-auth-brand-dark);
	text-decoration: underline;
}

.kb-auth__note{
	margin: 0 0 12px;
	font-size: 13px;
	color: var(--kb-auth-muted);
	text-align: center;
	line-height: 1.45;
}

.kb-auth__btn{
	display: flex;
	align-items: center;
	justify-content: center;
	width: min(100%, 260px);
	margin-left: auto;
	margin-right: auto;
	min-height: 42px;
	padding: 0 22px;
	border-radius: 10px;
	font-size: 13px;
	font-weight: 800;
	letter-spacing: 0.06em;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease, transform 0.15s ease;
}

.kb-auth__btn--solid{
	border: 0;
	color: #fff;
	background: linear-gradient(135deg, var(--kb-auth-brand) 0%, var(--kb-auth-brand-dark) 100%);
	box-shadow: 0 6px 20px rgba(58, 199, 163, 0.32);
}

.kb-auth__btn--solid:hover{
	transform: translateY(-1px);
	filter: brightness(1.05);
}

.kb-auth__btn--ghost{
	border: 2px solid #fff;
	color: #fff;
	background: transparent;
}

.kb-auth__btn--ghost:hover{
	background: rgba(255, 255, 255, 0.12);
}

.kb-auth .woocommerce-error,
.kb-auth .woocommerce-message,
.kb-auth .woocommerce-info{
	margin: 0 0 12px;
	padding: 10px 12px;
	border-radius: 10px;
	font-size: 13px;
	line-height: 1.45;
}

.kb-auth .woocommerce-error{
	background: #fef2f2;
	border: 1px solid #fecaca;
}

.kb-auth .woocommerce-message{
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
}

@media (max-width: 768px){
	.kb-login-portal-wrap{
		padding: 16px 12px 28px;
		align-items: flex-start;
	}

	.kb-auth{
		--kb-auth-h: auto;
	}

	.kb-auth__card{
		min-height: 0;
	}

	.kb-auth__base{
		flex-direction: column;
		min-height: 0;
	}

	.kb-auth__half{
		padding: 24px 20px;
	}

	.kb-auth__half--right{
		display: none;
	}

	.kb-auth--register-active .kb-auth__half--left{
		display: none;
	}

	.kb-auth--register-active .kb-auth__half--right{
		display: flex;
	}

	.kb-auth__curtain{
		display: none;
	}
}

@media (prefers-reduced-motion: reduce){
	.kb-auth__curtain,
	.kb-auth__curtain-track{
		transition: none;
	}
}
