:root {
	--ra-gray-50: #F0F3F6;
	--ra-gray-100: #E8EBF0;
	--ra-gray-200: #D3D8DF;
	--ra-gray-300: #979FAB;
	--ra-gray-500: #6C7683;
	--ra-gray-600: #5F6874;
	--ra-gray-700: #4E5863;
	--ra-gray-800: #3E4651;
	--ra-gray-900: #242A30;
	--ra-green-300: #83C79A;
	--ra-green-600: #30834D;
	--ra-red-600: #C3362B;
	--ra-blue-500: #0275D8;
	--ra-radius: .5rem;
	--ra-shadow: 0 33px 80px rgba(0,0,0,.036), 0 17px 35px rgba(0,0,0,.053), 0 7px 13px rgba(0,0,0,.069), 0 1px 5px rgba(0,0,0,.105);
	font-family: Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	color: var(--ra-gray-900);
	background: var(--ra-gray-50);
	font-size: 16px;
}

* { box-sizing: border-box; }

body {
	margin: 0;
	min-width: 320px;
	background: linear-gradient(180deg, var(--ra-gray-900) 0 15rem, var(--ra-gray-50) 15rem);
}

button, input { font: inherit; }

.login-page {
	display: grid;
	place-items: center;
	width: 100%;
	min-height: 100vh;
	min-height: 100dvh;
	padding: max(24px, env(safe-area-inset-top)) 18px max(24px, env(safe-area-inset-bottom));
}

.login-card {
	overflow: hidden;
	width: min(100%, 440px);
	padding: 0 24px 30px;
	border: 1px solid var(--ra-gray-200);
	border-radius: var(--ra-radius);
	background: #fff;
	box-shadow: var(--ra-shadow);
}

.login-header {
	margin: 0 -24px 26px;
	padding: 22px 24px 24px;
	border-bottom: 1px solid var(--ra-gray-200);
	background: var(--ra-gray-50);
}

.login-brand-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 30px;
}

.login-brand { display: flex; align-items: baseline; gap: 9px; }

.login-organization {
	color: var(--ra-gray-900);
	font-size: .75rem;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
}

.login-product {
	padding-left: 9px;
	border-left: 1px solid var(--ra-gray-300);
	color: var(--ra-gray-600);
	font-size: .875rem;
	font-weight: 700;
	letter-spacing: .08em;
}

h1 {
	margin: 0 0 8px;
	font-family: Raleway, Roboto, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: clamp(1.75rem, 8vw, 2.25rem);
	font-weight: 700;
	line-height: 1.1;
}

.login-intro { margin: 0; color: var(--ra-gray-600); line-height: 1.5; }

.desktop-link {
	color: var(--ra-blue-500);
	font-weight: 600;
	text-decoration: underline;
	text-underline-offset: 3px;
	white-space: nowrap;
}

.desktop-link:focus-visible {
	border-radius: .25rem;
	outline: 2px solid var(--ra-green-300);
	outline-offset: 3px;
}

.login-form { display: grid; gap: 18px; }
.field-group { display: grid; gap: 7px; }
.field-group label { color: var(--ra-gray-800); font-size: .875rem; font-weight: 600; }

.input-shell {
	position: relative;
	display: flex;
	align-items: center;
	width: 100%;
	height: 52px;
	border: 1px solid var(--ra-gray-200);
	border-radius: var(--ra-radius);
	background: #fff;
}

.input-shell > svg {
	position: absolute;
	left: 14px;
	width: 20px;
	height: 20px;
	color: var(--ra-gray-500);
	pointer-events: none;
}

.input-shell input[type="text"],
.input-shell input[type="password"] {
	width: 100%;
	height: 100%;
	padding: 0 14px 0 45px;
	border: 0;
	border-radius: inherit;
	background: transparent;
	color: var(--ra-gray-900);
	outline: none;
}

.input-shell:hover { border-color: var(--ra-gray-300); }

.input-shell:focus-within {
	border-color: var(--ra-gray-500);
	box-shadow: 0 0 0 2px var(--ra-green-300);
}

.input-shell:focus-within > svg { color: var(--ra-green-600); }

.remember-row {
	display: flex;
	align-items: center;
	gap: 10px;
	min-height: 34px;
	color: var(--ra-gray-700);
	cursor: pointer;
}

.remember-row input {
	width: 20px;
	height: 20px;
	margin: 0;
	accent-color: var(--ra-green-600);
}

.remember-row:focus-within {
	border-radius: .25rem;
	outline: 2px solid var(--ra-green-300);
	outline-offset: 2px;
}

.login-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	min-height: 52px;
	border: 0;
	border-radius: var(--ra-radius);
	background: var(--ra-gray-900);
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	touch-action: manipulation;
}

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

.login-button:hover { background: var(--ra-gray-700); }
.login-button:active { background: var(--ra-gray-800); }
.login-button:focus-visible { outline: 2px solid var(--ra-green-300); outline-offset: 2px; }

.errorMessage { color: var(--ra-red-600); font-size: .8125rem; font-weight: 600; }

@media (max-width: 370px) {
	.login-card { padding-inline: 18px; }
	.login-header { margin-inline: -18px; padding-inline: 18px; }
	.desktop-link { font-size: .875rem; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; }
}
