/*
 * 登录 / 注册（2026 改版）：左侧品牌区 + 右侧表单卡片；手机端品牌区收为顶部横带
 * 字体：思源黑体（Noto Sans SC，SIL OFL 1.1，本地托管于 lib/noto_sans_sc）
 * JS 钩子：输入框的父元素会被加上 .has-error（home/index.js），#send_phone_sms 倒计时，#login_error_msg 提示
 */
body.m-auth-page {
	background: #F4F5F7;
}
.m-auth {
	--auth-accent: #D9480F;
	--auth-accent-hover: #C2410C;
	--auth-accent-text: #C2410C;
	--auth-ink: #1F2329;
	--auth-muted: #5B6270;
	--auth-line: #D1D5DB;
	--auth-error: #B42318;
	font-family: "Noto Sans SC Variable", "PingFang SC", "Microsoft YaHei", sans-serif;
	color: var(--auth-ink);
	font-size: 14px;
	min-height: calc(100vh - 64px - 90px);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 24px;
}
.m-auth-card {
	width: 100%;
	max-width: 980px;
	display: flex;
	flex-wrap: wrap;
	background: #FFFFFF;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 24px 60px rgba(17, 24, 39, .10);
}

/* 品牌区 */
.m-auth-brand {
	flex: 1 1 380px;
	min-width: 0;
	position: relative;
	overflow: hidden;
	background: linear-gradient(150deg, #1E78C2 0%, #1769AA 45%, #0F4C81 100%);
	color: #FFFFFF;
	padding: 48px 44px;
	display: flex;
	flex-direction: column;
	gap: 28px;
}
.m-auth-brand::before {
	content: "";
	position: absolute;
	right: -90px;
	bottom: -90px;
	width: 280px;
	height: 280px;
	border-radius: 50%;
	background: rgba(255, 255, 255, .10);
	opacity: 1;
}
.m-auth-brand::after {
	content: "";
	position: absolute;
	right: 120px;
	bottom: 120px;
	width: 70px;
	height: 70px;
	border-radius: 50%;
	border: 10px solid rgba(255, 255, 255, .14);
}
.m-auth-brand > * {
	position: relative;
	z-index: 1;
}
.m-auth-brand h1 {
	margin: 0 0 12px;
	font-size: 32px;
	font-weight: 900;
	line-height: 1.3;
	color: #FFFFFF;
}
.m-auth-brand p {
	margin: 0;
	color: #D6E6F5;
	font-size: 15px;
	line-height: 1.7;
}
.m-auth-points {
	margin: 0;
	padding: 0;
	list-style: none;
	display: flex;
	flex-direction: column;
	gap: 16px;
	font-size: 15px;
}
.m-auth-points li {
	display: flex;
	align-items: center;
	gap: 12px;
}
.m-auth-point-ico {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	border-radius: 8px;
	background: rgba(255, 255, 255, .16);
	color: #FFFFFF;
	display: flex;
	align-items: center;
	justify-content: center;
}
.m-auth-step {
	width: 32px;
	height: 32px;
	flex-shrink: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, .16);
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
}
.m-auth-points li:first-child .m-auth-step {
	background: var(--auth-accent);
}

/* 表单区 */
.m-auth-main {
	flex: 1 1 420px;
	min-width: 0;
	padding: 48px 44px;
	display: flex;
	flex-direction: column;
	gap: 24px;
}
.m-auth-main h2 {
	margin: 0 0 6px;
	font-size: 26px;
	font-weight: 700;
	color: var(--auth-ink);
}
.m-auth-switch {
	margin: 0;
	color: var(--auth-muted);
}
.m-auth-switch a {
	color: var(--auth-accent-text);
	font-weight: 700;
}

/* 登录方式切换（BS5 tab） */
.m-auth-tabs {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 0;
	padding: 4px;
	border: 0;
	border-radius: 10px;
	background: #F3F4F6;
}
.m-auth-tabs .nav-item {
	display: flex;
}
.m-auth-tabs .nav-link {
	flex: 1;
	height: 42px;
	border: 0;
	border-radius: 8px;
	background: transparent;
	color: var(--auth-muted);
	font-size: 15px;
	font-weight: 500;
	display: flex;
	align-items: center;
	justify-content: center;
}
.m-auth-tabs .nav-link:hover {
	color: var(--auth-ink);
}
.m-auth-tabs .nav-link.active {
	background: #FFFFFF;
	color: var(--auth-ink);
	font-weight: 700;
	box-shadow: 0 1px 4px rgba(0, 0, 0, .08);
}

