/**
 * Weegloo-style login page (split layout + social OAuth buttons)
 */

body.ctrlai-login-weegloo-page .ctrlai-site-layout {
	display: block !important;
	grid-template-columns: 1fr !important;
	width: 100% !important;
	max-width: none !important;
	margin: 0 !important;
	padding: 0 !important;
}

body.ctrlai-login-weegloo-page .ctrlai-layout-sidebar--left,
body.ctrlai-login-weegloo-page .ctrlai-layout-sidebar--right {
	display: none !important;
}

body.ctrlai-login-weegloo-page {
	background: #ffffff;
	min-height: 100vh;
}

body.ctrlai-login-weegloo-page .ctrlai-site-layout,
body.ctrlai-login-weegloo-page .ctrlai-layout-main,
body.ctrlai-login-weegloo-page .page-content {
	max-width: none;
	padding: 0;
	margin: 0;
}

body.ctrlai-login-weegloo-page .ctrlai-footer {
	display: none;
}

.ctrlai-login-weegloo {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	min-height: 100vh;
	width: 100%;
}

/* ---- Brand panel (left) ---- */
.ctrlai-login-weegloo__brand {
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 48px clamp(32px, 6vw, 72px);
	background:
		radial-gradient(ellipse 80% 60% at 20% 40%, rgba(99, 102, 241, 0.12) 0%, transparent 70%),
		radial-gradient(ellipse 60% 50% at 80% 80%, rgba(139, 92, 246, 0.1) 0%, transparent 65%),
		#fafbfc;
	border-right: 1px solid #eef2f6;
	box-sizing: border-box;
}

