.auth-page {
	min-height: calc(100vh - var(--header-h, 72px) - 120px);
	display: grid;
	place-items: center;
	padding: 3rem 0 4rem;
	background:
		radial-gradient(ellipse 80% 60% at 50% -10%, var(--accent-soft), transparent),
		var(--surface-2);
}

.auth-card {
	width: min(100% - 2rem, 440px);
	padding: 2rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: calc(var(--radius) + 4px);
	box-shadow: var(--shadow-lg);
}

.auth-card__brand {
	text-align: center;
	margin-bottom: 1.5rem;
}

.auth-card__brand p {
	margin: 0.5rem 0 0;
	color: var(--ink-3);
	font-size: 0.95rem;
}

.auth-tabs {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.5rem;
	padding: 0.35rem;
	background: var(--surface-3);
	border-radius: var(--radius-sm);
	margin-bottom: 1.5rem;
}

.auth-tabs__btn {
	border: 0;
	background: transparent;
	padding: 0.65rem 1rem;
	border-radius: var(--radius-xs);
	font: inherit;
	font-weight: 600;
	color: var(--ink-3);
	cursor: pointer;
	transition: background 0.2s var(--ease), color 0.2s var(--ease);
}

.auth-tabs__btn.is-active {
	background: var(--surface);
	color: var(--ink);
	box-shadow: var(--shadow-xs);
}

.auth-panel { display: none; }
.auth-panel.is-active { display: block; }

.auth-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.auth-form label {
	display: flex;
	flex-direction: column;
	gap: 0.35rem;
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--ink);
}

.auth-form input[type="email"],
.auth-form input[type="password"],
.auth-form input[type="text"] {
	padding: 0.75rem 0.9rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-xs);
	font: inherit;
	background: var(--surface);
	transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.auth-password {
	position: relative;
	display: block;
}

.auth-password input {
	width: 100%;
	padding-inline-end: 2.75rem;
	box-sizing: border-box;
}

.auth-password__toggle {
	position: absolute;
	inset-inline-end: 0.35rem;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	padding: 0;
	border: 0;
	border-radius: var(--radius-xs);
	background: transparent;
	color: var(--ink-3);
	cursor: pointer;
	transition: color 0.2s var(--ease), background 0.2s var(--ease);
}

.auth-password__toggle:hover,
.auth-password__toggle:focus-visible {
	color: var(--ink);
	background: var(--surface-3);
	outline: none;
}

.auth-password__icon {
	display: block;
}

.auth-form input:focus {
	outline: none;
	border-color: var(--accent);
	box-shadow: 0 0 0 3px var(--accent-soft);
}

.auth-check {
	flex-direction: row !important;
	align-items: center;
	gap: 0.5rem !important;
	font-weight: 500 !important;
	color: var(--ink-2) !important;
}

.auth-check input { width: auto; }

.auth-form__submit { width: 100%; margin-top: 0.25rem; }

.auth-form__hint {
	margin: 0.75rem 0 0;
	font-size: 0.85rem;
	text-align: center;
}

.auth-form__hint a {
	color: var(--ink-3);
}

.auth-form__hint a:hover {
	color: var(--accent);
}


.auth-form__error,
.auth-error {
	margin: 0;
	padding: 0.65rem 0.85rem;
	border-radius: var(--radius-xs);
	background: #fef2f2;
	color: #b91c1c;
	font-size: 0.875rem;
}

.auth-divider {
	display: flex;
	align-items: center;
	gap: 1rem;
	margin: 1.5rem 0;
	color: var(--ink-4);
	font-size: 0.8rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.auth-divider::before,
.auth-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--line);
}

.auth-google {
	width: 100%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.65rem;
}

.site-header__auth {
	white-space: nowrap;
	font-size: 0.875rem;
}

.header-user-menu {
	position: relative;
}

.header-user-menu__trigger {
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.4rem 0.7rem 0.4rem 0.45rem;
	border: 1px solid var(--line);
	border-radius: var(--radius-xs);
	background: var(--surface);
	color: var(--ink);
	font: inherit;
	font-size: 0.875rem;
	font-weight: 600;
	cursor: pointer;
	transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease);
}

.header-user-menu__trigger:hover,
.header-user-menu.is-open .header-user-menu__trigger {
	border-color: var(--accent-muted);
	box-shadow: var(--shadow-xs);
}

.header-user-menu__avatar {
	width: 28px;
	height: 28px;
	border-radius: 50%;
	background: var(--accent);
	color: #fff;
	display: grid;
	place-items: center;
	font-size: 0.75rem;
	font-weight: 700;
	flex-shrink: 0;
}

.header-user-menu__name {
	max-width: 120px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.header-user-menu__chevron {
	color: var(--ink-3);
	transition: transform 0.2s var(--ease);
}

.header-user-menu:hover .header-user-menu__chevron,
.header-user-menu.is-open .header-user-menu__chevron {
	transform: rotate(180deg);
}

.header-user-menu__dropdown {
	position: absolute;
	top: calc(100% + 6px);
	right: 0;
	min-width: 160px;
	padding: 0.35rem;
	background: var(--surface);
	border: 1px solid var(--line);
	border-radius: var(--radius-sm);
	box-shadow: var(--shadow-md);
	opacity: 0;
	visibility: hidden;
	transform: translateY(-4px);
	transition: opacity 0.2s var(--ease), transform 0.2s var(--ease), visibility 0.2s;
	z-index: 200;
}

.header-user-menu:hover .header-user-menu__dropdown,
.header-user-menu.is-open .header-user-menu__dropdown,
.header-user-menu:focus-within .header-user-menu__dropdown {
	opacity: 1;
	visibility: visible;
	transform: translateY(0);
}

.header-user-menu__dropdown a {
	display: block;
	padding: 0.55rem 0.75rem;
	border-radius: var(--radius-xs);
	color: var(--ink-2);
	font-size: 0.875rem;
	font-weight: 500;
	text-decoration: none;
}

.header-user-menu__dropdown a:hover {
	background: var(--surface-3);
	color: var(--ink);
}

.header-user-menu__logout {
	color: #b91c1c !important;
}

.mobile-auth .header-user-menu {
	width: 100%;
}

.mobile-auth .header-user-menu__trigger {
	width: 100%;
	justify-content: flex-start;
}

.mobile-auth .header-user-menu__dropdown {
	position: static;
	opacity: 1;
	visibility: visible;
	transform: none;
	box-shadow: none;
	border: 0;
	padding: 0.25rem 0 0 2.5rem;
	display: none;
}

.mobile-auth .header-user-menu.is-open .header-user-menu__dropdown {
	display: block;
}

.mobile-auth .site-header__auth {
	width: 100%;
	justify-content: center;
}

