/* =========================================================
   客户区登录/注册页样式层（login.css）
   作用页：login.tpl、register.tpl（ca08 起共用同一卡片结构）
   依赖：tokens.css（head.tpl 全局引入）+ Skote app.min.css
   约束：docs/theme-workflow-spec.md §3——色值/圆角/阴影一律 token；
   表单 name/id 与 JS 钩子（encryptPass/phoneCheck/getCode/
   loginBefore/beforeSubmit/#secondVerifyModal）对应的标记均未改动
   ========================================================= */

/* ---------- 全屏舞台：背景配图 + 居中卡片 ---------- */
.auth-stage {
	position: relative;
	display: flex;
	flex-direction: column;
	align-items: center;
	min-height: 100vh;
	padding: 48px 20px;
	/* 背景配图加载失败时的兜底底色 */
	background: var(--brand-gradient);
}

/* 背景配图层：铺满舞台；后台自定义图（custom_login_background_img）在模板内联覆盖 */
.auth-stage-bg {
	position: absolute;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;
	background: url(/themes/clientarea/default/assets_custom/img/new-background.jpg) center no-repeat;
	background-size: cover;
}

/* 内容列：margin:auto 垂直居中——内容超过一屏时自动不裁切顶部、可正常滚动 */
.auth-stage-inner {
	position: relative;
	z-index: 1;
	margin: auto;
	width: 100%;
	max-width: 560px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
}

/* 后台自定义的登录页头/尾 HTML（login_header / login_footer） */
.auth-setting-block {
	width: 100%;
	padding: 14px 24px;
	color: var(--text-inverse);
	opacity: .78;
	font-size: 13px;
	text-align: center;
}

/* 自定义标语（custom_login_background_char / _description；未配置时模板不渲染） */
.auth-stage-hero {
	max-width: 560px;
	text-align: center;
}

.auth-stage-title {
	margin-bottom: 8px;
	color: var(--text-inverse);
	font-size: 26px;
	font-weight: 600;
	line-height: 1.35;
}

.auth-stage-desc {
	margin-bottom: 0;
	color: var(--text-inverse);
	opacity: .78;
	font-size: 15px;
	line-height: 1.7;
}

/* ---------- 卡片 ---------- */
.auth-card {
	position: relative;
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: 440px;
	padding: 30px 30px 0;
	background: var(--bg-card);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-pop);
	/* 两页等高（反馈 ca09）：实测注册页自然高 651/638，登录页 482/469，统一到 656/640；
	   余量由底部引导 .auth-register（margin-top:auto）兜底成页脚带，切换无跳变 */
	min-height: 656px;
}

/* 右上角切换钮：贴卡片右上角；上/右圆角与卡片圆角对齐 */
.auth-card-switch {
	position: absolute;
	top: 0;
	right: 0;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 7px;
	height: 44px;
	padding: 0 16px;
	background: var(--brand-gradient);
	color: var(--text-inverse);
	font-size: 14px;
	font-weight: 600;
	letter-spacing: .02em;
	border-radius: 0 var(--radius-lg) 0 var(--radius-md);
	transition: filter .15s ease, box-shadow .15s ease;
}

.auth-card-switch:hover {
	color: var(--text-inverse);
	filter: brightness(1.08);
	text-decoration: none;
	box-shadow: 0 4px 12px rgba(var(--brand-primary-rgb), .28);
}

.auth-card-switch:focus,
.auth-card-switch:focus-visible {
	color: var(--text-inverse);
	text-decoration: none;
	outline: 0;
	box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), .3);
}

/* 切换钮线性图标：弧线双箭头（圆头描边），悬停反向旋转半圈 */
.auth-switch-icon {
	width: 17px;
	height: 17px;
	flex: 0 0 auto;
	transition: transform .4s ease;
}

.auth-card-switch:hover .auth-switch-icon {
	transform: rotate(-180deg);
}

.auth-switch-text {
	line-height: 1;
}

/* ---------- 品牌区 ---------- */
.auth-brand {
	margin-bottom: 14px;
}

.auth-brand img {
	height: 38px;
}

