/**
 * 情缘模板 - 公共前台 / 登录注册页样式
 */
.qy-topbar-inner--wide {
	max-width: 1280px;
}

.qy-btn-sm {
	padding: 0 14px;
	min-height: 36px;
	font-size: 13px;
	line-height: 1;
}

.qy-btn-primary {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	padding: 0 16px;
	min-height: 36px;
	line-height: 1;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	color: #fff !important;
	background: var(--qy-primary);
	border: 1px solid var(--qy-primary);
	transition: background var(--qy-transition), box-shadow var(--qy-transition);
	text-decoration: none !important;
	box-sizing: border-box;
}

.qy-btn-primary:hover {
	background: var(--qy-primary-hover);
	border-color: var(--qy-primary-hover);
	color: #fff !important;
	box-shadow: 0 4px 12px rgba(59, 130, 246, 0.25);
}

body.qy-public-page {
	min-height: 100vh;
	display: flex;
	flex-direction: column;
}

body.qy-public-page .qy-page-wrap {
	flex: 1;
	width: 100%;
	max-width: 1280px;
}

.qy-guest-shell,
.qy-auth-shell {
	background: var(--qy-card);
	border-radius: var(--qy-radius);
	box-shadow: var(--qy-shadow);
	overflow: visible;
}

.qy-guest-shell .mg-panel-body {
	padding: 28px;
	min-height: 420px;
}

.qy-guest-shell .qy-guest-head + .mg-panel-body {
	padding-top: 0;
}

.mg-grid-side {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.qy-site-gonggao h5 {
	display: flex;
	align-items: center;
	gap: 6px;
}

.qy-site-gonggao h5 i {
	font-size: 16px;
	color: var(--qy-primary);
	line-height: 1;
}

.qy-site-gonggao-body {
	font-size: 13px;
	color: var(--qy-text-muted);
	line-height: 1.6;
	word-break: break-word;
}

.qy-site-gonggao-body p {
	margin: 0 0 8px;
	font-size: 13px;
	color: var(--qy-text-muted);
	line-height: 1.6;
}

.qy-site-gonggao-body p:last-child {
	margin-bottom: 0;
}

.qy-guest-head {
	padding: 28px 28px 16px;
	border-bottom: 1px solid #f3f4f6;
}

.qy-guest-head h1 {
	margin: 0 0 8px;
	font-size: 24px;
	font-weight: 700;
	color: var(--qy-text);
}

.qy-guest-head p {
	margin: 0;
	font-size: 14px;
	color: var(--qy-text-muted);
	line-height: 1.6;
}

/* ========== 前台内容区（顶部导航切换，无内部 Tab） ========== */
.qy-guest-section {
	width: 100%;
}

.mg-panel-body {
	padding: 28px;
	min-height: 420px;
}

.mg-form label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
}

.mg-form .mg-field {
	margin-bottom: 18px;
}

.mg-input,
.mg-select {
	width: 100%;
	height: 44px;
	padding: 0 14px;
	border: 1px solid var(--qy-border);
	border-radius: 10px;
	font-size: 14px;
	color: var(--qy-text);
	background: #fff;
	outline: none;
	transition: border-color var(--qy-transition), box-shadow var(--qy-transition);
}

.mg-input:focus,
.mg-select:focus {
	border-color: var(--qy-primary);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.mg-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 46px;
	border: none;
	border-radius: 10px;
	background: var(--qy-primary);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background var(--qy-transition), box-shadow var(--qy-transition), transform 0.15s;
}

.mg-btn:hover {
	background: var(--qy-primary-hover);
	box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25);
}

.mg-btn:active {
	transform: scale(0.98);
}

.mg-btn-inline {
	width: auto;
	padding: 0 24px;
}

.mg-btn-secondary {
	background: #f3f4f6;
	color: #4b5563;
	box-shadow: none;
}

.mg-btn-secondary:hover {
	background: #e5e7eb;
	box-shadow: none;
}

.mg-grid-2 {
	display: grid;
	grid-template-columns: 1.2fr 0.8fr;
	gap: 24px;
	align-items: start;
}

.mg-notice {
	padding: 24px;
	border-radius: var(--qy-radius-sm);
	background: #f9fafb;
	border: 1px solid var(--qy-border);
}

.mg-notice h3 {
	margin: 0 0 8px;
	font-size: 20px;
	color: var(--qy-primary);
	text-align: center;
}

