:root {
	--res-teal: #0a6b68;
	--res-teal-dark: #085452;
	--res-teal-light: #e8f4f4;
	--res-text: #1a1a1a;
	--res-text-muted: #6b7280;
	--res-border: #e5e7eb;
	--res-input-bg: #f9fafb;
}

body {
	background: #fff !important;
}

body .web-footer,
body .navbar,
body .page-breadcrumbs {
	display: none !important;
}

body .page-content-wrapper,
body .page-content {
	padding: 0 !important;
	margin: 0 !important;
	max-width: none !important;
	min-height: 100vh !important;
}

.res-login-wrapper {
	display: flex;
	min-height: 100vh;
	width: 100%;
}

/* ── Left hero panel ── */
.res-login-hero {
	position: relative;
	flex: 1 1 55%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 3rem 3.5rem;
	color: #fff !important;
	overflow: hidden;
	background-color: var(--res-teal-dark);
}

.res-login-hero::before {
	content: "";
	position: absolute;
	inset: 0;
	background: url("/assets/lms/images/login-hero.jpg") center / cover no-repeat;
	opacity: 0.55;
}

.res-login-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(
		135deg,
		rgba(10, 107, 104, 0.72) 0%,
		rgba(8, 84, 82, 0.65) 100%
	);
}

.res-login-hero > * {
	position: relative;
	z-index: 1;
}

.res-login-hero h1 {
	font-size: clamp(1.75rem, 3vw, 2.5rem);
	font-weight: 800;
	line-height: 1.25;
	max-width: 32rem;
	margin: 0;
	letter-spacing: -0.02em;
	color: #ffffff;
}

.res-login-hero p {
	font-size: 1rem;
	line-height: 1.6;
	max-width: 30rem;
	margin: 1.25rem 0 0;
	opacity: 0.9;
}

.res-login-stats {
	display: flex;
	gap: 3rem;
	margin-top: auto;
	padding-top: 3rem;
}

.res-login-stat strong {
	display: block;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.2;
}

.res-login-stat span {
	font-size: 0.875rem;
	opacity: 0.85;
}

/* ── Right form panel ── */
.res-login-panel {
	flex: 1 1 45%;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 2.5rem 2rem;
	background: #fff;
	min-width: 0;
}

.res-login-form-wrap {
	width: 100%;
	max-width: 400px;
}

.res-login-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 2.5rem;
}

.res-login-brand img {
	width: 44px;
	height: 44px;
	object-fit: contain;
}

.res-login-brand-text strong {
	display: block;
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--res-text);
	line-height: 1.2;
}

.res-login-brand-text span {
	font-size: 0.8rem;
	color: var(--res-text-muted);
}

.res-login-heading h2 {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--res-text);
	margin: 0 0 0.35rem;
}

.res-login-heading p {
	font-size: 0.9rem;
	color: var(--res-text-muted);
	margin: 0 0 1.75rem;
}

/* ── Section visibility (login.js) ── */
.res-login-form-wrap .for-forgot,
.res-login-form-wrap .for-login-with-email-link,
.res-login-form-wrap .for-signup,
.res-login-form-wrap .for-email-login {
	display: none;
}

/* ── Form fields ── */
.res-login-form-wrap .page-card-head {
	display: none;
}

.res-login-form-wrap .login-content.page-card,
.res-login-form-wrap .page-card {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
	margin: 0;
	max-width: none;
	border-radius: 0;
}

.res-login-form-wrap form {
	max-width: none;
	margin: 0;
}

.res-login-form-wrap .form-group {
	margin-bottom: 1.25rem;
}

.res-login-form-wrap .form-label {
	display: block;
	font-size: 0.875rem;
	font-weight: 500;
	color: #374151;
	margin-bottom: 0.4rem;
}

.res-login-form-wrap .form-label.sr-only {
	position: static;
	width: auto;
	height: auto;
	padding: 0;
	margin-bottom: 0.4rem;
	clip: auto;
	white-space: normal;
}

.res-login-form-wrap .res-field-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 0.4rem;
}

.res-login-form-wrap .res-field-row .form-label {
	margin-bottom: 0;
}

.res-login-form-wrap input[type="text"],
.res-login-form-wrap input[type="email"],
.res-login-form-wrap input[type="password"] {
	width: 100%;
	padding: 0.7rem 0.9rem;
	border: 1px solid var(--res-border);
	border-radius: 8px;
	background: var(--res-input-bg);
	font-size: 0.9rem;
	color: var(--res-text);
	margin-bottom: 0;
	transition: border-color 0.15s, box-shadow 0.15s;
}

