@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@500;600;700&family=DM+Sans:wght@400;500;600;700;800&display=swap');

:root {
	--blue-deep: #0750b8;
	--blue-main: #0b7ed6;
	--blue-light: #23b8ef;

	--form-bg: #f1f4fc;
	--white: #ffffff;

	--text-main: #14213d;
	--text-muted: #8490a3;

	--border: #dde6f5;
	--danger-bg: #fff1f1;
	--danger-border: #ffbcbc;
	--danger-text: #d71920;

	--radius-xl: 24px;
	--radius-md: 14px;

	--shadow: 0 26px 70px rgba(8, 48, 115, 0.16);
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
}

html,
body {
	width: 100%;
	height: 100%;
	overflow: hidden;
}

body {
	font-family: 'DM Sans', sans-serif;
	background: #e8eef8;
	color: var(--text-main);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

#login-root {
	width: 100%;
	height: 100%;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* MAIN CARD */

.login-shell {
	width: 100%;
	max-width: 1120px;
	height: min(620px, calc(100vh - 48px));
	display: grid;
	grid-template-columns: 52.5% 47.5%;
	background: var(--white);
	border-radius: var(--radius-xl);
	overflow: hidden;
	box-shadow: var(--shadow);
}

/* LEFT PANEL */

.hero-panel {
	position: relative;
	overflow: hidden;
	color: var(--white);
	background: linear-gradient(135deg, #0750b8 0%, #0d80d8 58%, #22b9ef 100%);
}

.hero-panel::before {
	content: '';
	position: absolute;
	width: 330px;
	height: 330px;
	right: -95px;
	top: -110px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.08);
	z-index: 1;
}

.hero-panel::after {
	content: '';
	position: absolute;
	width: 230px;
	height: 230px;
	left: -120px;
	bottom: -115px;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.07);
	z-index: 1;
}

.hero-inner {
	position: relative;
	z-index: 3;
	height: 100%;
	padding: 36px 48px;
	display: grid;
	grid-template-rows: auto 1fr auto;
	row-gap: 18px;
}

.system-identity {
	position: relative;
	z-index: 4;
}

.system-name {
	font-family: 'Playfair Display', serif;
	font-size: 32px;
	font-weight: 700;
	letter-spacing: 0.04em;
	line-height: 1;
	margin-bottom: 8px;
}

.system-subtext {
	font-size: 9px;
	font-weight: 800;
	letter-spacing: 0.1em;
	line-height: 1.5;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
	max-width: 460px;
	margin-bottom: 6px;
}

.system-subtitle {
	font-size: 13px;
	font-weight: 600;
	color: rgba(255, 255, 255, 0.92);
}

.hero-main {
	align-self: center;
}

.hero-main h1 {
	font-size: 46px;
	line-height: 1.08;
	font-weight: 800;
	letter-spacing: -0.045em;
	max-width: 470px;
	margin-bottom: 14px;
}

.hero-description {
	font-size: 14.5px;
	line-height: 1.6;
	color: rgba(255, 255, 255, 0.88);
	max-width: 465px;
	margin-bottom: 22px;
}

.feature-list {
	list-style: none;
	display: grid;
	gap: 11px;
}

.feature-list li {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 16px;
	font-weight: 700;
	color: rgba(255, 255, 255, 0.95);
}

.feature-list span {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: rgba(255, 255, 255, 0.15);
	flex-shrink: 0;
}

.feature-list i {
	font-size: 15px;
	color: var(--white);
}

/* TEXT CAROUSEL */

.text-carousel-area {
	width: 100%;
	max-width: 500px;
	min-height: 86px;
	align-self: end;
	padding-bottom: 2px;
}

.text-carousel {
	position: relative;
	min-height: 62px;
}

.text-slide {
	position: absolute;
	inset: 0;
	opacity: 0;
	transform: translateY(8px);
	transition: opacity 0.35s ease, transform 0.35s ease;
	pointer-events: none;
}

.text-slide.is-active {
	opacity: 1;
	transform: translateY(0);
	pointer-events: auto;
}

.text-slide h3 {
	font-size: 20px;
	line-height: 1.2;
	font-weight: 800;
	margin-bottom: 6px;
}

.text-slide p {
	font-size: 13px;
	line-height: 1.5;
	color: rgba(255, 255, 255, 0.84);
	max-width: 470px;
}

.carousel-dots {
	display: flex;
	align-items: center;
	gap: 7px;
	margin-top: 10px;
}

.carousel-dot {
	width: 7px;
	height: 7px;
	border: none;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.38);
	cursor: pointer;
	transition: all 0.25s ease;
}

.carousel-dot.is-active {
	width: 24px;
	background: var(--white);
}

/* DECORATIVE DOTS */

