/*!
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 * No deletion without permission, or be held responsible to law.
 * @author ThinkGem
 * @version 2019-2-16
 */

/* ========== Teal/Cyan 主题 - 卡片式分屏布局 ========== */
.login-page {
	background: #f0f2f5;
	min-height: 100vh;
	position: relative;
	overflow: hidden;
	margin: 0;
	padding: 0;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* 容器布局 - 居中卡片 */
.login-container {
	display: flex;
	width: 900px;
	max-width: 95%;
	min-height: 520px;
	background: #fff;
	border-radius: 20px;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.12), 0 8px 20px rgba(0, 0, 0, 0.06);
	overflow: hidden;
	position: relative;
}

/* ========== 左侧登录面板 ========== */
.login-left-panel {
	flex: 0 0 55%;
	max-width: 55%;
	background: #ffffff;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 48px 50px;
	position: relative;
	overflow-y: auto;
}

.login-left-inner {
	width: 100%;
	max-width: 360px;
}

/* 品牌标识 */
.login-brand {
	display: flex;
	align-items: center;
	margin-bottom: 36px;
}

.login-brand .brand-icon {
	width: 38px;
	height: 38px;
	background: linear-gradient(135deg, #66b1ff 0%, #409eff 100%);
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	color: #fff;
	margin-right: 12px;
	box-shadow: 0 4px 12px rgba(64, 158, 255, 0.3);
}

.login-brand .brand-icon svg {
	width: 20px;
	height: 20px;
}

.login-brand .brand-name {
	font-size: 16px;
	font-weight: 700;
	color: #1F2937;
	letter-spacing: 0.5px;
}

/* 表单区域 */
.login-form-wrapper {
	width: 100%;
}

.login-title {
	font-size: 28px;
	font-weight: 700;
	color: #1F2937;
	margin: 0 0 24px 0;
	line-height: 1.2;
}

.login-box-msg {
	text-align: center;
	padding: 0 0 10px 0;
	margin: 0 0 18px 0;
	font-size: 14px;
	color: #409eff;
	font-weight: 500;
	border-bottom: 1px dashed #ecf5ff;
	padding-bottom: 14px;
}

/* 表单字段 */
.login-page .form-group {
	margin-top: 0;
	margin-bottom: 16px;
	position: relative;
}

/* 使用原始 Jeesite 结构的图标定位 */
.login-page .has-feedback .form-control-feedback {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 16px;
	color: #9CA3AF;
	pointer-events: auto;
	z-index: 2;
	width: auto;
	height: auto;
	line-height: 1;
	display: inline-block;
}

.login-page .has-feedback .form-control-feedback.icon-user,
.login-page .has-feedback .form-control-feedback.icon-lock {
	left: 16px;
	right: auto;
	top: 50%;
	transform: translateY(-50%);
}

.login-page .has-feedback .form-control {
	height: 46px;
	padding: 10px 16px 10px 46px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	font-size: 14px;
	transition: all 0.25s ease;
	background: #f9fafb;
	box-sizing: border-box;
	width: 100%;
}

.login-page .has-feedback .form-control:hover {
	border-color: #66b1ff;
	background: #fff;
}

.login-page .has-feedback .form-control:focus {
	border-color: #409eff;
	box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.15);
	background: #fff;
	outline: none;
}

/* 表单选项行 - 记住账号 + 忘记密码 */
.form-options-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: 4px;
	margin-bottom: 20px;
	flex-wrap: nowrap;
}

.login-page .icheck {
	min-height: 20px;
	display: flex;
	align-items: center;
}

.login-page .icheck label {
	color: #6B7280;
	font-size: 13px;
	cursor: pointer;
	padding-left: 4px;
	user-select: none;
	transition: color 0.2s ease;
}

.login-page .icheck label:hover {
	color: #409eff;
}

.login-page .icheck input[type="checkbox"] {
	accent-color: #409eff;
	cursor: pointer;
	width: 15px;
	height: 15px;
	vertical-align: middle;
	margin-right: 5px;
}