.res-login-form-wrap input:focus {
	outline: none;
	border-color: var(--res-teal);
	box-shadow: 0 0 0 3px rgba(10, 107, 104, 0.12);
}

.res-login-form-wrap .page-card-body.invalid input {
	border-color: #ef4444;
}

.res-login-form-wrap .email-field,
.res-login-form-wrap .password-field {
	position: relative;
}

.res-login-form-wrap .field-icon {
	display: none;
}

.res-login-form-wrap .email-field input,
.res-login-form-wrap .password-field input {
	padding-left: 0.9rem;
}

.res-login-form-wrap .toggle-password {
	right: 0.75rem;
	top: 50%;
	transform: translateY(-50%);
	position: absolute;
	font-size: 0.75rem;
	color: var(--res-text-muted);
	cursor: pointer;
}

.res-login-form-wrap .forgot-password-message {
	display: none;
}

.res-login-form-wrap .res-forgot-link {
	font-size: 0.8rem;
	color: var(--res-teal);
	text-decoration: none;
	font-weight: 500;
}

.res-login-form-wrap .res-forgot-link:hover {
	text-decoration: underline;
	color: var(--res-teal-dark);
}

.res-login-form-wrap .res-remember {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	font-size: 0.875rem;
	color: #374151;
}

.res-login-form-wrap .res-remember input[type="checkbox"] {
	width: 1rem;
	height: 1rem;
	accent-color: var(--res-teal);
}

/* ── Buttons ── */
.res-login-form-wrap .page-card-actions {
	margin-top: 0;
}

.res-login-form-wrap .btn-login,
.res-login-form-wrap .btn-forgot,
.res-login-form-wrap .btn-signup,
.res-login-form-wrap .btn-login-with-email-link {
	width: 100%;
	padding: 0.75rem 1.25rem;
	background: var(--res-teal) !important;
	border: none !important;
	border-radius: 8px;
	color: #fff !important;
	font-size: 0.95rem;
	font-weight: 600;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	transition: background 0.15s;
	box-shadow: none;
}

.res-login-form-wrap .btn-login:hover,
.res-login-form-wrap .btn-forgot:hover,
.res-login-form-wrap .btn-signup:hover,
.res-login-form-wrap .btn-login-with-email-link:hover {
	background: var(--res-teal-dark) !important;
}

.res-login-form-wrap .btn-default,
.res-login-form-wrap .btn-login-option {
	background: var(--res-input-bg) !important;
	border: 1px solid var(--res-border) !important;
	color: var(--res-text) !important;
	border-radius: 8px;
	margin-bottom: 0.5rem;
}

.res-login-form-wrap .sign-up-message {
	text-align: center;
	margin-top: 1.5rem;
	font-size: 0.875rem;
	color: var(--res-text-muted);
}

.res-login-form-wrap .sign-up-message a {
	color: var(--res-teal);
	font-weight: 600;
	text-decoration: none;
}

.res-login-form-wrap .sign-up-message a:hover {
	text-decoration: underline;
}

.res-login-form-wrap .social-logins {
	margin-top: 1.25rem;
}

.res-login-form-wrap .login-divider {
	font-size: 0.8rem;
	color: var(--res-text-muted);
	margin: 1rem 0;
}

.res-login-form-wrap .social-login-buttons {
	display: flex;
	flex-direction: column;
	gap: 0.5rem;
}

.res-login-form-wrap .login-button-wrapper {
	width: 100%;
	padding: 0;
	margin: 0;
}

.res-login-copyright {
	margin-top: auto;
	padding-top: 2rem;
	font-size: 0.75rem;
	color: #9ca3af;
	text-align: center;
}

/* ── Invalid shake ── */
.res-login-form-wrap .invalid-login {
	animation: res-wiggle 0.5s linear;
}

@keyframes res-wiggle {
	8%, 41% { transform: translateX(-8px); }
	25%, 58% { transform: translateX(8px); }
	75% { transform: translateX(-4px); }
	92% { transform: translateX(4px); }
	0%, 100% { transform: translateX(0); }
}

/* ── Responsive ── */
@media (max-width: 900px) {
	.res-login-wrapper {
		flex-direction: column;
	}

	.res-login-hero {
		flex: none;
		padding: 2rem 1.5rem;
		min-height: 220px;
	}

	.res-login-hero h1 {
		font-size: 1.5rem;
	}

	.res-login-stats {
		gap: 2rem;
		padding-top: 1.5rem;
	}

	.res-login-stat strong {
		font-size: 1.25rem;
	}

	.res-login-panel {
		padding: 2rem 1.25rem 2.5rem;
	}
}
