/* =========================================================
   SM Tracking — login page (pure CSS, standalone)
   Loaded ONLY by login.handlebars. Needs no other stylesheet.
   Sizes are in rem and the root size follows the window width (see the SIZE KNOB below),
   so the page looks the same at any screen size / browser zoom, like the reference screenshot.
   ========================================================= */

@font-face {
	font-family: 'Inter';
	src: url('/public/fonts/Inter-Variable.woff2') format('woff2');
	font-weight: 100 900;
	font-style: normal;
	font-display: swap;
}

:root {
	--navy: #051a37;
	--navy-btn: #08295e;
	--navy-btn-hover: #0c3874;
	--yellow: #ffb300;
	--yellow-soft: #fff3cc;
	--muted: #6a778a;
	--field-bg: #eaf0fc;
	--field-line: #dde5f1;
}

/* THE SIZE KNOB: 0.84vw = looks like the reference (1rem = 16px at ~1900px wide).
   Want everything a bit bigger? Raise 0.84vw (e.g. 0.95vw). Smaller? Lower it. */
html {
	font-size: clamp(10px, 0.84vw, 16px);
}

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

.login-page {
	margin: 0;
	min-width: 320px;
	min-height: 100vh;
	min-height: 100svh;
	overflow-x: hidden;
	color: var(--navy);
	background: #f6f8fb;
	font-family:
		'Inter',
		system-ui,
		-apple-system,
		'Segoe UI',
		Roboto,
		Arial,
		sans-serif;
	font-size: 1rem;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

:where(.login-page) :where(h1, h2, p, ul) {
	margin: 0;
	padding: 0;
}
:where(.login-page) :where(ul) {
	list-style: none;
}
:where(.login-page) :where(a) {
	text-decoration: none;
}
:where(.login-page) :where(button, input) {
	font: inherit;
}

/* Every icon is an outline SVG: only size/colour change per place */
:where(.login-page) svg {
	flex: none;
	fill: none;
	stroke: currentColor;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.login-page :focus-visible {
	outline: 3px solid rgba(255, 179, 0, 0.6);
	outline-offset: 3px;
}

/* ---------- Layout: 56.25% / 43.75% like the reference ---------- */
.login-shell {
	display: grid;
	grid-template-columns: 56.25% 43.75%;
	min-height: 100vh;
	min-height: 100svh;
}

/* =========================================================
   LEFT — photo + brand message
   ========================================================= */
.login-visual {
	position: relative;
	overflow: hidden;
	color: #fff;
	background-color: var(--navy);
	background-image:
		linear-gradient(120deg, rgba(5, 26, 55, 0.9), rgba(5, 26, 55, 0.55)),
		url('https://images.unsplash.com/photo-1623174891354-afea5ddadcad?auto=format&fit=crop&fm=jpg&q=85&w=2400');
	background-position: center;
	background-size: cover;
}

/* soft decorative rings / glow */
.login-visual::before,
.login-visual::after {
	content: '';
	position: absolute;
	border-radius: 50%;
	pointer-events: none;
}
.login-visual::before {
	width: 26rem;
	height: 26rem;
	top: -12rem;
	right: -13rem;
	border: 1px solid rgba(255, 255, 255, 0.13);
	box-shadow:
		0 0 0 4.4rem rgba(255, 255, 255, 0.035),
		0 0 0 8.8rem rgba(255, 255, 255, 0.025);
}
.login-visual::after {
	width: 15rem;
	height: 15rem;
	bottom: -9.5rem;
	left: -9.5rem;
	background: rgba(255, 179, 0, 0.2);
	filter: blur(4px);
}

.login-visual-inner {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	min-height: 100vh;
	min-height: 100svh;
	padding: 6.2rem 4.3rem 3.8rem;
}

/* brand */
.login-brand {
	display: flex;
	align-items: center;
	gap: 1.4rem;
	width: fit-content;
}
.login-brand-mark {
	display: grid;
	place-items: center;
	flex: none;
	width: 6rem;
	height: 6rem;
	border-radius: 1.5rem;
	background: #fff;
}
.login-brand-mark img {
	width: 5rem;
	height: 5rem;
	object-fit: contain;
}
.login-brand-name {
	display: grid;
	gap: 0.15rem;
}
.login-brand-name strong {
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.15;
	letter-spacing: -0.02em;
}
.login-brand-name small {
	color: rgba(255, 255, 255, 0.74);
	font-size: 1.12rem;
}

/* message block sits in the free space between brand and credit */
.login-copy {
	margin: auto 0;
	padding: 2.6rem 0 1.4rem;
}

.login-kicker {
	display: inline-flex;
	align-items: center;
	gap: 1rem;
	padding: 0.85rem 1.6rem 0.85rem 1.8rem;
	border: 1px solid rgba(255, 255, 255, 0.22);
	border-radius: 999px;
	background: rgba(5, 26, 55, 0.34);
	-webkit-backdrop-filter: blur(12px);
	backdrop-filter: blur(12px);
	color: rgba(255, 255, 255, 0.92);
	font-size: 1.2rem;
	font-weight: 600;
}
.login-kicker svg {
	width: 1.3rem;
	height: 1.3rem;
	color: var(--yellow);
}

.login-visual h1 {
	margin-top: 2.9rem;
	font-size: 4.8rem;
	font-weight: 800;
	line-height: 1.08;
	letter-spacing: -0.04em;
}
.login-visual h1 span {
	display: block;
	margin-top: 0.15rem;
	color: var(--yellow);
}

.login-lead {
	max-width: 40rem;
	margin-top: 1.5rem;
	color: rgba(255, 255, 255, 0.82);
	font-size: 1.3rem;
	line-height: 1.75;
}

/* three small glass cards */
.login-benefits {
	display: flex;
	flex-wrap: wrap;
	gap: 1.1rem;
	margin-top: 3.4rem;
}
.login-benefits li {
	display: flex;
	align-items: center;
	gap: 1.4rem;
	padding: 0.75rem 1.6rem 0.75rem 0.5rem;
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 1rem;
	background: rgba(5, 26, 55, 0.4);
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
	color: rgba(255, 255, 255, 0.94);
	font-size: 1rem;
	font-weight: 600;
	line-height: 1.5;
}
.login-benefits li > span:last-child {
	max-width: 6.8rem;
}
.login-benefit-icon {
	display: grid;
	place-items: center;
	flex: none;
	width: 3.75rem;
	height: 3.75rem;
	border-radius: 50%;
	background: rgba(255, 179, 0, 0.14);
	color: var(--yellow);
}
.login-benefit-icon svg {
	width: 1.9rem;
	height: 1.9rem;
	stroke-width: 1.7;
}

.login-credit {
	color: rgba(255, 255, 255, 0.68);
	font-size: 0.95rem;
}
.login-credit a {
	color: #fff;
	font-weight: 600;
}
.login-credit a:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* =========================================================
   RIGHT — sign-in card
   ========================================================= */
.login-panel {
	display: grid;
	place-items: center;
	min-width: 0;
	padding: 2.5rem 4.2rem;
	background:
		radial-gradient(circle at 100% 0%, rgba(255, 179, 0, 0.06), transparent 32%),
		radial-gradient(circle at 0% 100%, rgba(5, 26, 55, 0.06), transparent 30%), #f6f8fb;
}

.login-card {
	position: relative;
	z-index: 2;
	width: 100%;
	max-width: 40.5rem;
	padding: 2rem 3.2rem 2.4rem;
	border: 1px solid rgba(5, 26, 55, 0.05);
	border-radius: 1.7rem;
	background: #fff;
	box-shadow:
		0 18px 55px rgba(5, 26, 55, 0.1),
		0 2px 10px rgba(5, 26, 55, 0.04);
}

.login-card-top {
	display: flex;
	align-items: center;
	gap: 1rem;
}
.login-lock {
	display: grid;
	place-items: center;
	width: 2.7rem;
	height: 2.7rem;
	border-radius: 50%;
	background: var(--yellow-soft);
	color: #f5a300;
}
.login-lock svg {
	width: 1.3rem;
	height: 1.3rem;
}
.login-eyebrow {
	color: #37506f;
	font-size: 0.88rem;
	font-weight: 700;
	letter-spacing: 0.12em;
	text-transform: uppercase;
}

.login-card h2 {
	margin-top: 1.5rem;
	font-size: 2.9rem;
	font-weight: 800;
	line-height: 1.1;
	letter-spacing: -0.03em;
}
.login-subtitle {
	margin-top: 0.6rem;
	color: var(--muted);
	font-size: 1.28rem;
}

/* Admin / Team Leader switch */
.login-role-switch {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.15rem;
	margin-top: 2.1rem;
	padding: 0.25rem;
	border: 1px solid #e3e8ef;
	border-radius: 0.95rem;
	background: #f3f5f8;
}
.login-role-option {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.7rem;
	min-height: 2.9rem;
	padding: 0.5rem 0.8rem;
	border-radius: 0.7rem;
	color: #46566b;
	font-size: 1.06rem;
	font-weight: 600;
	transition:
		color 0.15s,
		background-color 0.15s,
		box-shadow 0.15s;
}
.login-role-option svg {
	width: 1.5rem;
	height: 1.5rem;
}
.login-role-option:hover {
	color: var(--navy);
	background: rgba(255, 255, 255, 0.7);
}
.login-role-option.is-active {
	color: #fff;
	background: var(--navy-btn);
	box-shadow: 0 4px 12px rgba(8, 41, 94, 0.3);
}
.login-role-option.is-active svg {
	color: var(--yellow);
}

/* error message */
.login-alert {
	display: flex;
	align-items: flex-start;
	gap: 0.6rem;
	margin-top: 1.4rem;
	padding: 0.7rem 0.9rem;
	border: 1px solid #f4c8cd;
	border-radius: 0.7rem;
	background: #fff1f2;
	color: #9e2735;
	font-size: 0.95rem;
}
.login-alert svg {
	width: 1.2rem;
	height: 1.2rem;
	margin-top: 0.15rem;
}

/* form */
.login-form {
	margin-top: 2.1rem;
}
.login-form > label {
	display: block;
	margin-bottom: 0.65rem;
	color: var(--navy);
	font-size: 1.06rem;
	font-weight: 600;
}
.login-form > .login-field + label {
	margin-top: 1.5rem;
}

.login-field {
	position: relative;
}
.login-field-icon {
	position: absolute;
	top: 50%;
	left: 1.3rem;
	width: 1.4rem;
	height: 1.4rem;
	transform: translateY(-50%);
	color: #8c98aa;
	pointer-events: none;
}
.login-field input {
	display: block;
	width: 100%;
	height: 3.7rem;
	padding: 0 3.6rem 0 4.3rem;
	border: 1px solid var(--field-line);
	border-radius: 0.85rem;
	background: var(--field-bg);
	color: var(--navy);
	font-size: 1.25rem;
	outline: none;
	transition:
		border-color 0.15s,
		box-shadow 0.15s;
}
.login-field input::placeholder {
	color: #7b8798;
}
.login-field input:focus {
	border-color: var(--navy-btn);
	box-shadow: 0 0 0 4px rgba(255, 179, 0, 0.22);
}
.login-field:focus-within .login-field-icon {
	color: var(--navy-btn);
}
.login-field input:-webkit-autofill {
	-webkit-box-shadow: 0 0 0 100px var(--field-bg) inset;
	-webkit-text-fill-color: var(--navy);
}

/* show / hide password */
.login-password-toggle {
	position: absolute;
	top: 50%;
	right: 0.6rem;
	display: grid;
	place-items: center;
	width: 2.8rem;
	height: 2.8rem;
	padding: 0;
	border: 0;
	border-radius: 0.6rem;
	background: transparent;
	color: #6f7c8f;
	cursor: pointer;
	transform: translateY(-50%);
}
.login-password-toggle:hover {
	color: var(--navy);
	background: rgba(5, 26, 55, 0.05);
}
.login-password-toggle svg {
	width: 1.5rem;
	height: 1.5rem;
}
.login-eye-show,
.login-password-toggle[aria-pressed='true'] .login-eye-hide {
	display: none;
}
.login-password-toggle[aria-pressed='true'] .login-eye-show {
	display: block;
}

/* remember me + forgot password */
.login-options {
	display: flex;
	align-items: center;
	justify-content: right;
	gap: 1rem;
	margin-top: 1.3rem;
	font-size: 1.06rem;
}
.login-remember {
	display: inline-flex;
	align-items: center;
	gap: 0.85rem;
	color: #5d6b80;
	cursor: pointer;
}
.login-remember input {
	appearance: none;
	-webkit-appearance: none;
	display: grid;
	place-content: center;
	width: 1.4rem;
	height: 1.4rem;
	margin: 0;
	border: 1.5px solid #8794a8;
	border-radius: 0.35rem;
	background: #fff;
	cursor: pointer;
}
.login-remember input::before {
	content: '';
	width: 0.38rem;
	height: 0.75rem;
	margin-top: -0.12rem;
	border: solid #fff;
	border-width: 0 0.18rem 0.18rem 0;
	transform: rotate(45deg) scale(0);
	transition: transform 0.12s;
}
.login-remember input:checked {
	border-color: var(--navy-btn);
	background: var(--navy-btn);
}
.login-remember input:checked::before {
	transform: rotate(45deg) scale(1);
}

.login-forgot {
	color: #1262c9;
}
.login-forgot:hover {
	text-decoration: underline;
	text-underline-offset: 3px;
}

/* sign-in button */
.login-submit {
	position: relative;
	display: block;
	width: 100%;
	height: 3.95rem;
	margin-top: 2.05rem;
	padding: 0 4rem;
	border: 0;
	border-radius: 0.85rem;
	background: var(--navy-btn);
	box-shadow: 0 10px 24px rgba(8, 41, 94, 0.22);
	color: #fff;
	font-size: 1.15rem;
	font-weight: 600;
	text-align: center;
	cursor: pointer;
	transition:
		background-color 0.15s,
		transform 0.15s,
		box-shadow 0.15s;
}
.login-submit:hover {
	background: var(--navy-btn-hover);
	box-shadow: 0 13px 28px rgba(8, 41, 94, 0.28);
	transform: translateY(-1px);
}
.login-submit svg {
	position: absolute;
	top: 50%;
	right: 1.7rem;
	width: 1.5rem;
	height: 1.5rem;
	transform: translateY(-50%);
	stroke-width: 2;
}

/* footer note with side lines */
.login-security-note {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 1.2rem;
	margin-top: 2.4rem;
	color: #6b7889;
	font-size: 0.95rem;
	white-space: nowrap;
}
.login-security-note::before,
.login-security-note::after {
	content: '';
	flex: 0 1 5rem;
	height: 1px;
	background: #d9e0ea;
}
.login-security-note span {
	display: inline-flex;
	align-items: center;
	gap: 0.8rem;
}
.login-security-note svg {
	width: 1.15rem;
	height: 1.15rem;
	color: #94a3b8;
}

/* =========================================================
   TABLET + PHONE: one column, photo on top, card overlaps it
   ========================================================= */
@media (max-width: 991.98px) {
	html {
		font-size: 16px;
	}

	.login-shell {
		display: block;
	}

	.login-visual-inner {
		min-height: 0;
		padding: 1.75rem 1.5rem 6rem;
	}
	.login-brand-mark {
		width: 4.5rem;
		height: 4.5rem;
		border-radius: 1.2rem;
	}
	.login-brand-mark img {
		width: 3.7rem;
		height: 3.7rem;
	}
	.login-brand-name strong {
		font-size: 1.3rem;
	}
	.login-brand-name small {
		font-size: 0.9rem;
	}

	.login-copy {
		margin: 0;
		padding: 2.2rem 0 0;
	}
	.login-kicker {
		padding: 0.55rem 1rem 0.55rem 1.1rem;
		gap: 0.6rem;
		font-size: 0.85rem;
	}
	.login-kicker svg {
		width: 1.1rem;
		height: 1.1rem;
	}
	.login-visual h1 {
		margin-top: 1.3rem;
		font-size: clamp(2.3rem, 8vw, 3.6rem);
	}
	.login-visual h1 span {
		display: inline;
	}
	.login-lead,
	.login-benefits,
	.login-credit {
		display: none;
	}

	.login-panel {
		display: block;
		padding: 0 1rem 2rem;
		background: transparent;
	}
	.login-card {
		max-width: 36rem;
		margin: -4rem auto 0;
		padding: 1.75rem 1.5rem 2rem;
		border-radius: 1.4rem;
	}
	.login-card h2 {
		font-size: 2.2rem;
	}
	.login-subtitle {
		font-size: 1.05rem;
	}
	.login-field input {
		font-size: 1.05rem;
	}
	.login-role-option {
		gap: 0.5rem;
		padding-inline: 0.4rem;
		font-size: 1rem;
		white-space: nowrap;
	}
	.login-submit {
		padding: 0 3.2rem;
		font-size: 1.05rem;
	}
}

@media (max-width: 420px) {
	.login-card {
		padding-inline: 1.2rem;
	}
	.login-security-note::before,
	.login-security-note::after {
		display: none;
	}
	.login-security-note {
		white-space: normal;
		text-align: center;
	}
}

@media (prefers-reduced-motion: reduce) {
	.login-page *,
	.login-page *::before,
	.login-page *::after {
		transition-duration: 0.01ms !important;
	}
}
