@import url("https://fonts.googleapis.com/css2?family=Baloo+2:wght@500;700;800&family=Nunito:wght@500;700;800&display=swap");

:root {
	--egg-font-base: "Nunito", "Trebuchet MS", "Segoe UI", sans-serif;
	--egg-font-display: "Baloo 2", "Nunito", sans-serif;
	--egg-orange: #f79646;
	--egg-orange-strong: #ea7f1f;
	--egg-orange-soft: #f6d4b4;
	--egg-yellow: #ffd24d;
	--egg-cream: #fff7e8;
	--egg-white: #ffffff;
	--egg-green-dark: #647946;
	--egg-green-light: #6ba539;
	--egg-green-bg: #bfd4a2;
	--egg-olive: #4f6038;
	--egg-black: #201f1f;
	--egg-ink-soft: #4d4a45;
	--egg-line: #f2c892;
	--egg-shadow: 0 12px 28px rgba(70, 43, 16, 0.14);
	--egg-shadow-soft: 0 6px 16px rgba(70, 43, 16, 0.1);
	--egg-bg-gradient: radial-gradient(circle at 10% 10%, #fff8eb 0%, #ffeccf 36%, #f8dbb6 100%);
	--egg-soft-gradient: linear-gradient(135deg, #fff5df 0%, #ffe4b7 100%);
	--egg-btn-gradient: linear-gradient(180deg, #f9a95f 0%, var(--egg-orange) 55%, var(--egg-orange-strong) 100%);
	--egg-btn-gradient-hover: linear-gradient(180deg, #f7a24f 0%, #ee8b2e 55%, #d97014 100%);
	--egg-surface-glass: rgba(255, 255, 255, 0.9);
	--egg-panel-solid: #fff8eb;
	--egg-panel-solid-strong: #fffefb;
	--egg-pill-radius: 999px;
}

* {
	box-sizing: border-box;
}

html,
body {
	min-height: 100%;
}

body.auth-page {
	margin: 0;
	color: var(--egg-black);
	font-family: var(--egg-font-base);
	background: var(--egg-bg-gradient);
	position: relative;
	overflow-x: hidden;
}

body.auth-page::before,
body.auth-page::after {
	content: "";
	position: fixed;
	border-radius: 999px;
	filter: blur(8px);
	pointer-events: none;
	z-index: 0;
}

body.auth-page::before {
	top: -80px;
	left: -120px;
	width: 320px;
	height: 320px;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.56) 0%, rgba(255, 248, 235, 0) 72%);
}

body.auth-page::after {
	right: -80px;
	bottom: -110px;
	width: 360px;
	height: 360px;
	background: radial-gradient(circle, rgba(255, 220, 165, 0.42) 0%, rgba(255, 220, 165, 0) 72%);
}

.auth-page__tools {
	position: fixed;
	top: calc(env(safe-area-inset-top, 0px) + 22px);
	right: calc(env(safe-area-inset-right, 0px) + 22px);
	z-index: 5;
}

.auth-password-access {
	position: relative;
}

.auth-password-access[data-open="true"] .auth-password-toggle {
	background: linear-gradient(180deg, rgba(255, 237, 210, 0.96) 0%, rgba(255, 225, 181, 0.98) 100%);
	border-color: rgba(234, 127, 31, 0.44);
	box-shadow:
		0 10px 24px rgba(118, 67, 20, 0.14),
		0 0 0 3px rgba(234, 127, 31, 0.1);
}

.auth-password-toggle {
	width: 54px;
	height: 54px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid rgba(242, 200, 146, 0.82);
	border-radius: 18px;
	background: rgba(255, 252, 246, 0.94);
	box-shadow: var(--egg-shadow-soft);
	color: var(--egg-ink-soft);
	cursor: pointer;
	padding: 0;
	transition:
		transform 0.16s ease,
		background-color 0.16s ease,
		box-shadow 0.16s ease,
		border-color 0.16s ease;
}

.auth-password-toggle:hover,
.auth-password-toggle:focus-visible {
	transform: translateY(-1px);
	background: linear-gradient(180deg, rgba(255, 241, 221, 0.98) 0%, rgba(255, 227, 189, 0.98) 100%);
	border-color: rgba(234, 127, 31, 0.4);
	outline: none;
}

.auth-password-toggle:active {
	transform: translateY(0);
}

.auth-password-toggle svg {
	width: 26px;
	height: 26px;
	display: block;
}

.auth-password-tooltip {
	position: absolute;
	top: calc(100% + 10px);
	right: 0;
	width: min(280px, calc(100vw - 40px));
	padding: 12px 14px;
	border-radius: 14px;
	background: rgba(43, 34, 27, 0.96);
	color: #fff4e2;
	font-size: 13px;
	line-height: 1.5;
	box-shadow: 0 14px 28px rgba(43, 34, 27, 0.24);
	opacity: 0;
	transform: translateY(-4px);
	pointer-events: none;
	transition: opacity 0.16s ease, transform 0.16s ease;
}

.auth-password-access:hover .auth-password-tooltip,
.auth-password-access:focus-within .auth-password-tooltip,
.auth-password-access[data-tooltip-visible="true"] .auth-password-tooltip {
	opacity: 1;
	transform: translateY(0);
}

.auth-layout {
	position: relative;
	z-index: 1;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 94px 20px 40px;
}

.auth-card {
	position: relative;
	width: min(760px, 100%);
	padding: clamp(28px, 5vw, 50px);
	border-radius: 32px;
	background: rgba(255, 249, 239, 0.92);
	border: 1px solid rgba(242, 200, 146, 0.72);
	box-shadow: var(--egg-shadow);
	text-align: center;
	overflow: hidden;
}

.auth-card::before,
.auth-card::after {
	content: "";
	position: absolute;
	border-radius: 999px;
	pointer-events: none;
}

.auth-card--plain {
	background: transparent;
	border: 0;
	box-shadow: none;
	overflow: visible;
	padding-top: 0;
	padding-bottom: 8px;
}

.auth-card--plain::before,
.auth-card--plain::after {
	display: none;
}

.auth-card::before {
	top: -84px;
	right: -40px;
	width: 190px;
	height: 190px;
	background: radial-gradient(circle, rgba(255, 208, 132, 0.24) 0%, rgba(255, 208, 132, 0) 72%);
}

.auth-card::after {
	left: -46px;
	bottom: -76px;
	width: 190px;
	height: 190px;
	background: radial-gradient(circle, rgba(191, 212, 162, 0.24) 0%, rgba(191, 212, 162, 0) 72%);
}

.auth-kicker {
	margin: 0 0 10px 0;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--egg-orange-strong);
}

.auth-intro h1 {
	margin: 0;
	font-family: var(--egg-font-display);
	font-size: clamp(42px, 7vw, 64px);
	line-height: 0.95;
}

.auth-copy {
	max-width: 34rem;
	margin: 14px auto 0 auto;
	font-size: 18px;
	line-height: 1.55;
	color: var(--egg-ink-soft);
}

.auth-feedback {
	max-width: 34rem;
	margin: 22px auto 0 auto;
	padding: 14px 16px;
	border-radius: 18px;
	border: 1px solid rgba(234, 127, 31, 0.28);
	background: linear-gradient(180deg, rgba(255, 248, 241, 0.96) 0%, rgba(255, 234, 220, 0.98) 100%);
	font-size: 15px;
	font-weight: 700;
	line-height: 1.5;
	color: #7f4311;
}

.auth-passkey {
	position: relative;
	display: grid;
	justify-items: center;
	gap: 14px;
	margin-top: 28px;
}

.auth-card--plain .auth-passkey {
	margin-top: 8px;
}

.auth-egg-button {
	position: relative;
	width: min(72vw, 360px);
	max-width: 100%;
	background: transparent;
	border: 0;
	box-shadow: none;
	padding: 0;
	margin: 0;
	cursor: pointer;
	transition: transform 0.18s ease, filter 0.18s ease;
}

.auth-egg-button::before {
	content: "";
	position: absolute;
	inset: 18% 18% 10%;
	border-radius: 50%;
	background: radial-gradient(circle, rgba(255, 215, 125, 0.32) 0%, rgba(255, 215, 125, 0) 70%);
	opacity: 0.92;
	transform: scale(0.98);
	transition: transform 0.18s ease, opacity 0.18s ease;
}

.auth-egg-button:hover,
.auth-egg-button:focus-visible {
	transform: translateY(-4px) scale(1.02);
	filter: drop-shadow(0 16px 24px rgba(119, 74, 27, 0.14));
	outline: none;
}

.auth-egg-button:hover::before,
.auth-egg-button:focus-visible::before {
	transform: scale(1.04);
	opacity: 1;
}

.auth-egg-button:active {
	transform: translateY(0) scale(0.985);
}

.auth-egg-button svg {
	position: relative;
	z-index: 1;
	display: block;
	width: 100%;
	height: auto;
	animation: auth-egg-float 4.8s ease-in-out infinite;
	transform-origin: center bottom;
}

.auth-egg-button [data-eye-pupil] {
	transform-box: fill-box;
	transform-origin: center;
	transition: transform 0.08s ease-out;
}

.auth-instruction {
	margin: 0;
	font-family: var(--egg-font-display);
	font-size: clamp(24px, 3.2vw, 31px);
	line-height: 1.1;
	font-weight: 800;
}

.auth-status {
	min-height: 1.6em;
	margin: 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--egg-ink-soft);
}

