/*
 * African Learning Sphere — auth pages (login / signup).
 * Colours come from --als-primary / --als-accent (injected by the plugin).
 */

.als-auth {
	--als-primary: #1f6feb;
	--als-accent: #f59e0b;
	--als-ink: #1c2530;
	--als-muted: #64748b;
	--als-line: #e2e8f0;
	--als-bg: #f1f5f9;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 80vh;
	padding: 32px 16px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	color: var(--als-ink);
}

.als-auth *,
.als-auth *::before,
.als-auth *::after {
	box-sizing: border-box;
}

.als-auth__card {
	width: 100%;
	max-width: 960px;
	background: #fff;
	border-radius: 18px;
	box-shadow: 0 24px 60px -20px rgba(15, 23, 42, 0.35);
	overflow: hidden;
}

.als-auth__card--split {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

.als-auth__aside {
	position: relative;
	padding: 48px 40px;
	color: #fff;
	background: linear-gradient(150deg, var(--als-primary), var(--als-accent));
	display: flex;
	align-items: center;
}

.als-auth__aside-inner {
	position: relative;
	z-index: 1;
}

.als-auth__logo {
	max-width: 160px;
	height: auto;
	margin-bottom: 28px;
	filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.2));
}

.als-auth__welcome {
	font-size: 1.75rem;
	line-height: 1.2;
	margin: 0 0 12px;
}

.als-auth__aside p {
	margin: 0;
	opacity: 0.92;
	font-size: 0.98rem;
	line-height: 1.6;
}

.als-auth__panel {
	padding: 48px 44px;
}

.als-auth__title {
	margin: 0 0 24px;
	font-size: 1.6rem;
}

.als-auth__form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.als-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.als-field__label {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--als-muted);
}

.als-field__input {
	width: 100%;
	padding: 12px 14px;
	border: 1px solid var(--als-line);
	border-radius: 10px;
	font-size: 0.95rem;
	background: #fff;
	color: var(--als-ink);
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.als-field__input:focus {
	outline: none;
	border-color: var(--als-primary);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--als-primary) 20%, transparent);
}

.als-field__password {
	position: relative;
	display: block;
}

.als-field__password .als-field__input {
	padding-right: 64px;
}

.als-field__toggle {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	border: none;
	background: transparent;
	color: var(--als-primary);
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	padding: 6px 8px;
}

.als-strength {
	display: block;
	height: 6px;
	margin-top: 8px;
	background: var(--als-line);
	border-radius: 999px;
	overflow: hidden;
}

.als-strength__bar {
	display: block;
	height: 100%;
	width: 0;
	border-radius: 999px;
	transition: width 0.25s ease, background-color 0.25s ease;
}

.als-strength__bar.is-weak { width: 25%; background: #ef4444; }
.als-strength__bar.is-fair { width: 50%; background: #f59e0b; }
.als-strength__bar.is-good { width: 75%; background: #3b82f6; }
.als-strength__bar.is-strong { width: 100%; background: #22c55e; }

.als-strength__label {
	display: block;
	margin-top: 4px;
	font-size: 0.75rem;
	color: var(--als-muted);
}

.als-auth__row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.als-checkbox {
	display: flex;
	align-items: center;
	gap: 8px;
	font-size: 0.88rem;
	color: var(--als-muted);
	cursor: pointer;
}

.als-checkbox input {
	width: 16px;
	height: 16px;
	accent-color: var(--als-primary);
}

.als-auth__link {
	color: var(--als-primary);
	text-decoration: none;
	font-size: 0.88rem;
}

.als-auth__link:hover { text-decoration: underline; }

.als-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 20px;
	border: 1px solid transparent;
	border-radius: 10px;
	font-size: 0.95rem;
	font-weight: 600;
	cursor: pointer;
	text-decoration: none;
	transition: transform 0.08s ease, filter 0.15s ease, background-color 0.15s ease;
}

.als-btn:active { transform: translateY(1px); }
.als-btn--block { width: 100%; }

.als-btn--primary { background: var(--als-primary); color: #fff; }
.als-btn--primary:hover { filter: brightness(0.95); }

.als-btn--accent { background: var(--als-accent); color: #1c1407; }
.als-btn--accent:hover { filter: brightness(0.96); }

.als-btn--ghost {
	background: transparent;
	border-color: var(--als-line);
	color: var(--als-ink);
}
.als-btn--ghost:hover { border-color: var(--als-primary); color: var(--als-primary); }

.als-btn[disabled] { opacity: 0.6; cursor: not-allowed; }

.als-auth__alt {
	margin: 22px 0 0;
	font-size: 0.9rem;
	color: var(--als-muted);
}

.als-auth__alt a { color: var(--als-primary); text-decoration: none; font-weight: 600; }
.als-auth__alt a:hover { text-decoration: underline; }

.als-auth__messages { margin-bottom: 8px; }

.als-auth__messages .als-msg {
	padding: 10px 14px;
	border-radius: 10px;
	font-size: 0.88rem;
	margin-bottom: 8px;
}

.als-msg--error { background: #fef2f2; color: #b91c1c; border: 1px solid #fecaca; }
.als-msg--success { background: #f0fdf4; color: #15803d; border: 1px solid #bbf7d0; }

/* Responsive */
@media (max-width: 768px) {
	.als-auth__card--split { grid-template-columns: 1fr; }
	.als-auth__aside { display: none; }
	.als-auth__panel { padding: 36px 28px; }
}

@media (prefers-reduced-motion: reduce) {
	.als-auth *,
	.als-strength__bar { transition: none !important; }
}
