/* Workdone auth screens: login, forgot password, reset password.
   Styled in accordance with Figma node 16030:38853 & 16031:39293 (sPhoton ERP — Login & Forgot Password).
   Downstream apps can customize colors via `:root { --wd-auth-* }` in `web_include_css`
   or `Website Settings -> Head HTML` without `!important`. */

@font-face {
	font-family: "Be Vietnam Pro";
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url("/assets/workdone/fonts/be-vietnam-pro/BeVietnamPro-Regular.woff2") format("woff2");
}

@font-face {
	font-family: "Be Vietnam Pro";
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url("/assets/workdone/fonts/be-vietnam-pro/BeVietnamPro-Medium.woff2") format("woff2");
}

@font-face {
	font-family: "Be Vietnam Pro";
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url("/assets/workdone/fonts/be-vietnam-pro/BeVietnamPro-SemiBold.woff2") format("woff2");
}

@font-face {
	font-family: "Be Vietnam Pro";
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url("/assets/workdone/fonts/be-vietnam-pro/BeVietnamPro-Bold.woff2") format("woff2");
}

body .page-content-wrapper {
	min-height: 100vh;
	padding-top: 0;
	margin: 0;
}

body {
	background: #ffffff;
	margin: 0;
	padding: 0;
}

.wd-auth {
	--wd-brand: var(--wd-auth-accent, #d85d04);
	--wd-brand-hover: var(--wd-auth-accent-hover, #c05204);
	--wd-brand-active: var(--wd-auth-accent-active, #a84803);
	--wd-brand-badge-bg: var(--wd-auth-badge-bg, #fff2d3);
	--wd-brand-badge-text: var(--wd-auth-badge-text, #d85d04);
	--wd-ink: var(--wd-auth-ink, #111827);
	--wd-body: var(--wd-auth-body, #6b7280);
	--wd-line: var(--wd-auth-border, #e5e7eb);
	--wd-input-border: var(--wd-auth-input-border, #d1d5db);
	--wd-surface: var(--wd-auth-surface, #f3f4f6);
	--wd-card-bg: var(--wd-auth-card-bg, rgba(255, 255, 255, 0.81));
	--wd-auth-panel-start: var(--wd-auth-panel-start, #14263f);
	--wd-auth-logo-height: var(--wd-auth-logo-height, 28px);

	display: grid;
	grid-template-columns: minmax(480px, 52.8%) 1fr;
	min-height: 100vh;
	background: var(--wd-surface);
	color: var(--wd-ink);
	font-family: "Be Vietnam Pro", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
	-webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Left Column: Hero Artwork Section
   ========================================================================== */

.wd-auth__hero,
.wd-auth__brand {
	position: relative;
	overflow: hidden;
	height: 100%;
	min-height: 100vh;
	display: flex;
	flex-direction: column;
	justify-content: flex-end;
}

.wd-auth__hero-pic {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	display: block;
}

.wd-auth__hero-img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
	display: block;
}

.wd-auth__hero-wash {
	position: absolute;
	inset: 0;
	pointer-events: none;
	background: linear-gradient(
		180deg,
		rgba(216, 93, 4, 0.07) 0%,
		rgba(216, 93, 4, 0.2) 70%,
		rgba(216, 93, 4, 0.4) 100%
	);
}

.wd-auth__testimonial-card {
	position: relative;
	z-index: 2;
	margin: 0 48px 48px 48px;
	max-width: 520px;
	padding: 16px;
	display: flex;
	flex-direction: column;
	gap: 8px;
	background: var(--wd-card-bg);
	border: 1px solid var(--wd-line);
	border-radius: 8px;
	box-shadow:
		0px 0px 1px 0px rgba(0, 0, 0, 0.12),
		0px 0.5px 2px 0px rgba(0, 0, 0, 0.15),
		0px 2px 3px 0px rgba(0, 0, 0, 0.16);
	backdrop-filter: blur(16px);
	-webkit-backdrop-filter: blur(16px);
	word-break: break-word;
}

.wd-auth__card-title {
	font-family: inherit;
	font-size: 24px;
	font-weight: 600;
	line-height: 36px;
	letter-spacing: -0.48px;
	color: #111827;
	margin: 0;
}

.wd-auth__card-desc {
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	letter-spacing: 0.07px;
	color: #6b7280;
	margin: 0;
}

/* ==========================================================================
   Right Column: Auth Form Section
   ========================================================================== */

.wd-auth__main {
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--wd-surface);
	overflow-y: auto;
}

.wd-auth__pattern {
	position: absolute;
	inset: 0;
	pointer-events: none;
	opacity: 0.5;
	background-image: url("/assets/workdone/images/auth/auth_form_bg.png");
	background-repeat: repeat;
	background-size: 387px 512px;
}

.wd-auth__container {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 424px;
	min-height: 100vh;
	padding: 48px 0 32px 0;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	box-sizing: border-box;
}

/* Brand Header */

.wd-auth__brand-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 28px;
	width: 100%;
}

.wd-auth__brand-left {
	display: flex;
	align-items: center;
	gap: 16px;
}

.wd-auth__brand-logo {
	height: 28px;
	width: auto;
	max-width: 181px;
	object-fit: contain;
}

.wd-auth__badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--wd-brand-badge-bg);
	color: var(--wd-brand-badge-text);
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	letter-spacing: 0.07px;
	white-space: nowrap;
}

.wd-auth__lang {
	display: flex;
	align-items: center;
	gap: 2px;
	padding: 2px;
	border: 1px solid var(--wd-input-border);
	border-radius: 8px;
	background: #ffffff;
}

.wd-auth__lang-btn {
	border: none;
	background: transparent;
	padding: 3px 8px;
	font-family: inherit;
	font-size: 12px;
	font-weight: 600;
	color: #6b7280;
	border-radius: 6px;
	cursor: pointer;
	transition: background 0.15s ease, color 0.15s ease;
}

.wd-auth__lang-btn:hover {
	color: #111827;
}

.wd-auth__lang-btn.is-active {
	background: var(--wd-brand);
	color: #ffffff;
}

/* Content Area & Title */

.wd-auth__content-wrap {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
}

.wd-auth__title {
	font-family: inherit;
	font-size: 32px;
	font-weight: 600;
	line-height: 48px;
	letter-spacing: -0.64px;
	color: var(--wd-ink);
	margin: 0 0 4px 0;
	word-break: break-word;
}

.wd-auth__subtitle {
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	letter-spacing: 0.07px;
	color: var(--wd-body);
	margin: 0 0 24px 0;
	word-break: break-word;
}

/* SSO Button & Divider */

.wd-auth__sso-area {
	width: 100%;
}

.wd-auth .wd-auth__btn-sso,
.wd-auth a.btn-login-with-email-link,
.wd-auth__btn-sso {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 44px;
	padding: 12px 24px;
	background: #ffffff;
	border: 1px solid var(--wd-input-border);
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	color: var(--wd-ink);
	text-decoration: none;
	transition: background 0.15s ease, border-color 0.15s ease;
	box-sizing: border-box;
}

.wd-auth .wd-auth__btn-sso:hover,
.wd-auth a.btn-login-with-email-link:hover,
.wd-auth__btn-sso:hover {
	background: #f9fafb;
	border-color: #9ca3af;
	color: var(--wd-ink);
	text-decoration: none;
}

.wd-auth .wd-auth__btn-sso:focus-visible,
.wd-auth__btn-sso:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(216, 93, 4, 0.15);
	border-color: var(--wd-brand);
}

.wd-auth__divider {
	display: flex;
	align-items: center;
	gap: 12px;
	margin: 20px 0 24px 0;
	width: 100%;
}

.wd-auth__divider-line {
	flex: 1;
	height: 1px;
	background: var(--wd-line);
}

.wd-auth__divider-text {
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	letter-spacing: 0.07px;
	color: var(--wd-body);
	white-space: nowrap;
}

/* ==========================================================================
   Form Controls
   ========================================================================== */

.wd-auth .login-content.page-card,
.wd-auth .page-card,
.page-card {
	background: transparent;
	border: none;
	box-shadow: none;
	padding: 0;
	margin: 0;
	max-width: 100%;
	width: 100%;
}

.form-group {
	margin-bottom: 16px;
}

.form-group label {
	font-family: inherit;
	font-size: 16px;
	font-weight: 600;
	line-height: 24px;
	letter-spacing: 0.08px;
	color: var(--wd-ink);
	margin-bottom: 4px;
	display: block;
}

.wd-field-head {
	display: flex;
	align-items: flex-end;
	justify-content: space-between;
	margin-bottom: 4px;
}

.wd-field-head label {
	margin-bottom: 0;
}

.wd-auth__forgot-link {
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	letter-spacing: 0.07px;
	color: #2563eb;
	text-decoration: none;
	transition: color 0.15s ease;
}

.wd-auth__forgot-link:hover {
	color: #1d4ed8;
	text-decoration: underline;
}

/* Input with icons */

.wd-input-wrapper {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
}

.wd-input-icon {
	position: absolute;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #6b7280;
	z-index: 2;
}

.wd-input-icon--left {
	left: 14px;
	pointer-events: none;
}

.wd-input-icon--right {
	right: 14px;
	cursor: pointer;
}

.wd-auth .page-card .page-card-body .wd-input-wrapper input[type="text"],
.wd-auth .page-card .page-card-body .wd-input-wrapper input[type="password"],
.wd-auth .page-card .page-card-body .wd-input-wrapper input[type="email"],
.wd-auth .page-card .page-card-body .wd-input-wrapper .form-control,
.wd-input-wrapper .form-control {
	width: 100%;
	height: 44px;
	padding: 10px 14px 10px 44px;
	border: 1px solid var(--wd-input-border);
	border-radius: 8px;
	background: #ffffff;
	font-family: inherit;
	font-size: 14px;
	line-height: 20px;
	color: var(--wd-ink);
	box-sizing: border-box;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.wd-auth .page-card .page-card-body .wd-input-wrapper input[type="text"]:placeholder-shown,
.wd-auth .page-card .page-card-body .wd-input-wrapper input[type="password"]:placeholder-shown,
.wd-auth .page-card .page-card-body .wd-input-wrapper input[type="email"]:placeholder-shown,
.wd-input-wrapper .form-control:placeholder-shown {
	color: var(--wd-body);
}

.wd-auth .page-card .page-card-body .wd-input-wrapper input[type="text"]::placeholder,
.wd-auth .page-card .page-card-body .wd-input-wrapper input[type="password"]::placeholder,
.wd-auth .page-card .page-card-body .wd-input-wrapper input[type="email"]::placeholder,
.wd-input-wrapper .form-control::placeholder {
	color: var(--wd-body);
	font-size: 14px;
}

.wd-auth .page-card .page-card-body .wd-input-wrapper input[type="text"]:focus,
.wd-auth .page-card .page-card-body .wd-input-wrapper input[type="password"]:focus,
.wd-auth .page-card .page-card-body .wd-input-wrapper input[type="email"]:focus,
.wd-input-wrapper .form-control:focus {
	outline: none;
	border-color: var(--wd-brand);
	box-shadow: 0 0 0 3px rgba(216, 93, 4, 0.15);
}

.wd-auth .page-card .page-card-body .wd-input-wrapper:has(.wd-input-icon--right) input[type="text"],
.wd-auth .page-card .page-card-body .wd-input-wrapper:has(.wd-input-icon--right) input[type="password"],
.wd-auth .page-card .page-card-body .wd-input-wrapper:has(.wd-input-icon--right) input[type="email"],
.wd-input-wrapper:has(.wd-input-icon--right) .form-control {
	padding-right: 44px;
}

.field-error {
	font-size: 13px;
	color: #dc2626;
	margin: 4px 0 0 0;
	min-height: 0;
}

/* Actions & Buttons */

.page-card-actions {
	margin-top: 24px;
	display: flex;
	flex-direction: column;
	gap: 12px;
}

.wd-auth .page-card-actions .es-button[type="submit"],
.wd-auth .es-button[type="submit"],
.es-button[type="submit"],
.btn-login,
.btn-forgot,
button.btn-login-with-email-link {
	width: 100%;
	height: 44px;
	padding: 12px 24px;
	background: var(--wd-brand);
	color: #ffffff;
	border: none;
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	line-height: 20px;
	letter-spacing: 0.07px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: background 0.15s ease;
	box-sizing: border-box;
}

.wd-auth .page-card-actions .es-button[type="submit"]:hover,
.wd-auth .es-button[type="submit"]:hover,
.es-button[type="submit"]:hover,
.btn-login:hover,
.btn-forgot:hover,
button.btn-login-with-email-link:hover {
	background: var(--wd-brand-hover);
	color: #ffffff;
	text-decoration: none;
}

.wd-auth .page-card-actions .es-button[type="submit"]:active,
.wd-auth .es-button[type="submit"]:active,
.es-button[type="submit"]:active,
.btn-login:active,
.btn-forgot:active,
button.btn-login-with-email-link:active {
	background: var(--wd-brand-active);
}

.es-button[type="submit"]:disabled,
.btn-forgot:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.es-button[type="submit"]:focus-visible,
.btn-login:focus-visible,
.btn-forgot:focus-visible {
	outline: none;
	box-shadow: 0 0 0 3px rgba(216, 93, 4, 0.3);
}

.btn-ldap-login {
	background: #111827;
	color: #ffffff;
	width: 100%;
	height: 44px;
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
}

#twofactor_div .form-control,
.form-signup .form-control {
	width: 100%;
	height: 44px;
	padding: 10px 14px;
	border: 1px solid var(--wd-input-border);
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	color: var(--wd-ink);
	background: #ffffff;
	box-sizing: border-box;
}

#twofactor_div .form-control:focus,
.form-signup .form-control:focus {
	outline: none;
	border-color: var(--wd-brand);
	box-shadow: 0 0 0 3px rgba(216, 93, 4, 0.15);
}

#verify_token,
.btn-signup,
.btn-reset-password {
	background: var(--wd-brand);
	color: #ffffff;
	border: none;
	width: 100%;
	height: 44px;
	border-radius: 8px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	text-decoration: none;
	transition: background 0.15s ease;
	box-sizing: border-box;
}

#verify_token:hover,
.btn-signup:hover,
.btn-reset-password:hover {
	background: var(--wd-brand-hover);
	color: #ffffff;
}

#verify_token:active,
.btn-signup:active,
.btn-reset-password:active {
	background: var(--wd-brand-active);
}

.wd-auth__back-link {
	display: block;
	text-align: center;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: #6b7280;
	text-decoration: none;
	padding: 8px;
	transition: color 0.15s ease;
}

.wd-auth__back-link:hover {
	color: #111827;
	text-decoration: underline;
}

.sign-up-message {
	text-align: center;
	margin-top: 24px;
	font-family: inherit;
	font-size: 14px;
	color: var(--wd-body);
}

.sign-up-message a {
	color: var(--wd-brand);
	font-weight: 600;
	text-decoration: none;
}

.sign-up-message a:hover {
	text-decoration: underline;
}

/* Footer */

.wd-auth__footer {
	margin-top: 32px;
	text-align: center;
	width: 100%;
}

.wd-auth__footer-text {
	font-family: inherit;
	font-size: 14px;
	font-weight: 400;
	line-height: 20px;
	letter-spacing: 0.07px;
	color: var(--wd-body);
	margin: 0;
}

.wd-auth__footer-text a {
	color: var(--wd-body);
	text-decoration: none;
	transition: color 0.15s ease;
}

.wd-auth__footer-text a:hover {
	color: var(--wd-ink);
	text-decoration: underline;
}

/* ==========================================================================
   Responsiveness
   ========================================================================== */

@media (max-width: 960px) {
	.wd-auth {
		grid-template-columns: 1fr;
	}

	.wd-auth__hero,
	.wd-auth__brand {
		display: none;
	}

	.wd-auth__container {
		min-height: 100vh;
		padding: 40px 20px 24px;
	}
}

@media (max-width: 480px) {
	.wd-auth__title {
		font-size: 26px;
		line-height: 36px;
	}

	.wd-auth__brand-header {
		margin-bottom: 20px;
	}
}
