/* Earlybyte sign-in page: the canonical copy (eb_blueprint/templates/design/signin.css).
   The same look as the Earlybyte login (login.eb8.ch): no card, logo, headline, form and buttons
   straight on the contour background, a lime line along the bottom of the window. Always dark.
   Approved by Remo on 2026-11-11.

   Self-contained: every rule sits under .signin-page and uses only the --signin-* tokens below,
   so it works next to eb.css (eb_relay) and inside apps with their own design system (Reflex:
   mScan, Hudson). Apps copy it unchanged, with img/signin-background.svg next to it. The page
   provides the fonts: Manrope (body) and Figtree 900 (headline); eb.css declares both.
   Markup: README.md («Sign-in page»).

   Contrast (WCAG 2.1 AA) against the lightest background behind the form (#29585c): text 6.7,
   title 7.4, muted 4.9, links 5.6, problem 5.2, input border 4.0; button text 8.6. */

.signin-page {
	--signin-accent: #a6d84a;
	--signin-accent-hover: #b8e85e;
	--signin-accent-ink: #17300a;
	--signin-text: #e6ede8;
	--signin-title: #f4f8f1;
	--signin-muted: #c3cec7;
	--signin-link: #b8e85e;
	--signin-problem: #ffc2b8;
	--signin-input: #0f171a;
	--signin-line: #a9bdb2;
	--signin-soft: #1e2b31;
	--signin-focus: #bfe98a;
	--signin-page: #10262c;

	display: grid;
	grid-template-rows: auto 1fr auto;
	min-height: 100vh;
	min-height: 100dvh;
	margin: 0;
	color-scheme: dark;
	background: var(--signin-page) url('img/signin-background.svg') center / cover no-repeat fixed;
	color: var(--signin-text);
	font-family: Manrope, ui-sans-serif, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
	font-size: 15px;
	line-height: 1.55;
}

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

/* Lime line along the very bottom of the window */
.signin-page::after {
	position: fixed;
	inset: auto 0 0;
	height: 4px;
	background: var(--signin-accent);
	content: '';
	pointer-events: none;
}

.signin-page :focus-visible {
	outline: 2px solid var(--signin-focus);
	outline-offset: 2px;
}

.signin-page .sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* --- Top row: the language switch on the left (or nothing) --------------- */

.signin-page .signin-top {
	display: flex;
	justify-content: space-between;
	align-items: center;
	min-height: 1.25rem;
	padding: 1.25rem 1.5rem 0;
}

/* Translate icon and a borderless select, as on login.eb8.ch */
.signin-page .lang {
	display: inline-flex;
	flex-direction: row;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	color: #ffffff;
	font-size: 0.9rem;
	font-weight: 400;
}

.signin-page .lang svg {
	width: 1.05rem;
	height: 1.05rem;
}

.signin-page .lang select {
	width: auto;
	min-height: 0;
	padding: 0.2rem 0.1rem;
	border: 0;
	background: transparent;
	color: inherit;
	font: inherit;
	appearance: none;
	cursor: pointer;
}

.signin-page .lang option {
	background: var(--signin-page);
	color: var(--signin-text);
}

/* --- The column: centred in the window, everything inside aligned left --- */

.signin-page .signin {
	align-self: center;
	justify-self: center;
	width: min(26rem, 100% - 3rem);
	max-width: none;
	margin: 0;
	padding: 2rem 0 3rem;
}

.signin-page .signin-logo {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	margin-bottom: 2rem;
	color: var(--signin-title);
	font-size: 2.2rem;
	font-weight: 800;
	line-height: 1;
	letter-spacing: -0.02em;
}

.signin-page .signin-logo img {
	display: block;
	width: auto;
	height: 3.75rem;
}

/* A square mark next to a text name (eb_relay) is smaller than a full logo image */
.signin-page .signin-logo img.mark {
	height: 2.9rem;
}

.signin-page .signin-logo .brand-name span {
	color: var(--signin-accent);
}

.signin-page h1 {
	margin: 0;
	color: var(--signin-title);
	font-family: Figtree, Manrope, sans-serif;
	font-size: 1.6rem;
	font-weight: 900;
	line-height: 1.2;
	letter-spacing: -0.01em;
}

.signin-page .signin-text {
	margin: 0.6rem 0 0;
	color: var(--signin-muted);
}

.signin-page .signin-text.problem {
	color: var(--signin-problem);
}

.signin-page a:not(.button) {
	color: var(--signin-link);
	text-underline-offset: 0.18em;
}

/* --- Form ----------------------------------------------------------------- */

.signin-page form {
	margin: 1.5rem 0 0;
}

.signin-page label {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	color: var(--signin-title);
	font-size: 0.9rem;
	font-weight: 700;
}

.signin-page input:not([type='checkbox'], [type='radio'], [type='hidden']) {
	width: 100%;
	min-height: 2.75rem;
	padding: 0 0.85rem;
	border: 1px solid var(--signin-line);
	border-radius: 0.6rem;
	background: var(--signin-input);
	color: var(--signin-text);
	font: inherit;
	font-weight: 400;
}

.signin-page input::placeholder {
	color: var(--signin-muted);
	opacity: 1;
}

.signin-page input:focus-visible {
	border-color: var(--signin-focus);
	outline: 2px solid var(--signin-focus);
	outline-offset: 1px;
}

/* --- Buttons -------------------------------------------------------------- */

.signin-page .signin-buttons {
	display: grid;
	gap: 0.75rem;
	margin-top: 1.5rem;
}

.signin-page .button {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	width: 100%;
	min-height: 2.75rem;
	padding: 0 1.4rem;
	border: 0;
	border-radius: 999px;
	background: var(--signin-accent);
	box-shadow: none;
	color: var(--signin-accent-ink);
	font: inherit;
	font-weight: 700;
	text-decoration: none;
	cursor: pointer;
	transition:
		background-color 140ms ease,
		box-shadow 140ms ease;
}

.signin-page .button:hover:not(:disabled) {
	background: var(--signin-accent-hover);
	box-shadow: 0 0.35rem 1rem rgb(166 216 74 / 0.35);
	transform: none;
}

.signin-page .button:disabled {
	opacity: 0.6;
	cursor: default;
}

.signin-page .button svg {
	width: 1.1rem;
	height: 1.1rem;
}

.signin-page .button.secondary {
	border: 1px solid var(--signin-line);
	background: var(--signin-soft);
	color: var(--signin-text);
}

.signin-page .button.secondary:hover:not(:disabled) {
	border-color: var(--signin-text);
	background: var(--signin-soft);
	box-shadow: none;
}

.signin-page .signin-note {
	margin: 1.25rem 0 0;
	color: var(--signin-muted);
	font-size: 0.85rem;
}

/* --- Footer: version, «Made by Earlybyte» (Earlybyte in lime), links; centred, white --- */

.signin-page .signin-footer {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.25rem 0.9rem;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 1rem 1.5rem 1.6rem;
	color: #ffffff;
	font-size: 0.82rem;
}

.signin-page .signin-footer a {
	color: #ffffff;
	text-decoration: none;
}

.signin-page .signin-footer a:hover {
	text-decoration: underline;
}

.signin-page .signin-footer .version {
	color: var(--signin-muted);
}

.signin-page .signin-footer .by b {
	color: var(--signin-accent);
}

/* Phones: the column starts at the top instead of the middle */
@media (max-width: 35rem) {
	.signin-page .signin {
		align-self: start;
		padding-top: 1rem;
	}
}

@media (prefers-reduced-motion: reduce) {
	.signin-page .button {
		transition: none;
	}
}
