:root {
	/* colors */
	--rillion-green: #0F3732;
	--white: #FFFFFF;
	--text-danger: #C3250B;
	--input-border-danger: #EF3213;
	--bg: var(--white);
	--bg-image-fallback: #eeeeee;
	--ink: #424242;
	--muted: #6b7280;
	--text-muted-light: #666;
	--btn-primary-bg: var(--rillion-green);
	--btn-primary-hover: #14695a;
	--btn-primary-focus: #2ab7a9;
	--btn-ghost-hover: #eaf2ef;
	--primary-color: #62985d;
	--input-border: rgba(0, 0, 0, .30);
	--input-placeholder: #9aa0a6;
	--input-bg: #F0F0F070;
	--select-bg-hover: #f3f4f6;
	--select-bg-selected: #D4F3EA;
	--title-color: var(--rillion-green);
	--radius: 6px;

	/* Size variables (like Tailwind) */
	--size-1: 0.25rem; /* 4px */
	--size-2: 0.5rem; /* 8px */
	--size-3: 0.75rem; /* 12px */
	--size-4: 1rem; /* 16px */
	--size-5: 1.25rem; /* 20px */
	--size-6: 1.5rem; /* 24px */
	--size-8: 2rem; /* 32px */
	--size-10: 2.5rem; /* 40px */
	--size-12: 3rem; /* 48px */

	/* Font sizes */
	--font-size-sm: 14px;
	--font-size-base: 16px;
	--font-size-lg: 24px;
	--font-size-xl: 45px;

	/* Line heights */
	--line-height-tight: 1;
	--line-height-compact: 1.35;
	--line-height-normal: 1.5;

	/* Component heights */
	--input-height: 44px;

	/* Button colors */
	--btn-border-color: var(--rillion-green);

	/* other */
	--max-width-card: 600px;
	--max-width-form: 437px;
}

html, body {
	height: 100%;
	margin: 0;
	padding: 0;
	background: var(--bg); /* eliminate gray band at bottom */
	font-family: 'Open Sans', ui-sans-serif, sans-serif, -apple-system, Segoe UI, Roboto !important;
}

* {
	box-sizing: border-box;
}

body {
	color: var(--ink);
}

.page, main {
	min-height: 100vh;
	background: var(--bg);
}

.page {
	display: grid;
	grid-template-columns: 1fr 1fr;
}

/* Bilden ligger i högra kolumnen och får ta all plats där */
.imageContainer {
	position: relative;
	background: var(--bg-image-fallback) url("../images/loginpage/hero_image.jpg?q=80&w=800&auto=format") no-repeat center;
	background-size: cover;
	height: 100%;
	width: 100%;
}

/* "rillion"-märke över bilden */
.brand {
	position: absolute;
	top: var(--size-12);
	left: var(--size-12);
	display: flex;
	gap: var(--size-3);
	flex-direction: column;
	filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.35)) drop-shadow(0 2px 4px rgba(0, 0, 0, 0.25));
	padding: var(--size-3);
}