.ctrlai-login-weegloo__logo {
	display: inline-block;
	margin-bottom: 40px;
	font-family: var(--ctrlai-font-main, "Noto Sans KR", sans-serif);
	font-size: 22px;
	font-weight: 800;
	letter-spacing: -0.03em;
	text-decoration: none;
	background: linear-gradient(90deg, #0f172a 0%, #64748b 100%);
	-webkit-background-clip: text;
	background-clip: text;
	color: transparent;
}

.ctrlai-login-weegloo__brand-title {
	margin: 0 0 16px;
	font-family: var(--ctrlai-font-main, "Noto Sans KR", sans-serif);
	font-size: clamp(26px, 3.2vw, 36px);
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.03em;
	color: #0f172a;
}

.ctrlai-login-weegloo__brand-desc {
	margin: 0;
	font-size: 15px;
	line-height: 1.65;
	color: #64748b;
	max-width: 20em;
}

/* ---- Login panel (right) ---- */
.ctrlai-login-weegloo__panel {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 40px 24px;
	background: #ffffff;
	box-sizing: border-box;
}

.ctrlai-login-weegloo__panel-inner {
	width: min(100%, 400px);
}

.ctrlai-login-weegloo__title {
	margin: 0 0 10px;
	font-family: var(--ctrlai-font-main, "Noto Sans KR", sans-serif);
	font-size: clamp(22px, 3vw, 28px);
	font-weight: 800;
	line-height: 1.25;
	letter-spacing: -0.02em;
	color: #0f172a;
	text-align: center;
}

.ctrlai-login-weegloo__subtitle {
	margin: 0 0 28px;
	font-size: 14px;
	line-height: 1.55;
	color: #64748b;
	text-align: center;
}

/* ---- Social buttons ---- */
.ctrlai-login-weegloo__social {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-bottom: 24px;
}

.ctrlai-social-btn-wrap {
	width: 100%;
}

.ctrlai-social-btn-wrap .nsl-container,
.ctrlai-social-btn-wrap .nsl-container-buttons {
	width: 100% !important;
	max-width: none !important;
	display: block !important;
	margin: 0 !important;
	padding: 0 !important;
}

.ctrlai-social-btn-wrap .nsl-container-buttons a[data-plugin="nsl"] {
	display: block !important;
	width: 100% !important;
	margin: 0 !important;
	padding: 0 !important;
	border-radius: 10px !important;
	border: 1px solid #e2e8f0 !important;
	box-shadow: none !important;
	overflow: hidden !important;
	text-decoration: none !important;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ctrlai-social-btn-wrap .nsl-container-buttons a[data-plugin="nsl"]:hover {
	border-color: #cbd5e1 !important;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06) !important;
	transform: translateY(-1px);
}

.ctrlai-social-btn-wrap .nsl-button {
	display: flex !important;
	width: 100% !important;
	min-height: 48px !important;
	height: 48px !important;
	padding: 0 18px !important;
	align-items: center !important;
	justify-content: flex-start !important;
	background: #ffffff !important;
	box-shadow: none !important;
	border-radius: 10px !important;
}

.ctrlai-social-btn-wrap .nsl-button-svg-container {
	flex: 0 0 24px !important;
	width: 24px !important;
	height: 24px !important;
	margin: 0 12px 0 0 !important;
	display: flex !important;
	align-items: center !important;
	justify-content: center !important;
}

.ctrlai-social-btn-wrap .nsl-button-label-container {
	flex: 1 1 auto !important;
	font-size: 14px !important;
	font-weight: 500 !important;
	color: #334155 !important;
	text-align: left !important;
	justify-content: flex-start !important;
}

/* Active custom GitHub OAuth link button */
.ctrlai-social-btn--link {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 48px;
	padding: 0 18px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #ffffff;
	color: #334155;
	font-family: var(--ctrlai-font-main, "Noto Sans KR", sans-serif);
	font-size: 14px;
	font-weight: 500;
	text-decoration: none;
	box-sizing: border-box;
	cursor: pointer;
	opacity: 1;
	transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.ctrlai-social-btn--link:hover,
.ctrlai-social-btn--link:focus-visible {
	border-color: #cbd5e1;
	box-shadow: 0 2px 8px rgba(15, 23, 42, 0.06);
	transform: translateY(-1px);
	color: #334155;
}

.ctrlai-social-btn--link .ctrlai-social-btn__icon {
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	margin-right: 12px;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

.ctrlai-social-btn--link.ctrlai-social-btn--google .ctrlai-social-btn__icon,
.ctrlai-social-btn--google .ctrlai-social-btn__icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%234285F4' d='M20.64 12.2c0-.64-.06-1.25-.16-1.84H12v3.48h4.84c-.21 1.13-.85 2.08-1.8 2.72v2.26h2.91c1.7-1.57 2.68-3.87 2.68-6.62z'/%3E%3Cpath fill='%2334A853' d='M12 21c2.43 0 4.47-.81 5.96-2.18l-2.91-2.26c-.81.54-1.84.86-3.05.86-2.34 0-4.33-1.58-5.04-3.71H3.96v2.33C5.44 18.98 8.48 21 12 21z'/%3E%3Cpath fill='%23FBBC05' d='M6.96 13.71c-.18-.54-.28-1.12-.28-1.71s.1-1.17.28-1.71V7.96H3.96A9 9 0 0 0 3 12c0 1.45.35 2.83.96 4.04L6.96 13.71z'/%3E%3Cpath fill='%23EA4335' d='M12 6.58c1.32 0 2.51.45 3.44 1.35l2.58-2.58C16.46 3.89 14.43 3 12 3 8.48 3 5.44 5.02 3.96 7.96L6.96 10.29C7.67 8.16 9.66 6.58 12 6.58z'/%3E%3C/svg%3E");
}

.ctrlai-login-weegloo__error {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 10px;
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #b91c1c;
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}

.ctrlai-login-weegloo__success {
	margin: 0 0 16px;
	padding: 10px 14px;
	border-radius: 10px;
	background: #f0fdf4;
	border: 1px solid #bbf7d0;
	color: #166534;
	font-size: 13px;
	line-height: 1.5;
	text-align: center;
}

/* Disabled placeholder (OAuth not configured) */
.ctrlai-social-btn {
	display: flex;
	align-items: center;
	width: 100%;
	min-height: 48px;
	padding: 0 18px;
	border: 1px solid #e2e8f0;
	border-radius: 10px;
	background: #f8fafc;
	color: #94a3b8;
	font-family: var(--ctrlai-font-main, "Noto Sans KR", sans-serif);
	font-size: 14px;
	font-weight: 500;
	cursor: not-allowed;
	box-sizing: border-box;
	opacity: 0.72;
}

.ctrlai-social-btn__icon {
	flex: 0 0 24px;
	width: 24px;
	height: 24px;
	margin-right: 12px;
	background-size: contain;
	background-repeat: no-repeat;
	background-position: center;
}

.ctrlai-social-btn--google .ctrlai-social-btn__icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Cpath fill='%234285F4' d='M20.64 12.2c0-.64-.06-1.25-.16-1.84H12v3.48h4.84c-.21 1.13-.85 2.08-1.8 2.72v2.26h2.91c1.7-1.57 2.68-3.87 2.68-6.62z'/%3E%3Cpath fill='%2334A853' d='M12 21c2.43 0 4.47-.81 5.96-2.18l-2.91-2.26c-.81.54-1.84.86-3.05.86-2.34 0-4.33-1.58-5.04-3.71H3.96v2.33C5.44 18.98 8.48 21 12 21z'/%3E%3Cpath fill='%23FBBC05' d='M6.96 13.71c-.18-.54-.28-1.12-.28-1.71s.1-1.17.28-1.71V7.96H3.96A9 9 0 0 0 3 12c0 1.45.35 2.83.96 4.04L6.96 13.71z'/%3E%3Cpath fill='%23EA4335' d='M12 6.58c1.32 0 2.51.45 3.44 1.35l2.58-2.58C16.46 3.89 14.43 3 12 3 8.48 3 5.44 5.02 3.96 7.96L6.96 10.29C7.67 8.16 9.66 6.58 12 6.58z'/%3E%3C/svg%3E");
}

.ctrlai-social-btn--link.ctrlai-social-btn--github .ctrlai-social-btn__icon,
.ctrlai-social-btn--github .ctrlai-social-btn__icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%230f172a'%3E%3Cpath d='M12 2C6.477 2 2 6.484 2 12.017c0 4.425 2.865 8.18 6.839 9.504.5.092.682-.217.682-.483 0-.237-.008-.868-.013-1.703-2.782.605-3.369-1.343-3.369-1.343-.454-1.158-1.11-1.466-1.11-1.466-.908-.62.069-.608.069-.608 1.003.07 1.531 1.032 1.531 1.032.892 1.53 2.341 1.088 2.91.832.092-.647.35-1.088.636-1.338-2.22-.253-4.555-1.113-4.555-4.951 0-1.093.39-1.988 1.029-2.688-.103-.253-.446-1.272.098-2.65 0 0 .84-.27 2.75 1.026A9.564 9.564 0 0 1 12 6.844c.85.004 1.705.115 2.504.337 1.909-1.296 2.747-1.027 2.747-1.027.546 1.379.202 2.398.1 2.651.64.7 1.028 1.595 1.028 2.688 0 3.848-2.339 4.695-4.566 4.943.359.309.678.92.678 1.855 0 1.338-.012 2.419-.012 2.747 0 .268.18.58.688.482A10.019 10.019 0 0 0 22 12.017C22 6.484 17.522 2 12 2z'/%3E%3C/svg%3E");
}

.ctrlai-social-btn--link.ctrlai-social-btn--facebook .ctrlai-social-btn__icon,
.ctrlai-social-btn--facebook .ctrlai-social-btn__icon {
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='12' fill='%231877F2'/%3E%3Cpath fill='%23fff' d='M13.5 7.5h2.25V4.5h-2.25c-2.07 0-3.75 1.68-3.75 3.75v1.5H7.5v3h2.25V19.5h3V12.75h2.55l.45-3H12.75V8.25c0-.414.336-.75.75-.75z'/%3E%3C/svg%3E");
}

.ctrlai-social-btn__admin-hint {
	margin: 6px 0 0;
	font-size: 11px;
	line-height: 1.45;
	color: #94a3b8;
}

/* ---- Legal footer ---- */
.ctrlai-login-weegloo__legal {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-top: 8px;
	font-size: 12px;
}

.ctrlai-login-weegloo__legal a {
	color: #64748b;
	text-decoration: none;
}

.ctrlai-login-weegloo__legal a:hover {
	color: #6366f1;
}

.ctrlai-login-weegloo__legal-dot {
	color: #cbd5e1;
}

@media (max-width: 900px) {
	.ctrlai-login-weegloo {
		grid-template-columns: 1fr;
	}

	.ctrlai-login-weegloo__brand {
		padding: 32px 24px 24px;
		border-right: none;
		border-bottom: 1px solid #eef2f6;
	}

	.ctrlai-login-weegloo__brand-title {
		font-size: 24px;
	}

	.ctrlai-login-weegloo__panel {
		padding: 32px 20px 48px;
	}
}
