@font-face {
	font-family: AuthArimo;
	src: url('/f-system/vendor/fonts/Arimo-Regular.ttf') format('truetype');
	font-style: normal;
	font-weight: 400;
	font-display: swap;
}

/* Official Google Sans subsets keep Google's button typography local and lightweight. */
@font-face {
	font-family: AuthGoogleSans;
	src: url('/auth-reset/assets/GoogleSans-Medium-he.woff2') format('woff2');
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	unicode-range: U+0307-0308, U+0590-05FF, U+200C-2010, U+20AA, U+25CC, U+FB1D-FB4F;
}

@font-face {
	font-family: AuthGoogleSans;
	src: url('/auth-reset/assets/GoogleSans-Medium-latin.woff2') format('woff2');
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* One quiet, brand-neutral shell serves operator login and tenant Xtra credentials. */
.auth-screen {
	--auth-ink: #243347;
	--auth-muted: #627084;
	--auth-accent: #cc3c08;
	--auth-accent-hover: #b23205;
	--auth-line: #e4e7eb;
	--auth-focus: #748291;
	margin: 0;
	min-height: 100vh;
	min-height: 100svh;
	display: grid;
	place-items: center;
	padding: 32px 20px;
	position: relative;
	isolation: isolate;
	background: #f7f6f4;
	color: var(--auth-ink);
	font-family: AuthArimo, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.55;
}

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

.auth-screen::before,
.auth-screen::after {
	content: '';
	position: fixed;
	inset: 0;
	z-index: -1;
	pointer-events: none;
}

.auth-screen::before {
	background:
		radial-gradient(ellipse at 10% 15%, #e8edf0b3 0, transparent 48%),
		radial-gradient(ellipse at 90% 80%, #f1e7dfb3 0, transparent 44%),
		linear-gradient(135deg, #fbfaf8, #f4f5f5 58%, #faf6f2);
}

.auth-screen::after {
	background-image:
		linear-gradient(#7383940a 1px, transparent 1px),
		linear-gradient(90deg, #7383940a 1px, transparent 1px);
	background-size: 56px 56px;
	mask-image: radial-gradient(ellipse at center, transparent 20%, #000 100%);
}

.auth-card {
	width: min(100%, 476px);
	min-width: 0;
	margin: 0;
	padding: 28px 36px 24px;
	border: 1px solid #ffffff;
	border-radius: 24px;
	background: #ffffff;
	box-shadow:
		0 2px 8px #24334704,
		0 24px 80px -32px #24334738,
		0 0 0 1px #2433470a;
}

.auth-topline {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-block-end: 24px;
}

.auth-brand {
	min-width: 0;
	overflow-wrap: anywhere;
	font-size: 14px;
	font-weight: 600;
	letter-spacing: -.1px;
}

.auth-languages {
	display: flex;
	flex: 0 0 auto;
	align-items: center;
	gap: 2px;
	padding: 3px;
	border: 1px solid #ebedf0;
	border-radius: 12px;
	background: #f8f9fa;
}

.auth-languages a {
	display: grid;
	place-items: center;
	min-width: 52px;
	min-height: 44px;
	padding: 6px 8px;
	border-radius: 8px;
	color: var(--auth-muted);
	font-size: 13px;
	line-height: 1.2;
}

.auth-languages a[aria-current='page'] {
	background: #fff;
	color: var(--auth-ink);
	box-shadow: 0 1px 4px #2433470f;
}

.auth-languages a:hover {
	color: var(--auth-ink);
}

.auth-heading {
	margin-block-end: 28px;
	text-align: center;
}

.auth-emblem {
	display: grid;
	place-items: center;
	width: 60px;
	height: 60px;
	margin: 0 auto 18px;
	border: 1px solid #e6e9ed;
	border-radius: 18px;
	background: linear-gradient(145deg, #ffffff, #edf1f4);
	color: #42556c;
	box-shadow: 0 4px 12px -8px #24334750;
}

.auth-emblem svg {
	width: 29px;
	height: 29px;
}

.auth-screen h1 {
	margin: 0 0 8px;
	font-size: clamp(26px, 5vw, 30px);
	font-weight: 700;
	line-height: 1.3;
	letter-spacing: -.5px;
}

.auth-intro {
	margin: 0;
	color: var(--auth-muted);
	font-size: 14px;
	line-height: 1.65;
	overflow-wrap: anywhere;
}

.auth-form {
	margin: 0;
}

.auth-screen label {
	display: block;
	margin-block-end: 8px;
	font-size: 14px;
	font-weight: 600;
}

.auth-field {
	position: relative;
	margin-block-end: 20px;
}

.auth-field > svg {
	position: absolute;
	inset-inline-start: 15px;
	top: 15px;
	width: 20px;
	height: 20px;
	color: #8190a0;
	pointer-events: none;
}

.auth-screen input:not([type='hidden']) {
	display: block;
	width: 100%;
	min-height: 50px;
	margin: 0;
	padding: 12px 14px;
	border: 1px solid #cbd2da;
	border-radius: 10px;
	background: #fff;
	color: var(--auth-ink);
	font: inherit;
	font-size: 16px;
	line-height: 1.5;
	text-align: start;
	transition: border-color .15s ease;
}

[dir='rtl'] .auth-field input:not([type='hidden']) {
	padding-right: 46px;
	padding-left: 14px;
}

[dir='ltr'] .auth-field input:not([type='hidden']) {
	padding-right: 14px;
	padding-left: 46px;
}

.auth-screen[dir='rtl'] input,
[dir='rtl'] .auth-screen input {
	text-align: right;
}

.auth-screen[dir='ltr'] input,
[dir='ltr'] .auth-screen input {
	text-align: left;
}

.auth-screen input:hover {
	border-color: #a6b0bc;
}

.auth-screen input:focus {
	border-color: var(--auth-focus);
	outline: 1px solid var(--auth-focus);
	outline-offset: 0;
}

.auth-screen :is(button, a):focus-visible {
	outline: 1px solid var(--auth-focus);
	outline-offset: 2px;
}

.auth-screen a,
.auth-screen a:hover,
.auth-screen a:focus,
.auth-screen a:active {
	text-decoration: none;
}

.auth-button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	width: 100%;
	min-height: 50px;
	padding: 12px 18px;
	border: 1px solid transparent;
	border-radius: 10px;
	background: var(--auth-accent);
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.5;
	text-align: center;
	cursor: pointer;
	transition: background .15s ease, border-color .15s ease;
}

.auth-button > svg {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

.auth-direction-icon {
	display: flex;
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

.auth-direction-icon > svg {
	width: 100%;
	height: 100%;
}

.auth-button:hover {
	background: var(--auth-accent-hover);
}

.auth-button:disabled {
	opacity: .6;
	cursor: wait;
}

[dir='rtl'] .auth-direction-icon {
	transform: rotate(180deg);
}

.auth-recovery-link {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	min-height: 44px;
	margin-block-start: 10px;
	padding: 8px;
	border-radius: 10px;
	color: #52647a;
	font-size: 14px;
}

.auth-recovery-link svg {
	width: 17px;
	height: 17px;
}

.auth-recovery-link:hover {
	background: #f5f7f9;
	color: var(--auth-ink);
}

.auth-social {
	margin: 0;
}

.auth-divider {
	display: flex;
	align-items: center;
	gap: 14px;
	margin-block: 20px;
	color: var(--auth-muted);
	font-size: 12px;
	text-align: center;
}

.auth-divider::before,
.auth-divider::after {
	content: '';
	flex: 1;
	height: 1px;
	background: var(--auth-line);
}

.auth-button.auth-google {
	position: relative;
	border-color: #747775;
	border-radius: 10px;
	background: #fff;
	color: #1f1f1f;
	font-family: AuthGoogleSans, Arial, sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 20px;
	letter-spacing: .25px;
}

.auth-button.auth-google:hover {
	border-color: #747775;
	background: #f8faff;
	box-shadow: 0 1px 3px #3c404326;
}

.auth-button > .auth-google-mark {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
}

.auth-local {
	margin-block-start: 12px;
}

.auth-local .auth-button {
	border-color: #d9dfe6;
	background: #f7f8fa;
	color: #40536b;
	font-size: 13px;
}

.auth-error {
	display: flex;
	align-items: flex-start;
	gap: 10px;
	margin: 0 0 22px;
	padding: 12px 14px;
	border: 1px solid #ebc5c5;
	border-radius: 10px;
	background: #fff6f5;
	color: #9b3039;
	font-size: 14px;
	line-height: 1.6;
	overflow-wrap: anywhere;
}

.auth-error > svg {
	flex: 0 0 auto;
	width: 19px;
	height: 19px;
	margin-block-start: 2px;
}

.auth-footer {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	margin: 26px 0 0;
	color: var(--auth-muted);
	font-size: 12px;
	line-height: 1.5;
	text-align: center;
}

.auth-footer svg {
	flex: 0 0 auto;
	width: 15px;
	height: 15px;
}

/* Preserve the same visual contract when the recovery page belongs to a tenant. */
.auth-card.recovery .auth-topline {
	justify-content: center;
	margin-block-end: 24px;
}

.auth-card.recovery .recovery-name {
	white-space: normal;
}

.auth-card.recovery .recovery-copy {
	margin: 0 0 24px;
	color: var(--auth-muted);
	font-size: 14px;
	line-height: 1.75;
}

.auth-card.recovery .recovery-help {
	margin: -8px 0 20px;
	color: var(--auth-muted);
	font-size: 13px;
}

.auth-card.recovery .auth-heading {
	margin-block-end: 20px;
}

@media (max-width: 520px) {
	.auth-screen {
		padding: 20px 16px;
	}

	.auth-card {
		padding: 22px 24px 24px;
		border-radius: 20px;
	}

	.auth-topline {
		gap: 10px;
		margin-block-end: 22px;
	}

	.auth-heading {
		margin-block-end: 24px;
	}

	.auth-languages a {
		min-width: 48px;
		min-height: 44px;
	}
}

@media (max-width: 360px) {
	.auth-card {
		padding-inline: 20px;
	}

	.auth-brand {
		font-size: 13px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.auth-screen *,
	.auth-screen *::before,
	.auth-screen *::after {
		transition: none;
	}
}

@media (forced-colors: active) {
	.auth-card,
	.auth-button,
	.auth-languages,
	.auth-emblem {
		border: 1px solid CanvasText;
	}

	.auth-screen::before,
	.auth-screen::after {
		display: none;
	}
}


/* Short desktop windows retain the entire sign-in flow without reducing touch targets. */
@media (max-height: 780px) and (min-width: 521px) {
	.auth-screen {
		padding-block: 20px;
	}

	.auth-card {
		padding: 20px 28px;
	}

	.auth-topline {
		margin-block-end: 12px;
	}

	.auth-heading {
		margin-block-end: 16px;
	}

	.auth-emblem {
		width: 40px;
		height: 40px;
		margin-block-end: 12px;
		border-radius: 12px;
	}

	.auth-emblem svg {
		width: 24px;
		height: 24px;
	}

	.auth-field {
		margin-block-end: 16px;
	}

	.auth-divider {
		margin-block: 12px;
	}

	.auth-footer {
		margin-block-start: 14px;
	}
}