.m-auth-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}
.m-auth-field {
	display: flex;
	flex-direction: column;
	gap: 6px;
}
.m-auth-field > label {
	margin: 0;
	font-weight: 500;
	color: var(--auth-ink);
}
.m-auth-pair {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 12px;
}
/* 输入框（父元素 .m-auth-control / .m-auth-inline 会被 JS 加 .has-error） */
.m-auth-inline {
	display: flex;
	gap: 10px;
}
.m-auth input.form-control {
	height: 48px;
	border: 1px solid var(--auth-line);
	border-radius: 10px;
	padding: 0 14px;
	font-size: 15px;
	font-family: inherit;
	box-shadow: none;
}
.m-auth-inline input.form-control {
	flex: 1;
	min-width: 0;
}
.m-auth input.form-control:focus {
	border-color: var(--auth-accent);
	box-shadow: 0 0 0 3px rgba(217, 72, 15, .15);
}
.m-auth .has-error input.form-control {
	border-color: var(--auth-error);
	box-shadow: 0 0 0 3px rgba(180, 35, 24, .12);
}
.m-auth .u-vercode {
	width: 128px;
	height: 48px;
	flex-shrink: 0;
	border: 1px solid #E5E7EB;
	border-radius: 10px;
	background: #F3F8FD;
	object-fit: cover;
	cursor: pointer;
}
.m-auth-sms {
	width: 128px;
	height: 48px;
	flex-shrink: 0;
	border: 1px solid var(--auth-accent);
	border-radius: 10px;
	background: #FFFFFF;
	color: var(--auth-accent-text);
	font-size: 14px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
	white-space: nowrap;
	padding: 0 8px;
	text-align: center;
}
/* 覆盖 index.css 旧的 #reg_form/#login_vercode_panel #send_phone_sms 大内边距 */
#reg_form #send_phone_sms.m-auth-sms,
#login_vercode_panel #send_phone_sms.m-auth-sms {
	padding: 0 8px;
}
.m-auth-sms:hover {
	background: #FFF7F2;
}
.m-auth-sms:disabled,
.m-auth-sms.disabled {
	border-color: var(--auth-line);
	color: #6B7280;
	background: #F9FAFB;
	cursor: not-allowed;
}
.m-auth-submit {
	height: 50px;
	margin-top: 6px;
	border: 0;
	border-radius: 10px;
	background: var(--auth-accent);
	color: #FFFFFF;
	font-size: 17px;
	font-weight: 700;
	font-family: inherit;
	cursor: pointer;
}
.m-auth-submit:hover {
	background: var(--auth-accent-hover);
}
.m-auth-submit:focus-visible,
.m-auth-sms:focus-visible {
	outline: 3px solid rgba(217, 72, 15, .35);
	outline-offset: 2px;
}
/* 提示信息（home/index.js showMsg） */
.m-auth-msg:empty {
	display: none;
}
.m-auth-msg {
	font-size: 13px;
}
.m-auth-msg p {
	margin: 0;
	padding: 10px 12px;
	border-radius: 8px;
}
.m-auth-msg .text-danger {
	background: #FEF3F2;
	color: var(--auth-error) !important;
}
.m-auth-msg .text-success {
	background: #ECFDF3;
	color: #067647 !important;
}

/* ===== 手机 ===== */
@media (max-width: 767.98px) {
	.m-auth {
		display: block;
		padding: 0;
		min-height: 0;
	}
	.m-auth-card {
		display: block;
		border-radius: 0;
		box-shadow: none;
		background: transparent;
	}
	.m-auth-brand {
		padding: 24px 20px 36px;
		gap: 0;
	}
	.m-auth-brand::before {
		right: -60px;
		bottom: -70px;
		width: 180px;
		height: 180px;
	}
	.m-auth-brand::after,
	.m-auth-points {
		display: none;
	}
	.m-auth-brand h1 {
		font-size: 24px;
		margin-bottom: 6px;
	}
	.m-auth-brand h1 br {
		display: none;
	}
	.m-auth-brand p {
		font-size: 13px;
	}
	.m-auth-main {
		position: relative;
		margin-top: -14px;
		padding: 24px 20px 32px;
		border-radius: 16px 16px 0 0;
		background: #FFFFFF;
		gap: 18px;
	}
	.m-auth-main h2 {
		font-size: 22px;
	}
	/* 16px 字号避免 iOS 聚焦时自动放大 */
	.m-auth input.form-control {
		font-size: 16px;
	}
	.m-auth .u-vercode,
	.m-auth-sms {
		width: 112px;
	}
	.m-auth-pair {
		grid-template-columns: minmax(0, 1fr);
		gap: 16px;
	}
}
