/**
 * CodeClove Student & Guardian Portal - Login Card Styles
 *
 * Adapted from the legacy Academia EDS mobile experience while preserving
 * the Academia School Management brand identity and WordPress compatibility.
 *
 * @package CodeClove\Modules\Portal
 */

:root {
	--codeclove-brand: #6c47ff;
	--codeclove-brand-hover: #5533e6;
	--codeclove-brand-light: #f4f1ff;
	--codeclove-brand-soft: #ede7ff;
	--codeclove-border: #e6e3f2;
	--codeclove-text: #1d1a33;
	--codeclove-muted: #6b6885;
	--codeclove-surface: #ffffff;
	--codeclove-shadow: 0 18px 40px rgba(98, 76, 255, 0.12);
}

.codeclove-portal-login-wrap {
	position: relative;
	max-width: 440px;
	width: min(100%, 440px);
	margin: 32px auto 48px;
	padding: 32px 24px 24px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 247, 255, 0.98));
	border: 1px solid var(--codeclove-border);
	border-radius: 24px;
	box-shadow: var(--codeclove-shadow);
	font-family: "Plus Jakarta Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--codeclove-text);
	box-sizing: border-box;
	overflow: hidden;
}

.codeclove-portal-login-wrap::before,
.codeclove-portal-login-wrap::after {
	content: "";
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}

.codeclove-portal-login-wrap::before {
	width: 220px;
	height: 220px;
	background: rgba(108, 71, 255, 0.08);
	top: -90px;
	right: -70px;
}

.codeclove-portal-login-wrap::after {
	width: 170px;
	height: 170px;
	background: rgba(108, 71, 255, 0.06);
	bottom: -90px;
	left: -60px;
}

.codeclove-portal-login-wrap * {
	box-sizing: border-box;
	position: relative;
	z-index: 1;
}

.codeclove-portal-brand {
	text-align: center;
	margin-bottom: 24px;
}

.codeclove-portal-logo {
	width: 64px;
	height: 64px;
	margin: 0 auto 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, var(--codeclove-brand-light), var(--codeclove-brand-soft));
	border: 1px solid rgba(108, 71, 255, 0.18);
	border-radius: 18px;
	padding: 10px;
	box-shadow: 0 12px 24px rgba(108, 71, 255, 0.12);
}

.codeclove-portal-logo img {
	width: 100%;
	height: 100%;
	object-fit: contain;
}

.codeclove-portal-title {
	margin: 0 0 8px;
	font-size: clamp(1.35rem, 2vw, 1.8rem);
	font-weight: 800;
	letter-spacing: -0.04em;
	color: var(--codeclove-text);
}

.codeclove-portal-subtitle {
	margin: 0;
	font-size: 0.875rem;
	color: var(--codeclove-muted);
	line-height: 1.5;
}

.codeclove-portal-alert {
	padding: 12px 14px;
	border-radius: 12px;
	font-size: 0.85rem;
	margin-bottom: 20px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
	display: flex;
	align-items: center;
	gap: 8px;
}

.codeclove-portal-login-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.codeclove-login-field {
	margin: 0;
}

.codeclove-login-label {
	display: block;
	font-size: 0.8125rem;
	font-weight: 700;
	color: #334155;
	margin-bottom: 7px;
}

.codeclove-login-input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid rgba(108, 71, 255, 0.18);
	border-radius: 12px;
	font-size: 0.95rem;
	outline: none;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
	color: var(--codeclove-text);
	background: rgba(255, 255, 255, 0.9);
}

.codeclove-login-input:focus {
	border-color: var(--codeclove-brand);
	box-shadow: 0 0 0 4px var(--codeclove-brand-light);
}

.codeclove-login-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 0.8125rem;
	margin-top: -2px;
}

.codeclove-login-remember {
	display: flex;
	align-items: center;
	gap: 7px;
	cursor: pointer;
	color: #475569;
	user-select: none;
}

.codeclove-login-remember input[type="checkbox"] {
	width: 15px;
	height: 15px;
	accent-color: var(--codeclove-brand);
	margin: 0;
	cursor: pointer;
}

.codeclove-login-forgot {
	color: var(--codeclove-brand);
	text-decoration: none;
	font-weight: 600;
}

.codeclove-login-forgot:hover {
	text-decoration: underline;
}

.codeclove-portal-submit-btn {
	width: 100%;
	padding: 13px 18px;
	background: linear-gradient(135deg, var(--codeclove-brand), var(--codeclove-brand-hover));
	color: #ffffff;
	font-weight: 700;
	font-size: 0.95rem;
	border: none;
	border-radius: 999px;
	cursor: pointer;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
	box-shadow: 0 12px 20px rgba(108, 71, 255, 0.22);
}

.codeclove-portal-submit-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 14px 24px rgba(108, 71, 255, 0.24);
}

.codeclove-portal-submit-btn:active {
	transform: translateY(0) scale(0.99);
}

.codeclove-portal-footer {
	margin-top: 22px;
	text-align: center;
	font-size: 0.775rem;
	color: #7c7b92;
	line-height: 1.5;
}

@media (max-width: 480px) {
	.codeclove-portal-login-wrap {
		margin: 18px 12px 28px;
		padding: 26px 18px 20px;
		border-radius: 22px;
	}

	.codeclove-login-row {
		flex-direction: column;
		align-items: flex-start;
		margin-top: 0;
	}

	.codeclove-login-forgot {
		margin-top: 4px;
	}
}