.auth-status[data-state="error"] {
	color: #8a4112;
}

.auth-status[data-state="success"] {
	color: #496829;
}

.auth-password-panel {
	max-width: 440px;
	margin: 28px auto 0 auto;
	padding: 24px;
	border-radius: 24px;
	background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 247, 234, 0.96) 100%);
	border: 1px solid rgba(242, 200, 146, 0.7);
	box-shadow: var(--egg-shadow-soft);
	text-align: left;
}

.auth-password-panel[hidden] {
	display: none;
}

.auth-password-panel h2 {
	margin: 0;
	font-family: var(--egg-font-display);
	font-size: 31px;
	line-height: 1;
}

.auth-password-panel p {
	margin: 10px 0 0 0;
	font-size: 15px;
	line-height: 1.5;
	color: var(--egg-ink-soft);
}

.auth-password-form {
	display: grid;
	gap: 14px;
	margin-top: 18px;
}

.auth-field {
	display: grid;
	gap: 8px;
}

.auth-field label {
	font-size: 14px;
	font-weight: 800;
	color: var(--egg-ink-soft);
}

.auth-password-submit,
.auth-secondary-link {
	background: var(--egg-btn-gradient);
	border: 1px solid transparent;
	border-radius: 12px;
	color: #fff;
	padding: 11px 14px;
	font-size: 16px;
	font-weight: 800;
	text-decoration: none;
	text-align: center;
	cursor: pointer;
	transition: background-color 0.18s ease, transform 0.1s ease;
}