/* ---------- 登录方式切换 Tabs ---------- */
.auth-panel .auth-tabs {
	border-bottom: 1px solid var(--line-1);
}

.auth-panel .auth-tabs .nav-link {
	padding: 10px 8px;
	border: 0;
	border-bottom: 2px solid transparent;
	border-radius: 0;
	background: transparent;
	color: var(--text-3);
	font-size: 14px;
	font-weight: 500;
	transition: color .15s ease, border-color .15s ease;
}

.auth-panel .auth-tabs .nav-link:hover {
	color: var(--text-1);
	background: transparent;
	border-color: transparent;
}

.auth-panel .auth-tabs .nav-link.active {
	color: var(--brand-primary);
	background: transparent;
	border: 0;
	border-bottom: 2px solid var(--brand-primary);
}

/* ---------- 表单：文字选框与描述边框 ---------- */
.auth-panel .form-group {
	margin-bottom: 12px;
}

.auth-panel .form-group label {
	display: block;
	margin-bottom: 6px;
	color: var(--text-2);
	font-size: 14px;
	font-weight: 500;
}

.auth-panel .form-control {
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--line-1);
	border-radius: var(--radius-md);
	background: var(--bg-card);
	color: var(--text-1);
	font-size: 14px;
	box-shadow: none;
	transition: border-color .15s ease, box-shadow .15s ease;
}

.auth-panel .form-control::placeholder {
	color: var(--text-3);
}

.auth-panel .form-control:hover {
	border-color: rgba(var(--brand-primary-rgb), .45);
}

.auth-panel .form-control:focus {
	border-color: var(--brand-primary);
	box-shadow: 0 0 0 3px rgba(var(--brand-primary-rgb), .14);
}

/* 注册页自定义多行文本框：不锁 46px 高 */
.auth-panel textarea.form-control {
	height: auto;
	min-height: 96px;
	padding: 10px 14px;
	line-height: 1.6;
}

/* 勾选项（隐私协议 / 自定义 tickbox 字段） */
.auth-panel input[type="checkbox"],
.auth-panel input[type="radio"] {
	accent-color: var(--brand-primary);
}

/* 表单校验提示（框架加 .is-invalid 时才显示） */
.auth-panel .invalid-feedback {
	margin-top: 6px;
	color: var(--danger);
	font-size: 12px;
}

/* 手机区号选择（input-group-prepend 内的下拉） */
.auth-panel .input-group-prepend {
	width: 100px;
}

.auth-panel .input-group-prepend .form-control {
	height: 44px;
	padding: 0 10px;
	border-radius: var(--radius-md) 0 0 var(--radius-md);
}

/* 图形验证码 / 短信验证码的附加块 */
.auth-panel .input-group-append {
	height: 44px;
}

.auth-panel .input-group-append .btn {
	height: 100%;
	padding: 0 16px;
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
	white-space: nowrap;
}

.auth-panel .input-group-append img {
	height: 44px;
	border: 1px solid var(--line-1);
	border-left: 0;
	border-radius: 0 var(--radius-md) var(--radius-md) 0;
}

/* 密码/验证码登录切换链接 */
.auth-panel .auth-switch-link {
	font-size: 13px;
}

/* 提交按钮：品牌渐变 */
.auth-panel .auth-submit {
	height: 44px;
	border: 0;
	border-radius: var(--radius-md);
	background: var(--brand-gradient);
	color: var(--text-inverse);
	font-size: 15px;
	font-weight: 500;
	transition: box-shadow .15s ease, filter .15s ease;
}

.auth-panel .auth-submit:hover,
.auth-panel .auth-submit:focus,
.auth-panel .auth-submit:active {
	background: var(--brand-gradient);
	border-color: transparent;
	color: var(--text-inverse);
	box-shadow: 0 6px 16px rgba(var(--brand-primary-rgb), .32);
}

/* 卡片内文字链统一品牌蓝（框架 .text-primary 可能残留旧值） */
.auth-panel .text-primary {
	color: var(--brand-primary);
}

.auth-panel .text-primary:hover {
	color: var(--brand-primary-dark);
}

/* 短信验证码分组初始隐藏（phoneCheck() 负责切换，勿删） */
.auth-panel .allow_login_code_captcha {
	display: none;
}

