/* Tiến Phạm Login - giao diện widget
   Mọi selector đều bắt đầu bằng .tpl-login để thắng style của theme,
   nhưng vẫn thấp hơn selector Elementor để các control trong editor ghi đè được. */

.tpl-login {
	--tpl-accent: #0f766e;
	--tpl-accent-2: #0d9488;
	--tpl-angle: 135deg;
	--tpl-dur: 380ms;
	--tpl-text: #10201f;
	--tpl-muted: #5b6b69;
	--tpl-line: #d9e2e0;
	--tpl-ring: rgba(15, 118, 110, 0.18);

	display: flex;
	justify-content: center;
	width: 100%;
	color: var(--tpl-text);
	font-size: 15px;
	line-height: 1.5;
}

.tpl-login,
.tpl-login *,
.tpl-login *::before,
.tpl-login *::after {
	box-sizing: border-box;
}

.tpl-login [hidden] {
	display: none !important;
}

/* ---------- Khung ---------- */
.tpl-login .tpl-shell {
	display: flex;
	width: 100%;
	max-width: 440px;
	background-color: #fff;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 24px 60px -28px rgba(16, 32, 31, 0.35), 0 0 0 1px rgba(16, 32, 31, 0.06);
}

.tpl-login.tpl-layout-split .tpl-shell {
	max-width: 940px;
}

.tpl-login .tpl-main {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 44px 40px;
}

.tpl-login .tpl-view {
	width: 100%;
}

.tpl-login .tpl-editor-note {
	margin: 0 0 18px;
	padding: 10px 12px;
	border: 1px dashed var(--tpl-line);
	border-radius: 10px;
	color: var(--tpl-muted);
	font-size: 12.5px;
}

/* ---------- Panel bên cạnh ---------- */
.tpl-login .tpl-aside {
	position: relative;
	flex: 0 0 44%;
	min-height: 560px;
	padding: 44px 40px;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
	color: #fff;
	background-color: #0b3d3a;
	background-size: cover;
	background-position: center;
	isolation: isolate;
}

.tpl-login .tpl-aside::before {
	content: "";
	position: absolute;
	inset: 0;
	z-index: -1;
	background: linear-gradient(165deg, var(--tpl-ov-a, rgba(11, 61, 58, 0.9)), var(--tpl-ov-b, rgba(15, 118, 110, 0.72)));
}

