/* ==========================================================================
   auth.css · 登录 / 注册 共享样式
   依赖: design-tokens.css (提供 :root 变量 / 全局 body 背景)
   ========================================================================== */

/* 登录/注册页 body 布局 · footer 置底 */
body {
	display: flex;
	flex-direction: column;
}

.nav {
	position: sticky;
	top: 0;
	z-index: 10;
	background: var(--paper-glass);
	backdrop-filter: saturate(140%) blur(12px);
	-webkit-backdrop-filter: saturate(140%) blur(12px);
	border-bottom: 1px solid var(--rule);
}
.nav-inner {
	max-width: 1160px;
	margin: 0 auto;
	padding: 14px var(--gutter);
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}
.brand {
	display: inline-flex;
	align-items: center;
	gap: 9px;
}
.brand-logo {
	width: 30px;
	height: 30px;
	border-radius: 8px;
	background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
	color: #fff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	box-shadow:
		0 1px 2px rgba(217, 119, 6, 0.4),
		inset 0 -1px 0 rgba(0, 0, 0, 0.1);
	letter-spacing: -0.03em;
}
.brand-name {
	font-size: 17px;
	font-weight: 700;
	color: var(--ink-strong);
	letter-spacing: -0.02em;
	line-height: 1;
}
.brand-name .tld {
	color: var(--brand);
	font-weight: 600;
}
.nav-back {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 7px 12px;
	font-size: 13.5px;
	font-weight: 500;
	color: var(--ink-dim);
	border-radius: var(--r-sm);
	transition: all var(--dur) var(--ease);
}
.nav-back:hover {
	color: var(--ink-strong);
	background: var(--paper-sunk);
}

/* ===== 主体布局 ===== */
.auth-main {
	flex: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px var(--gutter) 40px;
	position: relative;
	z-index: 1;
}
.auth-wrap {
	width: 100%;
	max-width: 420px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
}
.auth-head {
	text-align: center;
}
.auth-pill {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 4px 10px 4px 5px;
	background: var(--paper-tint);
	border: 1px solid var(--rule);
	border-radius: var(--r-pill);
	font-size: 11.5px;
	font-weight: 500;
	color: var(--ink-dim);
	margin-bottom: 18px;
	box-shadow: var(--shadow-xs);
}
.auth-pill-tag {
	padding: 2px 7px;
	background: var(--brand-soft);
	color: var(--brand-ink);
	border-radius: var(--r-pill);
	font-size: 10px;
	font-weight: 700;
}
.auth-title {
	font-size: 28px;
	font-weight: 800;
	color: var(--ink-strong);
	line-height: 1.2;
	letter-spacing: -0.025em;
	margin-bottom: 8px;
}
.auth-sub {
	font-size: 14.5px;
	color: var(--ink-mute);
	line-height: 1.55;
}
.auth-card {
	width: 100%;
	background: var(--paper-tint);
	border: 1px solid var(--rule);
	border-radius: var(--r-lg);
	padding: 30px 28px 26px;
	box-shadow: var(--shadow-card);
}
.auth-form {
	display: flex;
	flex-direction: column;
	gap: 14px;
}

/* ===== 表单 ===== */
.form-group {
	display: flex;
	flex-direction: column;
	gap: 7px;
}
.form-group label {
	font-size: 13px;
	font-weight: 600;
	color: var(--ink);
	letter-spacing: -0.005em;
	display: flex;
	justify-content: space-between;
	align-items: baseline;
}
.form-group label .hint {
	font-size: 11.5px;
	font-weight: 400;
	color: var(--ink-faint);
	letter-spacing: 0;
}
.form-group input {
	width: 100%;
	padding: 11px 14px;
	font-family: inherit;
	font-size: 14.5px;
	color: var(--ink-strong);
	background: var(--paper-tint);
	border: 1px solid var(--rule-strong);
	border-radius: var(--r-sm);
	transition: all var(--dur) var(--ease);
	-webkit-appearance: none;
	appearance: none;
}
.form-group input::placeholder {
	color: var(--ink-faint);
}
.form-group input:hover {
	border-color: var(--ink-mute);
}
.form-group input:focus {
	outline: none;
	border-color: var(--brand);
	box-shadow: 0 0 0 3px rgba(217, 119, 6, 0.15);
	background: #fff;
}

/* ===== 提交按钮 ===== */
.btn-submit {
	width: 100%;
	padding: 12px 20px;
	margin-top: 10px;
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 600;
	letter-spacing: 0.04em;
	background: var(--ink-strong);
	color: #fff;
	border: 1px solid var(--ink-strong);
	border-radius: var(--r-sm);
	cursor: pointer;
	transition: all var(--dur) var(--ease);
}
.btn-submit:hover:not(:disabled) {
	background: var(--ink);
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}
.btn-submit:active:not(:disabled) {
	transform: translateY(0);
	box-shadow: var(--shadow-sm);
}
.btn-submit:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

/* ===== 提示条 ===== */
.alert {
	padding: 11px 14px;
	font-size: 13.5px;
	border-radius: var(--r-sm);
	margin-bottom: 16px;
	display: flex;
	align-items: flex-start;
	gap: 9px;
	line-height: 1.5;
}
.alert::before {
	flex-shrink: 0;
	font-size: 14px;
	line-height: 1.4;
}
.alert-error {
	background: var(--neg-soft);
	color: #991b1b;
	border: 1px solid #fecaca;
}
.alert-error::before {
	content: "⚠";
	color: var(--neg);
}
.alert-success {
	background: var(--pos-soft);
	color: #065f46;
	border: 1px solid #a7f3d0;
}
.alert-success::before {
	content: "✓";
	color: var(--pos);
	font-weight: 700;
}

/* ===== 分隔 / 底部链接 ===== */
.auth-divider {
	display: flex;
	align-items: center;
	gap: 10px;
	margin: 6px 0 2px;
	font-size: 11.5px;
	font-weight: 600;
	color: var(--ink-faint);
	letter-spacing: 0.08em;
	text-transform: uppercase;
}
.auth-divider::before,
.auth-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--rule);
}
.auth-alt {
	text-align: center;
	font-size: 13.5px;
	color: var(--ink-mute);
}
.auth-alt a {
	color: var(--brand);
	font-weight: 600;
	transition: color var(--dur) var(--ease);
}
.auth-alt a:hover {
	color: var(--brand-hover);
}
.auth-fineprint {
	text-align: center;
	font-size: 12px;
	color: var(--ink-faint);
	margin-top: 4px;
	line-height: 1.6;
}
.auth-fineprint a {
	color: var(--ink-mute);
	text-decoration: underline;
}
.auth-fineprint a:hover {
	color: var(--ink-strong);
}

/* ===== 验证码容器 ===== */
.captcha-container {
	display: none;
}
.captcha-container.show {
	display: block;
}

/* ===== 响应式 ===== */
@media (max-width: 560px) {
	:root {
		--gutter: 16px;
	}
	.nav-inner {
		padding: 12px var(--gutter);
	}
	.brand-logo {
		width: 28px;
		height: 28px;
		font-size: 14px;
	}
	.brand-name {
		font-size: 16px;
	}
	.nav-back {
		padding: 6px 10px;
		font-size: 12.5px;
	}
	.auth-main {
		padding: 32px var(--gutter) 30px;
	}
	.auth-title {
		font-size: 24px;
	}
	.auth-sub {
		font-size: 14px;
	}
	.auth-card {
		padding: 24px 22px 22px;
	}
	.form-group input {
		padding: 10px 12px;
		font-size: 14px;
	}
	.btn-submit {
		padding: 11px 18px;
		font-size: 14px;
	}
}