/* ---------- 第三方登录 ---------- */
.auth-oauth .auth-oauth-title {
	display: flex;
	align-items: center;
	gap: 16px;
	color: var(--text-3);
	font-size: 13px;
	font-weight: 400;
}

.auth-oauth .auth-oauth-title::before,
.auth-oauth .auth-oauth-title::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--line-1);
}

.auth-oauth .list-inline {
	margin-bottom: 0;
}

.auth-oauth .list-inline-item {
	margin-bottom: 0;
	vertical-align: middle;
}

.auth-oauth .list-inline-item .icon {
	width: 2rem;
	height: 2rem;
}

.auth-oauth .social-list-item {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 1px solid var(--line-1);
	border-radius: 50%;
	background: var(--bg-card);
	transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}

.auth-oauth .social-list-item:hover {
	border-color: rgba(var(--brand-primary-rgb), .4);
	box-shadow: var(--shadow-card);
	transform: translateY(-2px);
	text-decoration: none;
}

.auth-oauth .social-list-item img {
	width: 26px;
	height: 26px;
	object-fit: contain;
}

/* ---------- 注册引导 / 隐私勾选 ---------- */
/* 间距收紧：bootstrap 间距工具类为 !important（mt-3/4/5 = 16/24/48px），卡片内压小——
   按 SOP §3.1-4 登记 !important 反制（仅限 .auth-card 作用域内 4 条） */
.auth-card .mt-3 {
	margin-top: 12px !important;
}

.auth-card .mt-4 {
	margin-top: 12px !important;
}

.auth-card .mt-5 {
	margin-top: 14px !important;
}

/* 底部引导做通栏页脚带：min-height 撑出的余量集中落在这里（内容区顶部对齐、
   页脚贴底），登录↔注册切换不产生跳变观感；带底色+分割线读作有意的页脚。
   margin-top:auto 亦需反制 .mt-5 的 !important */
.auth-card .auth-register {
	margin-top: auto !important;
	margin-right: -30px;
	margin-bottom: 0;
	margin-left: -30px;
	padding: 13px 30px 24px;
	border-top: 1px solid var(--line-1);
	border-radius: 0 0 var(--radius-lg) var(--radius-lg);
	background: var(--bg-page);
}

.auth-register p {
	margin-bottom: 0;
	color: var(--text-2);
	font-size: 14px;
}

.auth-register a {
	font-weight: 600;
}

.auth-privacy {
	color: var(--text-2);
	font-size: 13px;
	line-height: 1.7;
	text-align: center;
}

.auth-privacy p {
	margin-bottom: 0;
}

.auth-privacy a {
	font-weight: 500;
}

/* ---------- 二次验证弹窗（轻打磨，结构未动） ---------- */
#secondVerifyModal .modal-content {
	border: 0;
	border-radius: var(--radius-lg);
}

#secondVerifyModal .modal-header {
	border-bottom: 1px solid var(--line-1);
}

#secondVerifyModal .modal-footer {
	border-top: 1px solid var(--line-1);
}

/* ---------- 响应式 ---------- */
@media (max-width: 767.98px) {
	.auth-stage {
		padding: 32px 16px;
	}

	.auth-card {
		padding: 26px 18px 0;
		min-height: 640px;
	}

	.auth-card .auth-register {
		margin-top: auto !important;
		margin-right: -18px;
		margin-bottom: 0;
		margin-left: -18px;
		padding: 12px 18px 20px;
	}

	.auth-brand {
		margin-bottom: 12px;
	}

	.auth-brand img {
		height: 30px;
	}

	.auth-card-switch {
		height: 40px;
		padding: 0 13px;
		gap: 6px;
		font-size: 13px;
	}

	.auth-switch-icon {
		width: 16px;
		height: 16px;
	}

	.auth-panel .auth-tabs .nav-link {
		padding: 9px 4px;
	}

	.auth-stage-title {
		font-size: 22px;
	}
}

@media (max-width: 359.98px) {
	.auth-brand img {
		height: 26px;
	}

	.auth-card-switch {
		padding: 0 10px;
	}
}