.dot-pattern {
	position: absolute;
	width: 98px;
	height: 98px;
	background-image: radial-gradient(rgba(255, 255, 255, 0.82) 24%, transparent 28%);
	background-size: 16px 16px;
	opacity: 0.25;
	z-index: 2;
}

.dot-top {
	top: 36px;
	left: 38px;
}

.dot-bottom {
	right: 36px;
	bottom: 36px;
}

.hero-glow {
	display: none;
}

/* RIGHT PANEL */

.form-panel {
	background: var(--form-bg);
	padding: 36px 48px;
	display: grid;
	grid-template-rows: auto 1fr;
}

.company-header {
	display: flex;
	align-items: center;
	justify-content: flex-start;
}

.company-brand {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	font-size: 13px;
	font-weight: 800;
	color: var(--text-main);
}

.company-brand img {
	width: 30px;
	height: 30px;
	object-fit: contain;
	border-radius: 50%;
}

.form-wrap {
	width: 100%;
	max-width: 390px;
	align-self: center;
	justify-self: center;
	margin-top: -8px;
}

.form-header {
	margin-bottom: 22px;
}

.eyebrow {
	font-size: 10px;
	font-weight: 800;
	letter-spacing: 0.22em;
	text-transform: uppercase;
	color: #5477df;
	margin-bottom: 8px;
}

.form-header h2 {
	font-size: 42px;
	line-height: 1;
	font-weight: 800;
	letter-spacing: -0.04em;
	color: var(--text-main);
	margin-bottom: 10px;
}

.form-header p {
	font-size: 13.5px;
	line-height: 1.5;
	color: var(--text-muted);
}

.login-alert {
	background: var(--danger-bg);
	border: 1px solid var(--danger-border);
	color: var(--danger-text);
	padding: 11px 14px;
	border-radius: var(--radius-md);
	font-size: 13px;
	font-weight: 800;
	margin-bottom: 16px;
}

.login-form {
	display: flex;
	flex-direction: column;
	gap: 16px;
}

.input-group {
	display: flex;
	flex-direction: column;
	gap: 7px;
}

.input-group label {
	font-size: 13px;
	font-weight: 700;
	color: #96a0b2;
}

.input-wrap {
	position: relative;
}

.input-wrap > i {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: #9aa7bd;
	font-size: 16px;
	z-index: 2;
	transition: color 0.2s ease;
}

