/*
 * Auth-page styling for idp's two server-rendered pages (login, register).
 *
 * The token block below mirrors admin-web's `src/app/globals.css` by hand. idp has no Node toolchain, and
 * adding one to a Gradle service just to share a stylesheet costs more than keeping two short blocks in sync -
 * so if a colour changes there, change it here. Everything below the tokens is idp's own: admin-web's styling
 * is Tailwind utilities on components that don't exist here.
 */
:root {
	--canvas: #faf8f6;
	--surface: #ffffff;
	--ink: #1c1917;
	--ink-muted: #78716c;
	--ink-subtle: #a8a29e;
	--line: #e7e5e4;
	--line-strong: #d6d3d1;
	--accent: #c2410c;
	--accent-hover: #9a3412;
	--accent-ink: #ffffff;
	--accent-soft: #fdece2;
	--danger: #be123c;
	--danger-soft: #ffe9ee;
	--shadow-key: 28 25 23;
}

@media (prefers-color-scheme: dark) {
	:root {
		--canvas: #1a1613;
		--surface: #221d19;
		--ink: #f5f1ed;
		--ink-muted: #a8a29e;
		--ink-subtle: #78716c;
		--line: #332b26;
		--line-strong: #443a33;
		--accent: #fb923c;
		--accent-hover: #fdba74;
		--accent-ink: #1a1613;
		--accent-soft: #3a2317;
		--danger: #fb7185;
		--danger-soft: #3d1620;
		--shadow-key: 0 0 0;
	}
}

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

body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1.5rem;
	background: var(--canvas);
	color: var(--ink);
	font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.card {
	width: 100%;
	max-width: 24rem;
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
	padding: 2rem;
	border: 1px solid var(--line);
	border-radius: 0.75rem;
	background: var(--surface);
	box-shadow:
		0 1px 2px rgb(var(--shadow-key) / 0.04),
		0 4px 12px -4px rgb(var(--shadow-key) / 0.06);
}

.wordmark {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	font-size: 0.875rem;
	font-weight: 600;
	letter-spacing: -0.01em;
}

.wordmark .mark {
	width: 1rem;
	height: 1rem;
	flex: none;
	color: var(--accent);
}

.wordmark span {
	font-weight: 400;
	color: var(--ink-muted);
}

h1 {
	margin: 0;
	font-size: 1.5rem;
	font-weight: 600;
	letter-spacing: -0.02em;
}

.lede {
	margin: 0.375rem 0 0;
	font-size: 0.875rem;
	color: var(--ink-muted);
}

form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

label {
	display: flex;
	flex-direction: column;
	gap: 0.375rem;
	font-size: 0.8125rem;
	font-weight: 500;
	color: var(--ink-muted);
}

input {
	width: 100%;
	padding: 0.5rem 0.625rem;
	border: 1px solid var(--line-strong);
	border-radius: 0.5rem;
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	font-size: 0.875rem;
	transition: border-color 0.15s;
}

input:hover {
	border-color: var(--ink-subtle);
}

button {
	padding: 0.5rem 1rem;
	border: 0;
	border-radius: 0.5rem;
	background: var(--accent);
	color: var(--accent-ink);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: background-color 0.15s;
}

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

/* Keyboard-only, so clicking a control doesn't leave a ring behind it. */
:focus-visible {
	outline: 2px solid var(--accent);
	outline-offset: 2px;
}

/*
 * A failed login and a successful registration are the same shape of message - one line, above the form -
 * so they share everything but colour.
 */
.notice {
	margin: 0;
	padding: 0.625rem 0.75rem;
	border-radius: 0.5rem;
	font-size: 0.8125rem;
}

.notice-error {
	background: var(--danger-soft);
	color: var(--danger);
}

.notice-info {
	background: var(--accent-soft);
	color: var(--accent);
}

.footnote {
	margin: 0;
	font-size: 0.8125rem;
	color: var(--ink-muted);
	text-align: center;
}

a {
	color: var(--accent);
	font-weight: 500;
	text-decoration: none;
}

a:hover {
	text-decoration: underline;
}

.hint {
	font-weight: 400;
	color: var(--ink-subtle);
}
