/* 20261008 登入頁改版：比照內頁色系(#005A87 / #007AB0 / #F0F7FF) */
body {
	background: #EEF3F8;
	margin: 0;
	padding: 0;
}
.lg-wrap {
	min-height: calc( 100vh - 140px );
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 16px;
	box-sizing: border-box;
}
.lg-card {
	display: flex;
	width: 100%;
	max-width: 880px;
	background: #fff;
	border-radius: 14px;
	overflow: hidden;
	border: 1px solid #DCE6F0;
	box-shadow: 0 18px 40px -18px rgba( 0, 70, 110, .28 ), 0 2px 6px rgba( 0, 70, 110, .06 );
}

/* 左側品牌區 */
.lg-brand {
	flex: 1 1 50%;
	position: relative;
	padding: 44px 40px;
	background: linear-gradient( 160deg, #F5F9FD 0%, #E3ECF4 100% );
	border-right: 1px solid #DCE6F0;
	display: flex;
	flex-direction: column;
}
.lg-brand::before {
	content: '';
	position: absolute;
	left: 0; top: 0; bottom: 0;
	width: 5px;
	background: linear-gradient( 180deg, #007AB0, #005A87 );
}
.lg-logo {
	display: block;
	width: 100%;
	max-width: 320px;
	height: auto;
}
.lg-bar {
	width: 56px;
	height: 4px;
	border-radius: 2px;
	background: #4FA3CD;
	margin: 22px 0 20px;
}
.lg-slogan {
	color: #005A87;
	font-size: 17px;
	font-weight: 600;
	line-height: 1.7;
	letter-spacing: 1px;
	margin: 0 0 22px;
}
.lg-feat {
	list-style: none;
	margin: 0;
	padding: 0;
}
.lg-feat li {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #3E5566;
	font-size: 14.5px;
	line-height: 1.5;
	padding: 7px 0;
}
.lg-feat li svg {
	flex: 0 0 auto;
	width: 20px;
	height: 20px;
	color: #007AB0;
}
.lg-brand-foot {
	margin-top: auto;
	padding-top: 26px;
	font-size: 12.5px;
	color: #7B8D9B;
	letter-spacing: .5px;
}

/* 右側表單 */
.lg-form {
	flex: 1 1 50%;
	padding: 44px 40px;
	box-sizing: border-box;
}
.lg-title {
	margin: 0 0 4px;
	font-size: 22px;
	font-weight: 700;
	color: #1F2D38;
	letter-spacing: 1px;
}
.lg-title small {
	font-size: 13px;
	font-weight: 400;
	color: #9AAAB6;
	letter-spacing: 1.5px;
	margin-left: 8px;
	text-transform: uppercase;
}
.lg-sub {
	margin: 0 0 26px;
	font-size: 13.5px;
	color: #7B8D9B;
}
.lg-field {
	margin-bottom: 16px;
}
.lg-label {
	display: block;
	font-size: 13.5px;
	font-weight: 600;
	color: #3E5566;
	margin-bottom: 6px;
}
.lg-input-box {
	position: relative;
}
.lg-input-box > svg {
	position: absolute;
	left: 13px;
	top: 50%;
	transform: translateY( -50% );
	width: 18px;
	height: 18px;
	color: #9AAAB6;
	pointer-events: none;
	transition: color .2s;
}
.lg-input {
	width: 100%;
	height: 46px;
	box-sizing: border-box;
	padding: 0 14px 0 40px;
	font-size: 15px;
	color: #1F2D38;
	background: #F8FAFC;
	border: 1px solid #CFDCE7;
	border-radius: 8px;
	outline: none;
	transition: border-color .2s, box-shadow .2s, background .2s;
	-webkit-appearance: none;
}
.lg-input::placeholder {
	color: #A9B7C2;
}
.lg-input:focus {
	background: #fff;
	border-color: #007AB0;
	box-shadow: 0 0 0 3px rgba( 0, 122, 176, .15 );
}
.lg-input-box:focus-within > svg {
	color: #007AB0;
}
.lg-eye {
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY( -50% );
	width: 36px;
	height: 36px;
	border: 0;
	background: transparent;
	color: #9AAAB6;
	cursor: pointer;
	border-radius: 6px;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
}
.lg-eye:hover { color: #007AB0; background: #EEF5FA; }
.lg-eye svg { width: 18px; height: 18px; }
.lg-input.has-eye { padding-right: 46px; }

/* 驗證碼列 */
.lg-code-row {
	display: flex;
	align-items: center;
	gap: 10px;
}
.lg-code-row .lg-input {
	flex: 1 1 auto;
	padding-left: 14px;
	letter-spacing: 4px;
	min-width: 0;
}
.lg-code-img {
	flex: 0 0 auto;
	height: 46px;
	width: 96px;
	object-fit: fill;
	border: 1px solid #CFDCE7;
	border-radius: 8px;
	cursor: pointer;
	background: #fff;
	box-sizing: border-box;
}
.lg-code-refresh {
	flex: 0 0 auto;
	width: 46px;
	height: 46px;
	border: 1px solid #CFDCE7;
	border-radius: 8px;
	background: #fff;
	color: #007AB0;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	transition: background .2s;
}
.lg-code-refresh:hover { background: #EEF5FA; }
.lg-code-refresh svg { width: 18px; height: 18px; transition: transform .4s; }
.lg-code-refresh:hover svg { transform: rotate( 180deg ); }
.lg-hint {
	font-size: 12.5px;
	color: #9AAAB6;
	margin-top: 6px;
}

.lg-submit {
	width: 100%;
	height: 48px;
	margin-top: 10px;
	border: 0;
	border-radius: 8px;
	background: linear-gradient( 180deg, #0A86BE 0%, #007AB0 100% );
	color: #fff;
	font-size: 16px;
	font-weight: 600;
	letter-spacing: 6px;
	cursor: pointer;
	box-shadow: 0 6px 14px -6px rgba( 0, 122, 176, .6 );
	transition: background .2s, transform .1s;
}
.lg-submit:hover { background: #005A87; }
.lg-submit:active { transform: translateY( 1px ); }

.lg-links {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-top: 18px;
	font-size: 13.5px;
}
.lg-links a {
	color: #007AB0;
	text-decoration: none;
}
.lg-links a:hover { color: #005A87; text-decoration: underline; }
.lg-secure {
	display: flex;
	align-items: center;
	gap: 5px;
	color: #9AAAB6;
	font-size: 12.5px;
}
.lg-secure svg { width: 14px; height: 14px; }

.grecaptcha-badge { z-index: 100; }

/* 平板以下：上下堆疊 */
@media screen and ( max-width: 760px ) {
	.lg-wrap { padding: 20px 16px; align-items: flex-start; }
	.lg-card { flex-direction: column; border-radius: 12px; }
	.lg-brand {
		padding: 26px 24px 22px;
		border-right: 0;
		border-bottom: 1px solid #DCE6F0;
		align-items: center;
		text-align: center;
	}
	.lg-brand::before { width: auto; height: 4px; right: 0; bottom: auto; }
	.lg-logo { max-width: 240px; }
	.lg-bar, .lg-feat, .lg-brand-foot { display: none; }
	.lg-slogan { margin: 12px 0 0; font-size: 14.5px; }
	.lg-form { padding: 26px 22px 28px; }
}

/* ===== 頁首／頁尾（僅登入頁載入此檔，不影響內頁）===== */
/* 頁首：登入頁無選單、logo 已在卡片內，隱藏藍色頁首，改以頂端細色條保留品牌感 */
#topLineBgDiv { display: none !important; }
body { border-top: 4px solid #007AB0; }
.lg-wrap { min-height: 0; flex: 1 0 auto; }

/* 版型原本把頁尾 absolute 釘在底部、靠固定 padding-bottom 讓位，手機頁尾換行變高就壓到卡片；
   登入頁改 flex 直排：內容撐開、頁尾自然接在後面 */
.wrapper_con {
	display: flex;
	flex-direction: column;
	min-height: calc( 100vh - 4px );
	padding-bottom: 0 !important;
}

/* 頁尾：維持版型深底色(與內頁一致)，只調排版與間距 */
#footerBgDiv {
	position: static !important;
	flex: 0 0 auto;
	padding: 18px 16px 20px;
	font-size: 13px;
	line-height: 1.9;
}
#footerBgDiv .container { width: auto; max-width: 960px; padding: 0; }
#footerBgDiv .marginTop10px { margin-top: 0 !important; }
#footerBgDiv .marginBtm10px { margin-bottom: 6px !important; }
#footerBgDiv a { text-decoration: none; }
#footerBgDiv a:hover .noticeTxt { text-decoration: underline; }
#footerBgDiv b {
	display: block;
	margin-top: 2px;
	font-weight: 400;
	font-size: 12px !important;
	opacity: .75;
}

@media screen and ( max-width: 760px ) {
	#footerBgDiv { font-size: 12.5px; padding: 16px 16px 18px; }
}

/* ===== 訊息 modal（取代 alert）===== */
.lg-modal {
	position: fixed;
	inset: 0;
	z-index: 3000;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba( 15, 35, 50, 0 );
	transition: background .2s;
}
.lg-modal.is-open { background: rgba( 15, 35, 50, .45 ); }
.lg-modal-box {
	width: 100%;
	max-width: 400px;
	background: #fff;
	border-radius: 14px;
	padding: 30px 28px 24px;
	text-align: center;
	box-shadow: 0 24px 60px -20px rgba( 0, 40, 70, .45 );
	opacity: 0;
	transform: translateY( 12px ) scale( .97 );
	transition: opacity .2s, transform .2s;
}
.lg-modal.is-open .lg-modal-box { opacity: 1; transform: none; }
.lg-modal-icon {
	width: 58px;
	height: 58px;
	margin: 0 auto 14px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
}
.lg-modal-icon svg { width: 28px; height: 28px; }
.is-success .lg-modal-icon { background: #E6F4EA; color: #2E8B57; }
.is-error   .lg-modal-icon { background: #FDECEC; color: #D32F2F; }
.is-warn    .lg-modal-icon { background: #FFF4E0; color: #E08A00; }
.is-info    .lg-modal-icon { background: #E3ECF4; color: #007AB0; }
.lg-modal-title {
	margin: 0 0 8px;
	font-size: 19px;
	font-weight: 700;
	color: #1F2D38;
	letter-spacing: 1px;
}
.lg-modal-text {
	margin: 0 0 22px;
	font-size: 14.5px;
	line-height: 1.75;
	color: #52677A;
}
.lg-modal-btns {
	display: flex;
	gap: 10px;
	justify-content: center;
}
.lg-modal-btn {
	flex: 1 1 0;
	max-width: 200px;
	height: 44px;
	line-height: 44px;
	border: 0;
	border-radius: 8px;
	background: #007AB0;
	color: #fff !important;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 2px;
	text-decoration: none !important;
	cursor: pointer;
	padding: 0 16px;
	transition: background .2s;
}
.lg-modal-btn:hover { background: #005A87; }
.lg-modal-btn:focus { outline: none; box-shadow: 0 0 0 3px rgba( 0, 122, 176, .25 ); }
.lg-modal-btn.is-ghost {
	background: #fff;
	color: #52677A !important;
	border: 1px solid #CFDCE7;
}
.lg-modal-btn.is-ghost:hover { background: #F3F7FA; }
.is-success .lg-modal-btn { background: #fff; color: #007AB0 !important; border: 1px solid #CFDCE7; height: 40px; line-height: 38px; font-size: 14px; }
.lg-modal-progress {
	height: 4px;
	border-radius: 2px;
	background: #E3ECF4;
	overflow: hidden;
	margin: -6px 0 18px;
}
.lg-modal-progress span {
	display: block;
	height: 100%;
	width: 0;
	background: linear-gradient( 90deg, #4FA3CD, #007AB0 );
}
.lg-modal.is-open .lg-modal-progress span { width: 100%; transition: width 1.15s linear; }

/* ===== 登入讀取遮罩 ===== */
.lg-loading {
	position: fixed;
	inset: 0;
	z-index: 3100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 16px;
	background: rgba( 238, 243, 248, .72 );
	-webkit-backdrop-filter: blur( 3px );
	backdrop-filter: blur( 3px );
	opacity: 0;
	visibility: hidden;
	transition: opacity .2s, visibility .2s;
}
.lg-loading.is-open { opacity: 1; visibility: visible; }
.lg-loading-box {
	background: #fff;
	border-radius: 14px;
	padding: 28px 36px 24px;
	text-align: center;
	min-width: 240px;
	box-shadow: 0 20px 50px -20px rgba( 0, 40, 70, .4 );
	border: 1px solid #DCE6F0;
}
.lg-spinner {
	width: 44px;
	height: 44px;
	margin: 0 auto 14px;
	border-radius: 50%;
	border: 4px solid #E3ECF4;
	border-top-color: #007AB0;
	animation: lg-spin .8s linear infinite;
}
@keyframes lg-spin { to { transform: rotate( 360deg ); } }
.lg-loading-title {
	font-size: 16px;
	font-weight: 700;
	color: #005A87;
	letter-spacing: 2px;
	margin-bottom: 4px;
}
.lg-loading-text {
	font-size: 13px;
	color: #7B8D9B;
}
.lg-submit.is-loading,
.lg-submit:disabled {
	background: #6FA9C6;
	cursor: wait;
	box-shadow: none;
}

/* 讀取遮罩：成功狀態(轉圈 → 綠勾，直接進入系統) */
.lg-loading-ok {
	display: none;
	width: 48px;
	height: 48px;
	margin: 0 auto 12px;
	border-radius: 50%;
	background: #E6F4EA;
	color: #2E8B57;
	align-items: center;
	justify-content: center;
}
.lg-loading-ok svg { width: 26px; height: 26px; }
.lg-loading.is-ok .lg-spinner { display: none; }
.lg-loading.is-ok .lg-loading-ok { display: flex; animation: lg-pop .3s ease-out; }
.lg-loading.is-ok .lg-loading-title { color: #2E8B57; }
@keyframes lg-pop { from { transform: scale( .6 ); opacity: 0; } to { transform: none; opacity: 1; } }