.brand .logo {
	width: 124px;
	height: 44px;
	background-image: url('../images/rillion/logos/rillion_logo_lime.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	display: inline-block;
}

.brand .whiteLabelLogo {
	width: 250px;
	height: 100px;
}

/* Panelen ligger i mittenkolumnen och är alltid centrerad */
.panel {
	display: flex;
	height: 100vh;
	width: 100%;
	flex-direction: column;
	background: var(--white);
	gap: var(--size-6);
}

.card {
	width: 100%;
	display: flex;
	margin: auto auto 0 auto;
	padding: var(--size-4);
	flex-direction: column;
	gap: var(--size-6);
	max-width: var(--max-width-card);
}

.card p {
	font-size: var(--font-size-base);
	line-height: var(--line-height-compact);
	font-weight: normal;
	color: var(--rillion-green);
}

.card .card-title {
	display: flex;
	flex-direction: column;
	font-size: var(--font-size-xl);
	line-height: var(--line-height-normal);
	text-align: center;
	font-weight: bold;
	color: var(--title-color);
}

.card-title p {
	font-size: var(--font-size-base);
	line-height: var(--line-height-compact);
	text-align: center;
	font-weight: normal;
	color: var(--rillion-green);
}

.small-title {
	font-size: var(--font-size-lg);
}

.login-page-center {
	text-align: center !important;
}

.card .logo {
	height: 65px;
	background-image: url('../images/rillion/logos/rillion_logo_green.svg');
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
	width: 100%;
	margin-bottom: var(--size-6);
	display: none;
}

.stateless-form-container {
	width: 100%;
	margin: auto;
	display: flex;
	flex-direction: column;
	gap: var(--size-3);
	max-width: var(--max-width-form);
}

/* Form */
.stateless-form {
	display: flex;
	flex-direction: column;
	gap: var(--size-3);
}

/* Placeholder color: slightly lighter gray for better contrast */
.stateless-form input::placeholder {
	color: var(--input-placeholder);
}

/* Legacy fallbacks (optional) */
.stateless-form input::-webkit-input-placeholder {
	color: var(--input-placeholder);
}

.stateless-form input:-ms-input-placeholder {
	color: var(--input-placeholder);
}

.stateless-form input::-ms-input-placeholder {
	color: var(--input-placeholder);
}

.stateless-form label {
	display: block;
	font-size: var(--font-size-sm);
	margin-bottom: var(--size-2);
}

.form-label {
	display: block;
	font-size: var(--font-size-sm);
	margin-bottom: var(--size-2);
}

.req::after {
	content: "*";
	color: var(--text-danger);
}

.is-invalid {
	border: 1px solid var(--input-border-danger) !important;
}

input.is-invalid:focus {
	border: 1px solid var(--input-border-danger) !important;
	box-shadow: 0 0 0 1px var(--input-border-danger) !important;
}

input[type="text"],
input[type="password"],
input[type="email"],
select {
	width: 100%;
	height: var(--input-height);
	line-height: var(--line-height-normal);
	padding: var(--size-2) var(--size-3);
	border-radius: var(--radius);
	border: 1px solid var(--input-border);
	font-size: var(--font-size-base);
	background: var(--input-bg);
	outline: none;
	transition: box-shadow .15s, border-color .15s;
}

select {
	background: var(--white);
}

input[type="text"]:focus,
input[type="password"]:focus,
select:focus {
	border: 1px solid var(--primary-color);
	box-shadow: 0 0 0 1px var(--primary-color);
}

input[type="radio"],
input[type="checkbox"] {
	accent-color: var(--rillion-green);
}

.error-message {
	color: var(--text-danger);
	font-size: var(--font-size-sm);
}

.error-message.input-field {
	margin-top: var(--size-2);
}

input[type="text"].error-message:focus,
input[type="password"].error-message:focus {
	border: 1px solid var(--input-border-danger);
	box-shadow: 0 0 0 1px var(--input-border-danger);
}

.error-message ul.feedbackPanel {
	list-style: none;
	margin: 0;
	padding: 0;
}

.error-message ul.feedbackPanel li.feedbackPanelERROR {
	list-style: none;
	margin: 0 var(--size-3);
	text-align: left;
}

.row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--size-3);
	margin: var(--size-2) 0 18px;
	font-size: var(--font-size-sm);
	color: var(--muted);
}

.row a {
	color: var(--muted);
	text-decoration: none;
}

.row a:focus,
.row a:hover {
	text-decoration: underline;
	outline: none;
}

/* Buttons */
.btn {
	width: 100%;
	height: var(--input-height);
	border: 0;
	border-radius: var(--radius);
	font-weight: bold;
	font-size: var(--font-size-sm);
	cursor: pointer;
	transition: transform .02s ease-in, background .15s, box-shadow .15s;
	font-family: 'Open Sans', ui-sans-serif, sans-serif, -apple-system, Segoe UI, Roboto !important;
}

.btn:focus-visible {
	outline: none;
	box-shadow: none;
}

.btn:active {
	transform: translateY(1px);
}

.btn-primary {
	background: var(--btn-primary-bg);
	color: var(--white);
	box-shadow: inset 0 -2px 0 rgba(0, 0, 0, .15);
}

.btn-primary:focus {
	background: var(--btn-primary-focus);
}

.btn-primary:hover {
	background: var(--btn-primary-hover);
}

.btn-ghost {
	background: var(--white);
	color: var(--btn-primary-bg);
	border: 1px solid var(--btn-border-color);
}

.btn-ghost:focus,
.btn-ghost:hover {
	background: var(--btn-ghost-hover);
}

/* Link buttons - remove underline and center text */
a.btn {
	text-decoration: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	text-align: center;
}

a.btn:hover,
a.btn:focus {
	text-decoration: none;
}

/* Language */
.select-wrap {
	width: 100%;
}

.select-box {
	position: relative;
	display: block;
	width: 100%;
	background: transparent;
}

.select-box option:checked {
	background: var(--select-bg-selected);
	font-weight: bold;
	position: relative;
}