.input-wrap input {
	width: 100%;
	height: 50px;
	border: 1px solid var(--border);
	border-radius: 14px;
	background: var(--white);
	outline: none;
	padding: 0 48px 0 46px;
	font-family: inherit;
	font-size: 14px;
	font-weight: 600;
	color: var(--text-main);
	box-shadow: 0 8px 20px rgba(20, 33, 61, 0.045);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-wrap input::placeholder {
	color: #aab3c4;
	font-weight: 500;
}

.input-wrap input:focus {
	border-color: #638df1;
	box-shadow:
		0 0 0 4px rgba(99, 141, 241, 0.13),
		0 8px 20px rgba(20, 33, 61, 0.045);
}

.input-wrap:focus-within > i {
	color: #5579e5;
}

.password-toggle {
	position: absolute;
	right: 12px;
	top: 50%;
	transform: translateY(-50%);
	border: none;
	background: transparent;
	color: #9aa7bd;
	font-size: 17px;
	cursor: pointer;
	width: 32px;
	height: 32px;
	border-radius: 50%;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, color 0.2s ease;
}

.password-toggle:hover {
	color: #5579e5;
	background: rgba(85, 121, 229, 0.08);
}

.login-btn {
	width: 100%;
	height: 52px;
	border: none;
	border-radius: 14px;
	cursor: pointer;
	background: linear-gradient(90deg, #5374ee 0%, #6baaf4 100%);
	color: var(--white);
	font-family: inherit;
	font-size: 14px;
	font-weight: 800;
	letter-spacing: 0.12em;
	text-transform: uppercase;
	box-shadow: 0 14px 28px rgba(83, 116, 238, 0.26);
	transition: transform 0.2s ease, box-shadow 0.2s ease;
	margin-top: 6px;
}

.login-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 18px 34px rgba(83, 116, 238, 0.31);
}

.login-btn:active {
	transform: translateY(0);
}

.dynamic-alert {
	display: flex;
	align-items: center;
	gap: 9px;
	animation: alertShake 0.35s ease both;
}

.dynamic-alert i {
	font-size: 15px;
}

@keyframes alertShake {
	0%, 100% {
		transform: translateX(0);
	}
	25% {
		transform: translateX(-4px);
	}
	50% {
		transform: translateX(4px);
	}
	75% {
		transform: translateX(-2px);
	}
}

.dynamic-field {
	position: relative;
}

.dynamic-field label {
	transition: color 0.2s ease, transform 0.2s ease;
}

.dynamic-field:focus-within label {
	color: #5579e5;
	transform: translateX(2px);
}

.dynamic-field.has-value label {
	color: #6c7890;
}

.dynamic-field.has-error label {
	color: var(--danger-text);
}

.dynamic-field.has-error .input-wrap input {
	border-color: var(--danger-border);
	box-shadow: 0 0 0 4px rgba(215, 25, 32, 0.08);
}

.dynamic-field.has-error .input-wrap > i {
	color: var(--danger-text);
}

.status-icon {
	position: absolute;
	right: 48px;
	top: 50%;
	transform: translateY(-50%);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	pointer-events: none;
}

.status-icon.valid {
	color: #1fb56b;
}

.status-icon.invalid {
	color: var(--danger-text);
}

.field-error {
	font-size: 11.5px;
	font-weight: 700;
	color: var(--danger-text);
	margin-top: 2px;
	animation: fadeSlide 0.2s ease both;
}

@keyframes fadeSlide {
	from {
		opacity: 0;
		transform: translateY(-3px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.form-options {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-top: -4px;
}

.remember-check {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 12.5px;
	font-weight: 700;
	color: #8792a7;
	cursor: pointer;
	user-select: none;
}

.remember-check input {
	display: none;
}

.remember-check span {
	width: 16px;
	height: 16px;
	border-radius: 5px;
	border: 1.5px solid #cfd8ea;
	background: #ffffff;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s ease;
}

.remember-check input:checked + span {
	background: linear-gradient(135deg, #5276f1, #70aef6);
	border-color: transparent;
	box-shadow: 0 6px 12px rgba(82, 118, 241, 0.22);
}

.remember-check input:checked + span::after {
	content: '\F633';
	font-family: bootstrap-icons;
	color: #ffffff;
	font-size: 10px;
	font-weight: 900;
}

.login-btn:disabled {
	cursor: not-allowed;
	opacity: 0.58;
	box-shadow: none;
	transform: none;
}

.login-btn.is-loading {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 9px;
	pointer-events: none;
}

.spinner {
	width: 15px;
	height: 15px;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.45);
	border-top-color: #ffffff;
	animation: spin 0.75s linear infinite;
}

@keyframes spin {
	to {
		transform: rotate(360deg);
	}
}

.input-wrap input {
	transition:
		border-color 0.2s ease,
		box-shadow 0.2s ease,
		background 0.2s ease,
		transform 0.2s ease;
}

.input-wrap input:focus {
	transform: translateY(-1px);
	background: #ffffff;
}

.input-wrap {
	transition: transform 0.2s ease;
}

.dynamic-field:focus-within .input-wrap {
	transform: translateY(-1px);
}

@media (max-height: 680px) and (min-width: 901px) {
	.form-options {
		margin-top: -6px;
	}

	.remember-check {
		font-size: 11.5px;
	}

	.field-error {
		font-size: 10.5px;
	}
}

@media (max-width: 900px) {
	html,
	body {
		overflow: auto;
	}

	body {
		padding: 16px;
	}

	.login-shell {
		height: auto;
		min-height: auto;
		max-width: 520px;
		grid-template-columns: 1fr;
	}

	.hero-panel {
		display: none;
	}

	.form-panel {
		min-height: 560px;
		padding: 34px 28px;
	}

	.form-wrap {
		max-width: 100%;
		margin-top: 0;
	}
}

/* SHORT DESKTOP HEIGHT */

@media (max-height: 680px) and (min-width: 901px) {
	body {
		padding: 14px;
	}

	.login-shell {
		height: calc(100vh - 28px);
		max-width: 1040px;
	}

	.hero-inner {
		padding: 26px 42px;
		row-gap: 12px;
	}

	.system-name {
		font-size: 28px;
	}

	.hero-main h1 {
		font-size: 38px;
		margin-bottom: 10px;
	}

	.hero-description {
		font-size: 13px;
		margin-bottom: 16px;
	}

	.feature-list {
		gap: 8px;
	}

	.feature-list li {
		font-size: 14px;
	}

	.feature-list span {
		width: 28px;
		height: 28px;
	}

	.text-carousel-area {
		min-height: 70px;
	}

	.text-carousel {
		min-height: 48px;
	}

	.text-slide h3 {
		font-size: 17px;
	}

	.text-slide p {
		font-size: 12px;
	}

	.form-panel {
		padding: 28px 42px;
	}

	.form-wrap {
		margin-top: 0;
	}

	.form-header h2 {
		font-size: 36px;
	}

	.form-header {
		margin-bottom: 16px;
	}

	.login-form {
		gap: 13px;
	}

	.input-wrap input {
		height: 44px;
	}

	.login-btn {
		height: 46px;
	}
}