:root {
	color-scheme: light;
	--bg: #020617;
	--bg-overlay: rgba(2, 6, 23, 0.55);
	--card: rgba(255, 255, 255, 0.96);
	--card-border: rgba(255, 255, 255, 0.28);
	--text: #0f172a;
	--muted: #64748b;
	--muted-light: #94a3b8;
	--line: #e2e8f0;
	--panel: #f8fafc;
	--primary: #2563eb;
	--primary-dark: #1d4ed8;
	--shadow: 0 30px 80px rgba(15, 23, 42, 0.35);
}

body.btwpc-icrm-login,
body.btwpc-icrm-login * {
	box-sizing: border-box;
}

html,
body.btwpc-icrm-login {
	min-height: 100%;
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
	color: var(--text);
	background: var(--bg);
}

body.btwpc-icrm-login button,
body.btwpc-icrm-login input {
	font: inherit;
}

.btwpc-auth-page {
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px 20px 96px;
	position: relative;
	overflow: hidden;
	background: linear-gradient(180deg, #0f172a 0%, #020617 100%);
}

.btwpc-auth-page::before {
	content: "";
	position: absolute;
	inset: 0;
	background:
		radial-gradient(circle at top, rgba(59, 130, 246, 0.24), transparent 40%),
		linear-gradient(180deg, rgba(2, 6, 23, 0.38) 0%, var(--bg-overlay) 100%);
	pointer-events: none;
}

.btwpc-auth-shell {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 520px;
}

.btwpc-auth-card {
	background: var(--card);
	border: 1px solid var(--card-border);
	border-radius: 36px;
	box-shadow: var(--shadow);
	overflow: hidden;
	backdrop-filter: blur(16px);
}

.btwpc-auth-header {
	padding: 48px 48px 28px;
	text-align: center;
}

.btwpc-auth-badge {
	width: 88px;
	height: 88px;
	margin: 0 auto 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
}

.btwpc-auth-badge::before {
	content: "";
	position: absolute;
	left: 50%;
	top: 50%;
	width: 74px;
	height: 74px;
	border-radius: 24px;
	background: radial-gradient(circle at 50% 40%, rgba(96, 165, 250, 0.28) 0%, rgba(79, 70, 229, 0.18) 46%, rgba(15, 23, 42, 0) 100%);
	transform: translate(-50%, -42%);
	filter: blur(10px);
}

.btwpc-auth-badge .btwpc-auth-symbol {
	width: 84%;
	height: 84%;
	max-width: 74px;
	max-height: 74px;
	display: block;
	object-fit: contain;
	position: relative;
	z-index: 1;
	transform: rotate(8deg);
	animation: btwpc-auth-float 6.8s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite;
	filter:
		drop-shadow(0 24px 30px rgba(15, 23, 42, 0.2))
		drop-shadow(0 10px 18px rgba(37, 99, 235, 0.2));
}

@keyframes btwpc-auth-float {
	0%,
	100% {
		transform: translate3d(0, 0, 0) rotate(8deg) scale(0.99);
	}
	50% {
		transform: translate3d(0, -5px, 0) rotate(14deg) scale(1.015);
	}
}

.btwpc-auth-title {
	margin: 0;
	font-size: 32px;
	line-height: 1.15;
	font-weight: 800;
	letter-spacing: -0.03em;
}

.btwpc-auth-subtitle {
	margin: 12px 0 0;
	color: var(--muted-light);
	font-size: 12px;
	font-weight: 700;
}

.btwpc-auth-description {
	margin: 12px 0 0;
	color: var(--muted);
	font-size: 14px;
	line-height: 1.6;
}

.btwpc-auth-form {
	padding: 0 48px 48px;
}

.btwpc-field-group {
	margin-top: 18px;
}

.btwpc-field-group:first-child {
	margin-top: 0;
}

.btwpc-field-label {
	display: block;
	margin: 0 0 8px 10px;
	color: var(--muted-light);
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.18em;
	text-transform: uppercase;
}

.btwpc-field-wrap {
	position: relative;
}

.btwpc-field-wrap svg {
	position: absolute;
	left: 18px;
	top: 50%;
	width: 18px !important;
	height: 18px !important;
	max-width: 18px;
	max-height: 18px;
	color: #cbd5e1;
	transform: translateY(-50%);
	pointer-events: none;
	flex: none;
}

.btwpc-field-input {
	width: 100%;
	min-height: 58px;
	padding: 16px 18px 16px 50px;
	border: 1px solid transparent;
	border-radius: 18px;
	background: var(--panel);
	color: var(--text);
	font-size: 15px;
	font-weight: 600;
	outline: none;
	appearance: none;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.btwpc-field-input:focus {
	background: #fff;
	border-color: rgba(37, 99, 235, 0.38);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.12);
}

.btwpc-field-input::placeholder {
	color: #94a3b8;
	font-weight: 500;
}

.btwpc-auth-button {
	width: 100%;
	min-height: 56px;
	margin-top: 22px;
	padding: 18px 20px;
	border: 0;
	border-radius: 22px;
	background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
	color: #fff;
	font-size: 15px;
	font-weight: 800;
	line-height: 1;
	cursor: pointer;
	display: flex;
	flex-direction: row;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: 0 20px 38px rgba(37, 99, 235, 0.28);
	transition: transform 0.15s ease, filter 0.15s ease;
	-webkit-appearance: none;
	appearance: none;
}

.btwpc-auth-button span {
	display: inline-block;
	white-space: nowrap;
}

.btwpc-auth-button svg {
	width: 18px !important;
	height: 18px !important;
	max-width: 18px;
	max-height: 18px;
	flex: 0 0 18px;
	display: block;
}

.btwpc-auth-button:hover {
	filter: brightness(1.03);
}

.btwpc-auth-button:active {
	transform: scale(0.985);
}

.btwpc-auth-error {
	margin: 0 48px 18px;
	padding: 12px 16px;
	border-radius: 16px;
	background: #fef2f2;
	color: #b91c1c;
	font-size: 14px;
	font-weight: 700;
	line-height: 1.5;
}

.btwpc-auth-footer {
	padding: 22px 28px;
	background: rgba(248, 250, 252, 0.92);
	border-top: 1px solid rgba(226, 232, 240, 0.9);
	text-align: center;
	color: var(--muted);
	font-size: 14px;
	font-weight: 700;
}

@media (max-width: 640px) {
	.btwpc-auth-page {
		padding: 18px 14px 92px;
	}

	.btwpc-auth-card {
		border-radius: 28px;
	}

	.btwpc-auth-header {
		padding: 36px 24px 22px;
	}

	.btwpc-auth-form {
		padding: 0 24px 30px;
	}

	.btwpc-auth-error {
		margin-left: 24px;
		margin-right: 24px;
	}

	.btwpc-auth-footer {
		padding: 18px 20px;
	}

	.btwpc-auth-title {
		font-size: 28px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.btwpc-auth-badge .btwpc-auth-symbol {
		animation: none;
		transform: rotate(8deg);
	}
}