.tpl-login .tpl-aside-title {
	margin: 0 0 12px;
	padding: 0;
	color: inherit;
	font-size: 30px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.tpl-login .tpl-aside-text {
	margin: 0;
	color: inherit;
	opacity: 0.88;
	font-size: 15px;
	line-height: 1.6;
}

/* ---------- Tiêu đề ---------- */
.tpl-login .tpl-head {
	margin: 0 0 24px;
}

.tpl-login .tpl-title {
	margin: 0 0 8px;
	padding: 0;
	color: var(--tpl-text);
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.tpl-login .tpl-sub {
	margin: 0;
	padding: 0;
	color: var(--tpl-muted);
	font-size: 15px;
	line-height: 1.55;
}

/* Tổng quan */
.tpl-login .tpl-view-overview {
	text-align: center;
}

.tpl-login .tpl-view-overview .tpl-head {
	margin-bottom: 28px;
}

.tpl-login .tpl-title--ov {
	font-size: 30px;
}

.tpl-login .tpl-logo {
	margin: 0 0 22px;
}

.tpl-login .tpl-logo img {
	display: inline-block;
	width: 72px;
	max-width: 100%;
	height: auto;
}

.tpl-login .tpl-actions {
	display: flex;
	flex-direction: column;
	gap: 12px;
}

/* Đã đăng nhập */
.tpl-login .tpl-view-loggedin {
	text-align: center;
}

.tpl-login .tpl-avatar {
	margin: 0 0 18px;
}

.tpl-login .tpl-avatar img {
	display: inline-block;
	width: 84px;
	height: 84px;
	border-radius: 50%;
	object-fit: cover;
}

/* ---------- Form ---------- */
.tpl-login .tpl-form {
	display: flex;
	flex-direction: column;
	gap: 18px;
	margin: 0;
}

.tpl-login .tpl-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px !important;
	height: 1px !important;
	opacity: 0 !important;
	pointer-events: none !important;
}

.tpl-login .tpl-field {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.tpl-login .tpl-label {
	margin: 0;
	padding: 0;
	color: var(--tpl-text);
	font-size: 14px;
	font-weight: 600;
	line-height: 1.3;
}

.tpl-login .tpl-input-wrap {
	position: relative;
}

.tpl-login .tpl-input {
	display: block;
	width: 100%;
	height: auto;
	margin: 0;
	padding: 13px 16px;
	border: 1px solid var(--tpl-line);
	border-radius: 12px;
	background-color: #f6f9f8;
	color: var(--tpl-text);
	font: inherit;
	font-size: 16px;
	line-height: 1.4;
	box-shadow: none;
	outline: none;
	-webkit-appearance: none;
	appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.tpl-login .tpl-input::placeholder {
	color: #93a3a1;
	opacity: 1;
}

.tpl-login .tpl-input:focus {
	border-color: var(--tpl-accent);
	background-color: #fff;
	box-shadow: 0 0 0 4px var(--tpl-ring);
	outline: none;
}

.tpl-login .tpl-input.is-invalid {
	border-color: #dc2626;
}

.tpl-login.tpl-has-icons .tpl-input {
	padding-left: 46px;
}

.tpl-login .tpl-input-wrap.has-eye .tpl-input {
	padding-right: 48px;
}

.tpl-login .tpl-input-icon {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 15px;
	display: flex;
	align-items: center;
	color: #8a9b99;
	pointer-events: none;
}

.tpl-login .tpl-input-icon svg,
.tpl-login .tpl-eye svg {
	display: block;
	width: 19px;
	height: 19px;
}

.tpl-login .tpl-eye {
	position: absolute;
	top: 0;
	right: 6px;
	bottom: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 10px;
	background: transparent;
	color: #8a9b99;
	box-shadow: none;
	cursor: pointer;
	transition: color 0.2s ease;
}

.tpl-login .tpl-eye:hover,
.tpl-login .tpl-eye:focus-visible {
	background: transparent;
	color: var(--tpl-accent);
}

.tpl-login .tpl-eye .tpl-eye-off {
	display: none;
}

.tpl-login .tpl-eye.is-visible .tpl-eye-on {
	display: none;
}

.tpl-login .tpl-eye.is-visible .tpl-eye-off {
	display: inline-flex;
}

.tpl-login .tpl-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	flex-wrap: wrap;
}

.tpl-login .tpl-link-forgot {
	margin-left: auto;
}

/* Checkbox */
.tpl-login .tpl-check {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	margin: 0;
	color: var(--tpl-muted);
	font-size: 14px;
	cursor: pointer;
}

.tpl-login .tpl-check input {
	display: grid;
	place-content: center;
	width: 18px;
	height: 18px;
	margin: 0;
	border: 1.5px solid #b7c5c3;
	border-radius: 6px;
	background: #fff;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
	transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tpl-login .tpl-check input:checked {
	border-color: var(--tpl-accent);
	background: var(--tpl-accent);
}

.tpl-login .tpl-check input:checked::after {
	content: "";
	width: 5px;
	height: 9px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: translateY(-1px) rotate(45deg);
}

.tpl-login .tpl-check input:focus-visible {
	outline: 3px solid var(--tpl-ring);
	outline-offset: 1px;
}

/* ---------- Nút ---------- */
.tpl-login .tpl-btn {
	position: relative;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	margin: 0;
	padding: 14px 22px;
	border: 1.5px solid transparent;
	border-radius: 12px;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	box-shadow: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.tpl-login .tpl-btn-primary {
	color: #fff;
	background: linear-gradient(var(--tpl-angle), var(--tpl-btn-a, var(--tpl-accent)), var(--tpl-btn-b, var(--tpl-accent-2)));
	box-shadow: 0 10px 22px -12px var(--tpl-accent);
}

.tpl-login .tpl-btn-primary:hover,
.tpl-login .tpl-btn-primary:focus-visible {
	color: #fff;
	background: linear-gradient(
		var(--tpl-angle),
		var(--tpl-btn-ha, var(--tpl-btn-a, var(--tpl-accent))),
		var(--tpl-btn-hb, var(--tpl-btn-b, var(--tpl-accent-2)))
	);
	filter: brightness(1.07);
	transform: translateY(-1px);
}

.tpl-login .tpl-btn-secondary {
	color: var(--tpl-accent);
	background-color: transparent;
	background-image: none;
	border-color: var(--tpl-accent);
}

.tpl-login .tpl-btn-secondary:hover,
.tpl-login .tpl-btn-secondary:focus-visible {
	color: var(--tpl-accent);
	background-color: rgba(15, 118, 110, 0.08);
	border-color: var(--tpl-accent);
	transform: translateY(-1px);
}

.tpl-login .tpl-btn:focus-visible {
	outline: 3px solid var(--tpl-ring);
	outline-offset: 2px;
}

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

.tpl-login .tpl-btn:disabled {
	cursor: progress;
	opacity: 0.85;
}

/* Spinner */
.tpl-login .tpl-spinner {
	display: none;
	width: 16px;
	height: 16px;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #fff;
	border-radius: 50%;
	animation: tpl-spin 0.7s linear infinite;
}

.tpl-login .tpl-btn.is-loading .tpl-spinner {
	display: inline-block;
}

@keyframes tpl-spin {
	to {
		transform: rotate(360deg);
	}
}

/* ---------- Liên kết dạng nút ---------- */
.tpl-login .tpl-link,
.tpl-login .tpl-back {
	display: inline;
	margin: 0;
	padding: 0;
	border: 0;
	border-radius: 0;
	background: none;
	box-shadow: none;
	font: inherit;
	line-height: inherit;
	text-transform: none;
	letter-spacing: 0;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.tpl-login .tpl-link {
	color: var(--tpl-accent);
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
}

.tpl-login .tpl-link:hover,
.tpl-login .tpl-link:focus-visible {
	background: none;
	color: var(--tpl-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.tpl-login .tpl-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin: 0 0 22px;
	color: var(--tpl-muted);
	font-size: 14px;
	font-weight: 500;
}

.tpl-login .tpl-back svg {
	display: block;
	width: 17px;
	height: 17px;
}

.tpl-login .tpl-back:hover,
.tpl-login .tpl-back:focus-visible {
	background: none;
	color: var(--tpl-text);
}

.tpl-login .tpl-switch {
	margin: 22px 0 0;
	padding: 0;
	color: var(--tpl-muted);
	font-size: 14px;
	text-align: center;
}

/* ---------- Thông báo ---------- */
.tpl-login .tpl-msg {
	margin: 0;
	padding: 12px 14px;
	border: 1px solid transparent;
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.45;
}

.tpl-login .tpl-msg.is-error {
	color: #991b1b;
	background-color: #fef2f2;
	border-color: #fecaca;
}

.tpl-login .tpl-msg.is-success {
	color: #166534;
	background-color: #f0fdf4;
	border-color: #bbf7d0;
}

/* ---------- Hiệu ứng chuyển màn hình ---------- */
@keyframes tpl-in-slide {
	from { opacity: 0; transform: translateX(18px); }
	to { opacity: 1; transform: none; }
}

@keyframes tpl-in-fade-up {
	from { opacity: 0; transform: translateY(14px); }
	to { opacity: 1; transform: none; }
}

@keyframes tpl-in-fade {
	from { opacity: 0; }
	to { opacity: 1; }
}

@keyframes tpl-in-zoom {
	from { opacity: 0; transform: scale(0.96); }
	to { opacity: 1; transform: none; }
}

.tpl-anim-slide .tpl-login .tpl-view.is-active {
	animation: tpl-in-slide var(--tpl-dur) cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tpl-anim-fade-up .tpl-login .tpl-view.is-active {
	animation: tpl-in-fade-up var(--tpl-dur) cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tpl-anim-fade .tpl-login .tpl-view.is-active {
	animation: tpl-in-fade var(--tpl-dur) ease both;
}

.tpl-anim-zoom .tpl-login .tpl-view.is-active {
	animation: tpl-in-zoom var(--tpl-dur) cubic-bezier(0.22, 1, 0.36, 1) both;
}

.tpl-anim-none .tpl-login .tpl-view.is-active {
	animation: none;
}

@media (prefers-reduced-motion: reduce) {
	.tpl-login .tpl-view.is-active {
		animation: none !important;
	}

	.tpl-login .tpl-btn,
	.tpl-login .tpl-input {
		transition: none;
	}
}

/* ---------- Responsive ---------- */
@media (max-width: 767px) {
	.tpl-login .tpl-main {
		padding: 32px 22px;
	}

	.tpl-login.tpl-layout-split .tpl-shell {
		flex-direction: column;
	}

	.tpl-login .tpl-aside {
		flex: 0 0 auto;
		min-height: 200px;
		padding: 28px 22px;
	}

	.tpl-login .tpl-aside-title {
		font-size: 24px;
	}

	.tpl-hide-aside-mobile-yes .tpl-login .tpl-aside {
		display: none;
	}

	.tpl-login .tpl-title--ov {
		font-size: 26px;
	}
}