.forgot-link {
	color: #409eff;
	font-size: 13px;
	text-decoration: none;
	transition: color 0.2s ease;
	white-space: nowrap;
}

.forgot-link:hover {
	color: #337ecc;
	text-decoration: underline;
}

/* 登录按钮 */
.login-page .btn {
	padding: 12px 16px;
	font-size: 15px;
	letter-spacing: 1px;
	border-radius: 8px;
	font-weight: 600;
	transition: all 0.3s ease;
}

.login-page .btn-primary.login-btn {
	background: linear-gradient(135deg, #66b1ff 0%, #409eff 100%) !important;
	border: none !important;
	color: #fff;
	box-shadow:
		0 4px 14px rgba(64, 158, 255, 0.35),
		0 2px 4px rgba(64, 158, 255, 0.2);
	position: relative;
	overflow: hidden;
	height: 48px;
	line-height: 1.4;
}

.login-page .btn-primary.login-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.25), transparent);
	transition: left 0.5s ease;
}

.login-page .btn-primary.login-btn:hover {
	background: linear-gradient(135deg, #409eff 0%, #337ecc 100%) !important;
	box-shadow:
		0 6px 20px rgba(64, 158, 255, 0.45),
		0 3px 8px rgba(64, 158, 255, 0.25);
	transform: translateY(-2px);
}

.login-page .btn-primary.login-btn:hover::before {
	left: 100%;
}

.login-page .btn-primary.login-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 10px rgba(64, 158, 255, 0.35);
}

/* 验证码输入 */
.login-page .input-group .form-control {
	height: 46px;
	padding: 10px 16px;
	border: 1px solid #e5e7eb;
	border-radius: 8px 0 0 8px;
	font-size: 14px;
	background: #f9fafb;
	transition: all 0.25s ease;
}

.login-page .input-group .form-control:focus {
	border-color: #409eff;
	box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.15);
	background: #fff;
	z-index: 2;
	outline: none;
}

.login-page .input-group-btn .btn {
	height: 46px;
	background: #ecf5ff;
	border: 1px solid #b3d8ff;
	border-left: none;
	color: #337ecc;
	font-weight: 500;
	border-radius: 0 8px 8px 0;
	transition: all 0.25s ease;
	padding: 0 16px;
}

.login-page .input-group-btn .btn:hover {
	background: #409eff;
	color: #fff;
	border-color: #409eff;
}

/* Select2 租户选择 */
.login-page .select2-container .select2-selection--single {
	padding: 10px 16px;
	height: 46px;
	border: 1px solid #e5e7eb;
	border-radius: 8px;
	background: #f9fafb;
	transition: all 0.25s ease;
}

.login-page .select2-container .select2-selection--single:hover {
	border-color: #66b1ff;
	background: #fff;
}

.login-page .select2-container--default.select2-container--focus .select2-selection--single {
	border-color: #409eff;
	box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.15);
	background: #fff;
}

.login-page .select2-container .select2-selection--single .select2-selection__rendered {
	margin-top: 4px;
	line-height: 32px;
	color: #374151;
}

.login-page .select2-container .select2-selection--single .select2-selection__arrow {
	top: 11px;
	right: 12px;
}

.login-page .select2-container .select2-selection--single .select2-selection__arrow b {
	border-color: #9CA3AF transparent transparent transparent;
}

.login-page .select2-container--open .select2-selection--single .select2-selection__arrow b {
	border-color: transparent transparent #409eff transparent;
}

.login-page .select2-search--dropdown .select2-search__field {
	padding: 8px;
	border-radius: 8px;
	border: 1px solid #e5e7eb;
}

.login-page .select2-search--dropdown .select2-search__field:focus {
	border-color: #409eff;
	outline: none;
	box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.15);
}

.login-page .select2-results__option {
	padding: 8px 12px;
	transition: background 0.15s ease;
}

.login-page .select2-results__option--highlighted[aria-selected] {
	background: #ecf5ff;
	color: #2c5cc5;
}

