:root {
	--purple-900: #3e2472;
	--purple-700: #5b3fc4;
	--purple-600: #6d4fe0;
	--purple-500: #8b6ef2;
	--purple-300: #c9b8fa;
	--purple-100: #f2edff;
	--pink-200: #fbd7e8;
	--bg-top: #ece3ff;
	--bg-bottom: #ffffff;
	--white: #ffffff;
	--gray-400: #9ca3af;
	--text-dark: #3a2e52;
}

* {
	box-sizing: border-box;
}

html, body {
	margin: 0;
	padding: 0;
	height: 100%;
	font-family: "Apple SD Gothic Neo", "Malgun Gothic", "Segoe UI", sans-serif;
	background: linear-gradient(180deg, var(--bg-top) 0%, #f8f4ff 40%, var(--bg-bottom) 100%);
	color: var(--text-dark);
}

.page {
	display: flex;
	justify-content: center;
	align-items: flex-start;
	min-height: 100vh;
	padding: 24px 0;
}

.screen {
	position: relative;
	width: 100%;
	max-width: 400px;
	min-height: 100vh;
	background: linear-gradient(180deg, var(--bg-top) 0%, #f8f4ff 40%, var(--bg-bottom) 100%);
	overflow: hidden;
	padding: 48px 28px 24px;
	display: flex;
	flex-direction: column;
}

@media (min-width: 480px) {
	.screen {
		min-height: 812px;
		border-radius: 36px;
		box-shadow: 0 24px 60px rgba(93, 63, 196, 0.25);
		border: 1px solid rgba(255, 255, 255, 0.6);
	}
}

/* decorative sparkles */
.sparkle {
	position: absolute;
	color: var(--purple-300);
	opacity: 0.7;
	pointer-events: none;
}
.sparkle.s1 { top: 46px; left: 90px; font-size: 14px; }
.sparkle.s2 { top: 90px; right: 30px; font-size: 20px; color: var(--purple-500); }
.sparkle.s3 { top: 150px; left: 40px; font-size: 10px; }
.sparkle.s4 { top: 210px; right: 60px; font-size: 12px; }
.sparkle.s5 { top: 20px; right: 90px; font-size: 10px; }

/* back button */
.back-btn {
	position: absolute;
	top: 18px;
	left: 18px;
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: var(--white);
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 4px 12px rgba(109, 79, 224, 0.15);
	color: var(--purple-600);
	text-decoration: none;
	z-index: 10;
}

.back-btn:hover {
	background: var(--purple-100);
}

/* brand */
.brand {
	text-align: center;
	margin-bottom: 28px;
}

.logo-badge {
	width: 56px;
	height: 56px;
	margin: 0 auto 10px;
	background: var(--white);
	border-radius: 20px 20px 20px 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	box-shadow: 0 8px 20px rgba(109, 79, 224, 0.25);
}

.logo-badge svg {
	width: 30px;
	height: 30px;
}

.logo-text {
	margin: 0;
	font-size: 26px;
	font-weight: 800;
	letter-spacing: 1px;
	color: var(--purple-700);
	text-shadow: 0 2px 0 rgba(255, 255, 255, 0.6);
}

.tagline {
	margin: 6px 0 0;
	font-size: 13px;
	color: var(--purple-500);
	font-weight: 600;
}

/* secondary pages (password reset, find email, ...) */
.page-title {
	margin: 18px 0 10px;
	font-size: 21px;
	font-weight: 800;
	color: var(--text-dark);
	text-align: center;
}

.page-subtitle {
	margin: 0 0 26px;
	font-size: 13px;
	line-height: 1.6;
	color: #8b81a3;
	text-align: center;
}

/* form */
.login-form {
	margin-top: 8px;
}

.input-group {
	display: flex;
	align-items: center;
	background: var(--white);
	border-radius: 16px;
	padding: 0 16px;
	height: 52px;
	margin-bottom: 14px;
	box-shadow: 0 4px 14px rgba(109, 79, 224, 0.10);
}

.input-group .icon {
	display: flex;
	align-items: center;
	justify-content: center;
	color: var(--purple-500);
	margin-right: 10px;
}

.input-group input {
	flex: 1;
	border: none;
	outline: none;
	font-size: 15px;
	background: transparent;
	color: var(--text-dark);
}

.input-group input::placeholder {
	color: #b9b3cf;
}

.input-group .toggle-eye {
	background: none;
	border: none;
	cursor: pointer;
	color: var(--gray-400);
	display: flex;
	align-items: center;
	padding: 4px;
}

.input-row {
	display: flex;
	gap: 8px;
	margin-bottom: 14px;
}

.input-row .input-group {
	flex: 1;
	margin-bottom: 0;
	min-width: 0;
}

.btn-inline {
	flex-shrink: 0;
	padding: 0 14px;
	height: 52px;
	border: none;
	border-radius: 16px;
	background: linear-gradient(135deg, var(--purple-600), var(--purple-700));
	color: var(--white);
	font-size: 12.5px;
	font-weight: 700;
	white-space: nowrap;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(93, 63, 196, 0.25);
}

.remember {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 13px;
	color: var(--text-dark);
	margin: 4px 2px 20px;
	cursor: pointer;
	user-select: none;
}

.remember input {
	display: none;
}

.remember .checkmark {
	width: 18px;
	height: 18px;
	border-radius: 5px;
	background: var(--purple-600);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.remember input:not(:checked) + .checkmark {
	background: var(--white);
	border: 1.5px solid #d8d1f0;
}

.remember .checkmark::after {
	content: "";
	width: 5px;
	height: 9px;
	border: solid var(--white);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	margin-top: -2px;
	display: none;
}

.remember input:checked + .checkmark::after {
	display: block;
}

.btn-login {
	width: 100%;
	height: 54px;
	border: none;
	border-radius: 16px;
	background: linear-gradient(135deg, var(--purple-600), var(--purple-700));
	color: var(--white);
	font-size: 16px;
	font-weight: 700;
	cursor: pointer;
	box-shadow: 0 10px 24px rgba(93, 63, 196, 0.35);
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-login:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 28px rgba(93, 63, 196, 0.4);
}

.btn-login:active {
	transform: translateY(0);
}

.links {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	margin-top: 18px;
	font-size: 13px;
}

.links a {
	color: #7c7391;
	text-decoration: none;
}

.links a:hover {
	color: var(--purple-700);
}

.links .divider {
	color: #d8d1f0;
}

/* terms / signup page */
.terms-title {
	margin: 18px 0 24px;
	font-size: 21px;
	font-weight: 800;
	line-height: 1.4;
	color: var(--text-dark);
	text-align: center;
}

.terms-list {
	background: var(--white);
	border-radius: 16px;
	padding: 4px 16px;
	box-shadow: 0 4px 14px rgba(109, 79, 224, 0.10);
}

.terms-item {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 14px 0;
	border-bottom: 1px solid #f0eafb;
	cursor: pointer;
	user-select: none;
}

.terms-item:last-child {
	border-bottom: none;
}

.terms-item input {
	display: none;
}

.terms-item .checkmark {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: var(--purple-600);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.terms-item input:not(:checked) + .checkmark {
	background: var(--white);
	border: 1.5px solid #d8d1f0;
}

.terms-item .checkmark::after {
	content: "";
	width: 5px;
	height: 9px;
	border: solid var(--white);
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
	margin-top: -2px;
	display: none;
}

.terms-item input:checked + .checkmark::after {
	display: block;
}

.terms-text {
	flex: 1;
	font-size: 13.5px;
	color: var(--text-dark);
}

.terms-text .req {
	color: var(--purple-600);
	font-weight: 600;
}

.terms-text .opt {
	color: var(--gray-400);
	font-weight: 600;
}

.terms-item .chevron {
	color: #c9c2de;
	flex-shrink: 0;
}

.terms-list + .btn-login {
	margin-top: 24px;
}

.decor-heart {
	position: absolute;
	color: var(--purple-300);
	opacity: 0.8;
	pointer-events: none;
	font-size: 16px;
}

/* illustration */
.illustration {
	margin-top: auto;
	padding-top: 28px;
}

.illustration svg {
	width: 100%;
	height: auto;
	display: block;
}
