/* ==========================================================================
   หน้าเข้าสู่ระบบ (login.php, login_choose.php) — ชุดสีเดียวกับ questionnaire.css / master.css
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Prompt:wght@400;500;600;700&display=swap');

:root{
	--lg-primary: #218DAE;
	--lg-primary-dark: #176D87;
	--lg-primary-light: #2BBBD7;
	--lg-bg: #f2f8fb;
	--lg-border: #dbe9ef;
	--lg-text: #1b3440;
	--lg-text-muted: #5f7783;
	--lg-danger: #e0554f;
	--lg-radius: 18px;
	--lg-radius-sm: 10px;
	--lg-shadow: 0 18px 50px rgba(23, 109, 135, 0.18);
}

*{ box-sizing: border-box; }

body.lg-body{
	margin: 0;
	min-height: 100vh;
	font-family: 'Prompt', 'Segoe UI', Tahoma, sans-serif;
	color: var(--lg-text);
	background:
		radial-gradient(circle at 10% 10%, rgba(43, 187, 215,0.18) 0, transparent 40%),
		radial-gradient(circle at 90% 90%, rgba(33, 141, 174,0.16) 0, transparent 45%),
		var(--lg-bg);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px 16px;
}

.lg-shell{
	width: 100%;
	max-width: 960px;
	display: grid;
	grid-template-columns: 1fr 1fr;
	background: #fff;
	border-radius: var(--lg-radius);
	box-shadow: var(--lg-shadow);
	overflow: hidden;
}

/* ---- left brand panel --------------------------------------------------- */
.lg-brand{
	background: linear-gradient(150deg, var(--lg-primary-dark) 0%, var(--lg-primary) 45%, var(--lg-primary-light) 100%);
	color: #fff;
	padding: 40px 36px;
	display: flex;
	flex-direction: column;
	position: relative;
	overflow: hidden;
}
.lg-brand::after{
	content: "\f19d"; /* fa-graduation-cap */
	font-family: FontAwesome;
	position: absolute;
	right: -30px;
	bottom: -40px;
	font-size: 220px;
	color: rgba(255,255,255,0.07);
	line-height: 1;
}
.lg-logo{
	background: #fff;
	border-radius: 12px;
	padding: 8px 12px;
	align-self: flex-start;
	margin-bottom: 28px;
}
.lg-logo img{
	display: block;
	height: 48px;
	width: auto;
}
.lg-brand h1{
	font-size: 1.55rem;
	font-weight: 600;
	line-height: 1.35;
	margin: 0 0 8px 0;
	color: #fff;
}
.lg-brand .lg-sub{
	font-size: 0.92rem;
	color: rgba(255,255,255,0.85);
	margin: 0 0 28px 0;
}
.lg-features{
	list-style: none;
	padding: 0;
	margin: 0 0 auto 0;
	position: relative;
	z-index: 1;
}
.lg-features li{
	display: flex;
	align-items: center;
	gap: 12px;
	margin-bottom: 14px;
	font-size: 0.92rem;
}
.lg-features i{
	width: 34px;
	height: 34px;
	border-radius: 10px;
	background: rgba(255,255,255,0.16);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.lg-eligible{
	margin-top: 28px;
	padding: 12px 14px;
	border-radius: var(--lg-radius-sm);
	background: rgba(255,255,255,0.12);
	font-size: 0.8rem;
	line-height: 1.5;
	position: relative;
	z-index: 1;
}

/* ---- right form panel --------------------------------------------------- */
.lg-form{
	padding: 40px 36px;
	display: flex;
	flex-direction: column;
	justify-content: center;
}
.lg-form h2{
	font-size: 1.35rem;
	font-weight: 600;
	color: var(--lg-primary-dark);
	margin: 0 0 4px 0;
}
.lg-form .lg-hint{
	font-size: 0.88rem;
	color: var(--lg-text-muted);
	margin: 0 0 24px 0;
}

.lg-alert{
	display: flex;
	gap: 10px;
	align-items: flex-start;
	background: #fdeceb;
	color: #a8322d;
	border-radius: var(--lg-radius-sm);
	padding: 12px 14px;
	font-size: 0.85rem;
	margin-bottom: 18px;
}
.lg-alert i{ margin-top: 3px; }

.lg-field{
	margin-bottom: 18px;
}
.lg-field > label{
	display: block;
	font-size: 0.88rem;
	font-weight: 500;
	margin-bottom: 6px;
	color: var(--lg-text);
}
.lg-field small{
	display: block;
	font-size: 0.76rem;
	color: var(--lg-text-muted);
	margin-top: 5px;
}
.lg-input-wrap{
	position: relative;
}
.lg-input-wrap > i{
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: var(--lg-text-muted);
}
.lg-input,
.lg-select{
	width: 100%;
	min-height: 48px;
	border: 1.5px solid var(--lg-border);
	border-radius: var(--lg-radius-sm);
	background: #fbfdfe;
	font-family: inherit;
	font-size: 0.98rem;
	color: var(--lg-text);
	padding: 10px 12px;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.lg-input{
	padding-left: 42px;
	padding-right: 46px;
	letter-spacing: 1px;
}
.lg-input:focus,
.lg-select:focus{
	outline: none;
	border-color: var(--lg-primary-light);
	box-shadow: 0 0 0 3px rgba(43, 187, 215,0.18);
	background: #fff;
}
.lg-toggle{
	position: absolute;
	right: 6px;
	top: 50%;
	transform: translateY(-50%);
	border: none;
	background: transparent;
	color: var(--lg-text-muted);
	width: 38px;
	height: 38px;
	border-radius: 8px;
	cursor: pointer;
}
.lg-toggle:hover{ background: var(--lg-bg); color: var(--lg-primary); }

.lg-date{
	display: grid;
	grid-template-columns: 1fr 1.6fr 1.3fr;
	gap: 8px;
}

.lg-btn{
	width: 100%;
	min-height: 50px;
	border: none;
	border-radius: var(--lg-radius-sm);
	background: linear-gradient(135deg, var(--lg-primary-dark) 0%, var(--lg-primary) 100%);
	color: #fff;
	font-family: inherit;
	font-size: 1.02rem;
	font-weight: 600;
	cursor: pointer;
	box-shadow: 0 6px 16px rgba(33, 141, 174,0.28);
	transition: transform .12s ease, box-shadow .12s ease;
	margin-top: 6px;
}
.lg-btn:hover{
	box-shadow: 0 8px 20px rgba(33, 141, 174,0.36);
	transform: translateY(-1px);
}
.lg-btn i{ margin-left: 6px; }

.lg-footer{
	text-align: center;
	margin-top: 20px;
	font-size: 0.85rem;
}
.lg-footer a{
	color: var(--lg-primary);
	text-decoration: none;
}
.lg-footer a:hover{ text-decoration: underline; }

/* ---- program choice (login_choose.php) ----------------------------------- */
.lg-choice{
	display: flex;
	align-items: center;
	gap: 14px;
	width: 100%;
	text-align: left;
	border: 1.5px solid var(--lg-border);
	border-radius: var(--lg-radius-sm);
	background: #fff;
	padding: 14px 16px;
	margin-bottom: 12px;
	font-family: inherit;
	cursor: pointer;
	transition: border-color .15s ease, box-shadow .15s ease;
}
.lg-choice:hover{
	border-color: var(--lg-primary-light);
	box-shadow: 0 4px 14px rgba(33, 141, 174,0.12);
}
.lg-choice > i{
	width: 40px;
	height: 40px;
	border-radius: 10px;
	background: #e4f4f8;
	color: var(--lg-primary);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}
.lg-choice strong{
	display: block;
	font-size: 0.95rem;
	font-weight: 600;
	color: var(--lg-text);
}
.lg-choice span{
	display: block;
	font-size: 0.8rem;
	color: var(--lg-text-muted);
}
.lg-choice .fa-chevron-right{
	margin-left: auto;
	background: none;
	width: auto;
	height: auto;
	color: var(--lg-text-muted);
}

/* ---- responsive --------------------------------------------------------- */
@media (max-width: 767.98px){
	body.lg-body{
		align-items: flex-start;
		padding: 16px;
	}
	.lg-shell{
		grid-template-columns: 1fr;
	}
	.lg-brand{
		padding: 24px 22px;
	}
	.lg-brand::after{ font-size: 140px; }
	.lg-logo{ margin-bottom: 16px; }
	.lg-logo img{ height: 38px; }
	.lg-brand h1{ font-size: 1.2rem; }
	.lg-brand .lg-sub{ margin-bottom: 0; }
	.lg-features{ display: none; }
	.lg-eligible{ margin-top: 16px; }
	.lg-form{
		padding: 26px 22px;
	}
}

/* ---- yellow accent ------------------------------------------------------ */
.lg-features i{
	background: #FFD758;
	color: #176D87;
}
.lg-eligible{
	border-left: 4px solid #FFD758;
}
.lg-brand h1 .lg-hl{
	color: #FFD758;
}

/* เลือกประเภทเอกสาร: บัตรประชาชน / พาสปอร์ต */
.lg-idtype{
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 8px;
	margin-bottom: 16px;
}
.lg-idtype label{ margin: 0; cursor: pointer; }
.lg-idtype input{ position: absolute; opacity: 0; pointer-events: none; }
.lg-idtype span{
	display: block;
	height: 100%;
	border: 1.5px solid var(--lg-border);
	border-radius: var(--lg-radius-sm);
	background: #fbfdfe;
	padding: 8px 10px;
	font-size: 0.88rem;
	font-weight: 500;
	color: var(--lg-text);
	line-height: 1.35;
	transition: border-color .15s ease, background .15s ease;
}
.lg-idtype span small{ font-size: 0.72rem; font-weight: 400; color: var(--lg-text-muted); }
.lg-idtype span i{ color: var(--lg-text-muted); margin-right: 4px; }
.lg-idtype input:checked + span{
	border-color: var(--lg-primary);
	background: #eaf6fa;
	color: var(--lg-primary-dark);
}
.lg-idtype input:checked + span i{ color: var(--lg-primary); }
.lg-idtype input:focus-visible + span{ box-shadow: 0 0 0 3px rgba(43, 187, 215,0.18); }
