/**
 * 账户登录页（两步验证码）— 复刻 Shopify 新版客户账户登录页
 *
 * 规格（按参考截图 1920×911 实测）：
 *   表单列宽 380px，水平/垂直居中
 *   站名 20px/700/#000 居中；标题 22px/700/#000
 *   次要文字 14px/#707070；条款行 13px/#707070（链接同色带下划线）
 *   输入框 380×48，圆角 8，边框 #dedede，内边距 18px，占位 #707070
 *   验证码框 6 × 56×72，间距 8，圆角 8
 *   勾选框 18×18 圆角 5，选中 #005bd1
 *   链接蓝 #005bd1（Privacy policy / Change，均无下划线）
 */

:root {
	--auth-ink: #000000;
	--auth-muted: #707070;
	--auth-blue: #005bd1;
	--auth-border: #dedede;
	--auth-radius: 8px;
}

.avape-auth-page,
.avape-auth-page *,
.avape-auth-page *::before,
.avape-auth-page *::after {
	box-sizing: border-box;
}

.avape-auth-page {
	margin: 0;
	background: #ffffff;
	color: var(--auth-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, Ubuntu, sans-serif;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

.auth-shell {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

/* ── 顶部站名 ── */
.auth-header {
	padding: 42px 20px 0;
	text-align: center;
	line-height: 1;
}
.auth-logo {
	display: inline-block;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: .01em;
	color: var(--auth-ink);
	text-decoration: none;
}
.auth-logo:hover,
.auth-logo:focus { color: var(--auth-ink); text-decoration: none; }

/* ── 中部：垂直居中的表单列 ── */
.auth-main {
	flex: 1 1 auto;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 20px;
}
.auth-card {
	/* 参考图中表单块中心位于 911px 高视口的 470px 处（略低于几何中心），
	   顶部外边距把内容中心整体下移 14px 与之对齐 */
	margin-top: 28px;
	width: 380px;
	max-width: 100%;
}

.auth-step[hidden] { display: none; }

/* 参考图中步骤 2 的块中心（458px）比步骤 1（470.5px）高约 13.5px，负外边距对齐 */
.auth-step--code { margin-top: -27px; }

.auth-title {
	margin: 0;
	font-size: 21px;
	font-weight: 700;
	line-height: 1.2;
	color: var(--auth-ink);
}
.auth-sub {
	margin: 6px 0 0;
	font-size: 14px;
	line-height: 1.4;
	color: var(--auth-muted);
}
.auth-step--code .auth-sub { margin-top: 6px; }

/* ── 步骤 1：邮箱输入框 ── */
.auth-field {
	position: relative;
	margin-top: 20px;
}
.auth-input {
	display: block;
	width: 100%;
	height: 49px;
	padding: 0 52px 0 18px;
	border: 1px solid var(--auth-border);
	border-radius: var(--auth-radius);
	background: #fff;
	font-family: inherit;
	font-size: 14px;
	color: var(--auth-ink);
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-input::placeholder { color: var(--auth-muted); opacity: 1; }
.auth-input:hover { border-color: #bdbdbd; }
.auth-input:focus {
	border-color: var(--auth-blue);
	box-shadow: inset 0 0 0 1px var(--auth-blue);
}
.auth-input.is-invalid { border-color: #d72c0d; box-shadow: inset 0 0 0 1px #d72c0d; }

.auth-arrow {
	position: absolute;
	top: 50%;
	right: 7px;
	transform: translateY(-50%);
	width: 36px;
	height: 36px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--auth-ink);
	cursor: pointer;
}
.auth-arrow svg { width: 22px; height: 22px; }
.auth-arrow:hover { background: rgba(0, 0, 0, .04); }
.auth-arrow[disabled] { opacity: .4; cursor: default; }

/* ── 勾选框 ── */
.auth-check {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 14px;
	font-size: 14px;
	line-height: 1.3;
	color: var(--auth-ink);
	cursor: pointer;
	-webkit-user-select: none;
	user-select: none;
}
.auth-check input {
	appearance: none;
	-webkit-appearance: none;
	box-sizing: border-box;
	flex: 0 0 18px;
	width: 18px;
	height: 18px;
	margin: 0;
	padding: 0;
	border: 1px solid #8a8a8a;
	border-radius: 5px;
	background: #fff;
	cursor: pointer;
	position: relative;
	transition: background-color .12s ease, border-color .12s ease;
}
.auth-check input:checked {
	background-color: var(--auth-blue);
	border-color: var(--auth-blue);
}
.auth-check input:checked::after {
	content: "";
	position: absolute;
	left: 5px;
	top: 2px;
	width: 6px;
	height: 10px;
	border: solid #fff;
	border-width: 0 2px 2px 0;
	transform: rotate(45deg);
}
.auth-check input:focus-visible {
	outline: 2px solid var(--auth-blue);
	outline-offset: 2px;
}

/* ── 条款行 ── */
.auth-terms {
	margin: 20px 0 0;
	font-size: 12px;
	line-height: 1.5;
	color: var(--auth-muted);
	text-align: center;
}
.auth-terms a {
	color: var(--auth-muted);
	text-decoration: underline;
	text-underline-offset: 2px;
}
.auth-terms a:hover,
.auth-terms a:focus { color: var(--auth-ink); }

/* ── 步骤 2：验证码 ── */
.auth-otp {
	display: grid;
	grid-template-columns: repeat(6, 1fr);
	gap: 8px;
	margin-top: 20px;
}
.auth-otp-box {
	box-sizing: border-box;
	width: 100%;
	height: 72px;
	padding: 0;
	border: 1px solid var(--auth-border);
	border-radius: var(--auth-radius);
	background: #fff;
	font-family: inherit;
	font-size: 24px;
	font-weight: 500;
	line-height: 1;
	color: var(--auth-ink);
	text-align: center;
	outline: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-otp-box:hover { border-color: #bdbdbd; }
.auth-otp-box:focus {
	border-color: var(--auth-blue);
	box-shadow: inset 0 0 0 1px var(--auth-blue);
}
.auth-otp-box.is-invalid { border-color: #d72c0d; box-shadow: inset 0 0 0 1px #d72c0d; }

.auth-change {
	display: inline;
	margin: 0 0 0 6px;
	padding: 0;
	border: 0;
	background: none;
	font-family: inherit;
	font-size: 14px;
	color: var(--auth-blue);
	cursor: pointer;
	vertical-align: baseline;
}
.auth-change:hover,
.auth-change:focus { text-decoration: none; color: #004ba8; }

/* ── 错误提示（参考图无此态，仅在出错时出现） ── */
.auth-notice {
	margin: 12px 0 0;
	font-size: 13px;
	line-height: 1.45;
	color: #d72c0d;
}
.auth-step--code .auth-notice { text-align: center; }

/* ── 底部隐私政策 ── */
.auth-footer {
	padding: 20px 20px 21px;
	text-align: center;
}
.auth-footer a {
	font-size: 14px;
	color: var(--auth-blue);
	text-decoration: none;
}
.auth-footer a:hover,
.auth-footer a:focus { color: #004ba8; text-decoration: none; }

/* ── 窄屏：列宽自适应，验证码框随之变窄 ── */
@media (max-width: 460px) {
	.auth-card { width: 100%; }
	.auth-otp { gap: 6px; }
	.auth-otp-box { height: 60px; font-size: 20px; }
}