.auth-password-submit:hover,
.auth-password-submit:focus-visible,
.auth-secondary-link:hover,
.auth-secondary-link:focus-visible {
	background: var(--egg-btn-gradient-hover);
	outline: none;
}

.auth-password-submit:active,
.auth-secondary-link:active {
	transform: translateY(1px);
}

.auth-secondary-link {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 148px;
}

input[type="text"],
input[type="password"] {
	width: 100%;
	border: 1px solid #e8d0b5;
	background-color: var(--egg-panel-solid-strong);
	border-radius: 12px;
	padding: 12px 14px;
	font: inherit;
	color: var(--egg-black);
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

input[type="text"]:focus,
input[type="password"]:focus {
	outline: 2px solid rgba(234, 127, 31, 0.22);
	outline-offset: 1px;
	border-color: rgba(234, 127, 31, 0.38);
}

.auth-actions {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 24px;
}

.auth-actions p {
	margin: 0;
	font-size: 15px;
	color: var(--egg-ink-soft);
}

.auth-chip {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 12px;
	border-radius: 999px;
	border: 1px solid rgba(242, 200, 146, 0.82);
	background: rgba(255, 255, 255, 0.84);
	box-shadow: var(--egg-shadow-soft);
	font-size: 14px;
	font-weight: 800;
	color: var(--egg-ink-soft);
}

.auth-chip svg {
	width: 15px;
	height: 15px;
}

.auth-sr-only {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

@keyframes auth-egg-float {
	0%,
	100% {
		transform: translateY(0) rotate(-1deg);
	}

	50% {
		transform: translateY(-9px) rotate(1deg);
	}
}

@media (max-width: 700px) {
	.auth-layout {
		padding-top: 92px;
	}

	.auth-card {
		border-radius: 26px;
		padding: 28px 22px 24px;
	}

	.auth-password-tooltip {
		width: min(250px, calc(100vw - 34px));
	}

	.auth-password-panel {
		padding: 20px;
	}
}

@media (max-width: 480px) {
	.auth-page__tools {
		top: calc(env(safe-area-inset-top, 0px) + 16px);
		right: calc(env(safe-area-inset-right, 0px) + 16px);
	}

	.auth-password-toggle {
		width: 50px;
		height: 50px;
		border-radius: 16px;
	}

	.auth-copy {
		font-size: 17px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.auth-egg-button,
	.auth-password-toggle,
	.auth-password-tooltip {
		transition: none;
	}

	.auth-egg-button svg {
		animation: none;
	}
}