.select-box::after {
	content: "";
	position: absolute;
	right: var(--size-3);
	top: 50%;
	width: 0;
	height: 0;
	pointer-events: none;
	border-left: 6px solid transparent;
	border-right: 6px solid transparent;
	border-top: 7px solid var(--btn-primary-bg, #333);
	transform: translateY(-50%);
}

.select-box select {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	padding-right: 34px;
	border-radius: var(--radius);
	border: 1px solid var(--input-border);
	font-weight: normal;
	color: var(--ink);
	font-family: 'Open Sans', ui-sans-serif, sans-serif, -apple-system, Segoe UI, Roboto !important;
}

.select-box select:focus {
	border: 1px solid var(--primary-color) !important;
	box-shadow: 0 0 0 1px var(--primary-color) !important;
}

/* Style for select options with checkmark */
.select-box option {
	padding: var(--size-2) 30px var(--size-2) var(--size-2);
	background: var(--white);
	color: var(--ink);
	font-weight: normal;
}

.select-box option:checked {
	background: var(--select-bg-selected);
	font-weight: bold;
	position: relative;
}

.login-OR-text {
	text-transform: uppercase;
	text-align: center;
	font-size: var(--font-size-sm);
	font-weight: bold;
	color: var(--muted);
	margin: 0;
}

.choose-lang-wrap {
	width: 100%;
}

.intuitLoginButton {
	height: 37px;
	background: no-repeat url('../images/quickbooks/Sign_in_transparent_btn_med_default.png');
	cursor: pointer;
	width: 161px;
}

.intuitLoginButton:hover {
	background: no-repeat url('../images/quickbooks/Sign_in_transparent_btn_med_hover.png');
}

.adLogin {
	width: 100%;
}

.adLoginButton {
	background: url('../images/ad_login.png') no-repeat center center;
	background-size: 55%;
	height: var(--size-10);
	transition: filter 0.2s ease;
}

.adLoginButton:hover {
	background: url('../images/ad_login.png') no-repeat center center;
	background-size: 55%;
	cursor: pointer;
	filter: brightness(0.85);
}

.extra-setting-container {
	margin: 0 var(--size-12);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: var(--size-3);
}

.alternative-login-methods {
	margin-top: var(--size-3);
	display: flex;
	flex-direction: column;
	gap: var(--size-3);
	width: 100%;
	align-items: center;
}

.mobil-container {
	display: none;
}

#submitComponentContainer {
	width: 100%;
}

.footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: var(--size-2) var(--size-6);
	color: var(--muted);
	font-size: var(--font-size-sm);
	margin: var(--size-4);
	margin-top: auto;
}

.footer > div {
	display: flex;
	gap: var(--size-2);
	flex: 0 1 auto;
	white-space: nowrap;
	min-width: 0;
}

.footer a {
	color: inherit;
}

.footer a:focus {
	font-weight: bold;
	text-decoration: underline;
	outline: none;
}

.footer .version-and-date {
	display: block;
}

/* Password field toggle inside input */
.password-field-wrap {
	position: relative;
	display: inline-block;
	width: 100%;
}

.password-field-wrap input[type="password"],
.password-field-wrap input[type="text"] {
	width: 100%;
	padding-right: 2rem; /* space for the icon */
	box-sizing: border-box;
}

.password-field-wrap .password-toggle {
	position: absolute;
	right: var(--size-2);
	top: 50%;
	transform: translateY(-50%);
	cursor: pointer;
	color: var(--text-muted-light);
	line-height: var(--line-height-tight);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: var(--size-6);
	height: var(--size-6);
	border-radius: var(--size-1);
}

.form-gap {
	margin-top: var(--size-3);
}

@media (min-width: 835px) and (max-width: 900px) {
	.page {
		grid-template-columns: 1fr;
	}

	.imageContainer {
		display: none; /* bilden försvinner */
	}

	.card .logo {
		display: inline-flex;
	}
}

/* MOBIL */
@media (max-width: 834px) {
	.page {
		grid-template-columns: 1fr;
	}

	.imageContainer {
		display: none;
	}

	.mobil-container {
		display: flex;
		flex-direction: column;
		align-items: center;
	}

	.mobil-container > label:first-of-type {
		font-weight: bold;
	}

	.mobil-container .radiobutton-container {
		font-weight: normal;
		display: flex;
		width: 100%;
		justify-content: center;
		align-items: baseline;
	}

	.radiobutton-container > label:first-of-type {
		margin-right: var(--size-3); /* ensure space after the label before the next radio */
	}

	.card .logo {
		display: inline-flex;
	}

	.alternative-login-methods {
		display: none;
	}

	.choose-lang-wrap {
		margin: var(--size-3);
	}

	.card .card-title {
		font-size: var(--font-size-lg);
		display: flex;
		flex-direction: row;
		gap: var(--size-2);
		justify-content: center;
		flex-wrap: wrap;
	}

	.footer .version-and-date {
		display: none;
	}
}

/* WIDE */
@media (min-width: 2566px) {
	.page {
		grid-template-columns: 2fr 3fr;
	}
}