.mg-notice .mg-notice-sub {
	text-align: center;
	color: var(--qy-text-muted);
	margin: 0 0 20px;
	font-size: 14px;
}

.mg-notice-body {
	font-size: 14px;
	line-height: 1.8;
	color: #374151;
}

.mg-tip {
	margin-top: 16px;
	padding: 12px 14px;
	border-radius: 10px;
	background: var(--qy-primary-soft);
	border: 1px solid #bfdbfe;
	color: #1d4ed8;
	font-size: 13px;
}

.mg-warn {
	padding: 14px 16px;
	border-radius: 10px;
	background: #fff7ed;
	border: 1px solid #fed7aa;
	color: #c2410c;
	font-size: 13px;
	line-height: 1.6;
	margin-bottom: 16px;
}

.mg-tip-box {
	padding: 18px 20px;
	border-radius: var(--qy-radius-sm);
	background: #f9fafb;
	border: 1px solid var(--qy-border);
}

.mg-tip-box h5 {
	margin: 0 0 10px;
	font-size: 14px;
	font-weight: 600;
	color: var(--qy-text);
}

.mg-tip-box p {
	margin: 0 0 8px;
	font-size: 13px;
	color: var(--qy-text-muted);
	line-height: 1.6;
}

.mg-tip-box p:last-child {
	margin-bottom: 0;
}

.qy-guest-shell .qy-guest-head + .mg-panel-body:has(.qy-guest-section--about) {
	padding: 0;
}

.qy-guest-section--about {
	display: flex;
	align-items: stretch;
	justify-content: stretch;
	width: 100%;
	min-height: 420px;
	padding: 0;
	box-sizing: border-box;
}

.qy-guest-section--about .mg-tip-box.qy-about-agreement {
	flex: 1;
	width: 100%;
	max-width: none;
	margin: 0;
	padding: 20px 56px 48px;
	min-height: 420px;
	box-sizing: border-box;
	display: flex;
	flex-direction: column;
	justify-content: flex-start;
	background: #fff;
	border: none;
	border-radius: 0 0 var(--qy-radius) var(--qy-radius);
}

.qy-guest-section--about .qy-about-agreement h5 {
	margin: 0 0 16px;
	font-size: 18px;
	font-weight: 600;
	color: var(--qy-text);
	text-align: center;
}

.qy-guest-section--about .qy-about-agreement p {
	margin: 0 0 14px;
	font-size: 14px;
	line-height: 1.85;
	color: #374151;
}

.qy-guest-section--about .qy-about-agreement p:last-child {
	margin-bottom: 0;
	text-align: center;
}

.qy-guest-section--about .qy-about-agreement a {
	color: var(--qy-primary);
	font-weight: 500;
}

.mg-form-narrow {
	max-width: 520px;
	margin: 0 auto;
}

.mg-subtabs {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 16px;
	border-bottom: 1px solid var(--qy-border);
	padding-bottom: 12px;
}

.mg-subtab {
	padding: 6px 14px;
	border-radius: 999px;
	font-size: 12px;
	background: #f3f4f6;
	color: var(--qy-text-muted);
	cursor: pointer;
	border: none;
	transition: all var(--qy-transition);
}

.mg-subtab.is-active {
	background: var(--qy-primary-soft);
	color: var(--qy-primary);
	font-weight: 600;
}

.mg-subpanel {
	display: none;
	font-size: 14px;
	line-height: 1.8;
	color: #374151;
}

.mg-subpanel.is-active {
	display: block;
}

.mg-input-group {
	display: flex;
	gap: 10px;
}

.mg-input-group .mg-input {
	flex: 1;
}

/* ========== 登录 / 注册 / 找回密码 ========== */
body.qy-auth-page .qy-page-wrap {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	flex: 1;
	width: 100%;
	max-width: 1280px;
	margin: 0 auto;
	padding: 24px;
	min-height: 0;
}

.qy-auth-card {
	width: 100%;
	max-width: 460px;
	margin: 0 auto;
	padding: 32px 32px 28px;
}

.qy-auth-card .qy-page-header {
	margin-bottom: 24px;
	text-align: center;
}

.qy-auth-card .qy-page-header h1 {
	font-size: 24px;
}

.qy-auth-field {
	margin-bottom: 18px;
}

.qy-auth-field label {
	display: block;
	margin-bottom: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
}