.login-page .select2-results__option[aria-selected=true] {
	background: #409eff;
	color: #fff;
}

/* ========== 右侧装饰面板 ========== */
.login-right-panel {
	flex: 0 0 45%;
	max-width: 45%;
	position: relative;
	background: linear-gradient(135deg, #66b1ff 0%, #409eff 30%, #5c8dff 65%, #337ecc 100%);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	overflow: hidden;
}

.right-gradient-bg {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background:
		radial-gradient(circle at 25% 25%, rgba(255, 255, 255, 0.25) 0%, transparent 45%),
		radial-gradient(circle at 75% 75%, rgba(255, 255, 255, 0.15) 0%, transparent 40%);
	pointer-events: none;
}

.decoration-content {
	position: relative;
	z-index: 5;
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px;
}

/* 右侧标语 */
.right-slogan {
	text-align: center;
	color: #fff;
	z-index: 6;
	width: 100%;
}

.right-slogan h2 {
	font-size: 32px;
	font-weight: 700;
	margin: 0 0 12px 0;
	text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.right-slogan p {
	font-size: 15px;
	color: rgba(255, 255, 255, 0.9);
	margin: 0 0 28px 0;
	line-height: 1.6;
	padding: 0 10px;
}

/* 注册按钮 - 圆角描边样式 */
.btn-outline.register-btn {
	display: inline-block;
	padding: 12px 44px;
	font-size: 14px;
	font-weight: 600;
	color: #fff;
	background: transparent;
	border: 2px solid rgba(255, 255, 255, 0.8);
	border-radius: 30px;
	text-decoration: none;
	letter-spacing: 2px;
	transition: all 0.3s ease;
	cursor: pointer;
}

.btn-outline.register-btn:hover {
	background: #fff;
	color: #337ecc;
	border-color: #fff;
	transform: translateY(-2px);
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

/* 装饰性光晕 */
.login-right-panel::before {
	content: '';
	position: absolute;
	top: 8%;
	left: 8%;
	width: 180px;
	height: 180px;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.2) 0%, transparent 70%);
	border-radius: 50%;
	pointer-events: none;
}

.login-right-panel::after {
	content: '';
	position: absolute;
	bottom: 10%;
	right: 8%;
	width: 120px;
	height: 120px;
	background: radial-gradient(circle, rgba(255, 255, 255, 0.12) 0%, transparent 70%);
	border-radius: 50%;
	pointer-events: none;
}

/* 版权信息 */
.login-copyright {
	text-align: center;
	position: absolute;
	bottom: 16px;
	left: 50%;
	transform: translateX(-50%);
	z-index: 10;
}

.login-copyright,
.login-copyright a {
	color: rgba(255, 255, 255, 0.7);
	font-size: 12px;
}

.login-copyright a:hover {
	color: #fff;
	text-decoration: underline;
}

/* ========== Tab 切换 ========== */
.login-page .tab-pane {
	display: none;
}

.login-page .tab-pane.active {
	display: block;
}

/* ========== 响应式设计 ========== */
@media (max-width: 992px) {
	.login-container {
		width: 800px;
	}

	.login-left-panel {
		flex: 0 0 55%;
		max-width: 55%;
		padding: 40px;
	}

	.login-right-panel {
		flex: 0 0 45%;
		max-width: 45%;
	}

	.right-slogan h2 {
		font-size: 26px;
	}

	.right-slogan p {
		font-size: 14px;
	}
}

@media (max-width: 768px) {
	.login-page {
		padding: 20px;
	}

	.login-container {
		flex-direction: column;
		min-height: auto;
		width: 100%;
		max-width: 420px;
	}

	.login-left-panel {
		flex: 0 0 auto;
		max-width: 100%;
		order: 2;
		padding: 36px 32px;
	}

	.login-right-panel {
		flex: 0 0 auto;
		max-width: 100%;
		min-height: 220px;
		order: 1;
		padding: 32px 24px;
		border-radius: 20px 20px 0 0;
	}

	.right-slogan h2 {
		font-size: 24px;
	}

	.right-slogan p {
		font-size: 14px;
		margin-bottom: 20px;
	}

	.login-title {
		font-size: 24px;
	}
}

@media (max-width: 480px) {
	.login-left-inner {
		max-width: 100%;
	}

	.login-brand {
		margin-bottom: 28px;
	}

	.login-title {
		font-size: 22px;
		margin-bottom: 20px;
	}

	.login-page .btn {
		font-size: 14px;
		letter-spacing: 1px;
	}

	.btn-outline.register-btn {
		padding: 10px 36px;
		font-size: 13px;
	}
}

/* ========== 深色模式适配 ========== */
.skin-dark .login-page {
	background: #0f172a;
}

.skin-dark .login-container {
	background: #1e293b;
	box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
}

.skin-dark .login-left-panel {
	background: #1e293b;
}

.skin-dark .login-brand .brand-name {
	color: #e2e8f0;
}

.skin-dark .login-title {
	color: #f1f5f9;
}

.skin-dark .login-box-msg {
	color: #66b1ff;
	border-bottom-color: #334155;
}

.skin-dark .login-page .has-feedback .form-control {
	background: #334155;
	border-color: #475569;
	color: #e2e8f0;
}

.skin-dark .login-page .has-feedback .form-control:hover {
	border-color: #66b1ff;
	background: #3b4a5f;
}

.skin-dark .login-page .has-feedback .form-control:focus {
	border-color: #409eff;
	background: #3b4a5f;
	box-shadow: 0 0 0 3px rgba(64, 158, 255, 0.2);
}

.skin-dark .login-page .icheck label {
	color: #94a3b8;
}

.skin-dark .login-page .icheck label:hover {
	color: #66b1ff;
}

.skin-dark .forgot-link {
	color: #66b1ff;
}

.skin-dark .forgot-link:hover {
	color: #b3d8ff;
}

.skin-dark .login-right-panel {
	background: linear-gradient(135deg, #2c5cc5 0%, #337ecc 30%, #3d6fe8 65%, #409eff 100%);
}

.skin-dark .login-page .btn-primary.login-btn {
	background: linear-gradient(135deg, #66b1ff 0%, #409eff 100%) !important;
}

.skin-dark a,
.skin-dark a:hover,
.skin-dark a:active,
.skin-dark a:focus {
	color: #66b1ff;
}

.skin-dark .login-page .input-group .form-control {
	background: #334155;
	border-color: #475569;
	color: #e2e8f0;
}

.skin-dark .login-page .input-group-btn .btn {
	background: #2c5cc5;
	border-color: #409eff;
	color: #66b1ff;
}

.skin-dark .login-page .input-group-btn .btn:hover {
	background: #409eff;
	color: #fff;
}

.skin-dark .select2-container .select2-selection--single {
	background: #334155;
	border-color: #475569;
	color: #e2e8f0;
}

.skin-dark .select2-container--default.select2-container--focus .select2-selection--single {
	background: #3b4a5f;
	border-color: #409eff;
}

.skin-dark .select2-container .select2-selection--single .select2-selection__rendered {
	color: #e2e8f0;
}

.skin-dark .select2-results__option {
	color: #e2e8f0;
}

.skin-dark .select2-results__option--highlighted[aria-selected] {
	background: #2c5cc5;
	color: #66b1ff;
}

.skin-dark .select2-results__option[aria-selected=true] {
	background: #409eff;
	color: #fff;
}

/* 皮肤切换按钮 */
.switchSkin,
.switchSkin:hover {
	position: absolute;
	top: 15px;
	right: 20px;
	font-size: 26px;
	opacity: 0.8;
	color: #409eff;
	z-index: 20;
	transition: all 0.3s ease;
}

.switchSkin:hover {
	opacity: 1;
	color: #337ecc;
	transform: rotate(15deg);
}

/* ========== 验证错误样式 ========== */
.login-page .has-error .form-control {
	border-color: #EF4444 !important;
	box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1) !important;
}

.login-page .has-error .form-control-feedback {
	color: #EF4444;
}