.qy-auth-input-wrap {
	position: relative;
}

.qy-auth-input-wrap .qy-auth-ico {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	color: #9ca3af;
	pointer-events: none;
}

.qy-auth-input-wrap .qy-auth-ico svg {
	width: 18px;
	height: 18px;
	display: block;
}

.qy-auth-input {
	width: 100%;
	height: 44px;
	padding: 0 14px 0 42px;
	border: 1px solid var(--qy-border);
	border-radius: 10px;
	font-size: 14px;
	color: var(--qy-text);
	background: #fff;
	outline: none;
	transition: border-color var(--qy-transition), box-shadow var(--qy-transition);
}

.qy-auth-input--plain {
	padding-left: 14px;
}

.qy-auth-input:focus {
	border-color: var(--qy-primary);
	box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.12);
}

.qy-auth-captcha {
	display: flex;
	gap: 10px;
	align-items: center;
}

.qy-auth-captcha .qy-auth-input {
	flex: 1;
}

.qy-auth-captcha img {
	height: 44px;
	border-radius: 10px;
	border: 1px solid var(--qy-border);
	cursor: pointer;
}

.qy-auth-btn {
	display: block;
	width: 100%;
	height: 46px;
	margin-top: 8px;
	border: none;
	border-radius: 10px;
	background: var(--qy-primary);
	color: #fff;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background var(--qy-transition), box-shadow var(--qy-transition), transform 0.15s;
}

.qy-auth-btn:hover {
	background: var(--qy-primary-hover);
	box-shadow: 0 6px 16px rgba(59, 130, 246, 0.25);
}

.qy-auth-btn:active {
	transform: scale(0.98);
}

.qy-auth-btn--inline {
	width: auto;
	min-width: 120px;
	margin: 0;
	height: 44px;
	padding: 0 16px;
	font-size: 13px;
}

.qy-auth-links {
	display: flex;
	justify-content: space-between;
	margin-top: 20px;
	font-size: 13px;
	flex-wrap: wrap;
	gap: 8px;
}

.qy-auth-links a,
.qy-auth-back a {
	color: var(--qy-primary);
	text-decoration: none;
}

.qy-auth-links a:hover,
.qy-auth-back a:hover {
	color: var(--qy-primary-hover);
}

.qy-auth-oauth {
	margin-top: 22px;
	padding-top: 18px;
	border-top: 1px solid #f0f0f0;
	text-align: center;
}

.qy-auth-oauth-title {
	margin: 0 0 12px;
	font-size: 12px;
	color: #909399;
}

.qy-auth-oauth-list {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 10px;
	flex-wrap: wrap;
}

.qy-auth-oauth-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 38px;
	height: 38px;
	border-radius: 4px;
	background: #f5f5f5;
	border: 1px solid #ebebeb;
	text-decoration: none;
	transition: background 0.2s ease, border-color 0.2s ease;
}

.qy-auth-oauth-btn:hover {
	background: #ececec;
	border-color: #e0e0e0;
	text-decoration: none;
}

.qy-auth-oauth-btn i {
	font-size: 20px;
	line-height: 1;
	color: #5a5e66;
}

.qy-auth-oauth-char {
	display: block;
	font-size: 16px;
	font-weight: 600;
	line-height: 1;
	color: #5a5e66;
	font-family: "Microsoft YaHei", "PingFang SC", sans-serif;
}

.qy-auth-back {
	margin-top: 18px;
	text-align: center;
	font-size: 13px;
}

#embed-captcha {
	margin-bottom: 12px;
}

@media (max-width: 1024px) {
	.qy-topbar-right .qy-btn-outline span,
	.qy-topbar-right .qy-btn-primary span {
		display: none;
	}

	.qy-topbar-inner--wide {
		position: relative;
	}
}

@media (max-width: 900px) {
	.mg-grid-2 {
		grid-template-columns: 1fr;
	}

	.mg-panel-body,
	.qy-guest-head {
		padding-left: 20px;
		padding-right: 20px;
	}

	.qy-guest-section--about .mg-tip-box.qy-about-agreement {
		padding: 16px 24px 32px;
		min-height: 360px;
	}

	.qy-auth-card {
		padding: 24px 20px;
	}
}

@media (max-width: 640px) {
	.qy-topbar-right .qy-btn-outline {
		display: none;
	}
}
