*, *::before, *::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0
}

:root {
	--navy: #0B2370;
	--navy2: #1A3A9F;
	--navy3: #0D1F5C;
	--navy-dark: #071545;
	--red: #E63946;
	--red2: #C1121F;
	--bg: #F0F2F8;
	--text: #0D1F42;
	--muted: #64748B;
	--border: #DDE3F0;
	--white: #fff;
}

html {
	height: 100%;
	-webkit-font-smoothing: antialiased
}

body {
	min-height: 100vh;
	font-family: 'DM Sans', sans-serif;
	font-size: 16px;
	background: var(--bg);
	color: var(--text);
	display: grid;
	grid-template-columns:1fr 1fr;
	overflow: hidden;
}

@media (max-width: 860px) {
	body {
		grid-template-columns:1fr;
		overflow: auto
	}
}

/* ── LEFT PANEL ── */
.left-panel {
	background: linear-gradient(145deg, var(--navy-dark) 0%, var(--navy) 55%, var(--navy2) 100%);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 3rem;
	position: relative;
	overflow: hidden;
}

@media (max-width: 860px) {
	.left-panel {
		display: none
	}
}

.left-panel::before {
	content: '';
	position: absolute;
	inset: 0;
	background: radial-gradient(ellipse 70% 60% at 80% 20%, rgba(255, 255, 255, .04) 0%, transparent 55%),
	radial-gradient(ellipse 50% 50% at 20% 80%, rgba(230, 57, 70, .12) 0%, transparent 55%);
}

.left-grid {
	position: absolute;
	inset: 0;
	background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px),
	linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px);
	background-size: 48px 48px;
	mask-image: radial-gradient(ellipse 100% 100% at 50% 50%, black 40%, transparent 80%);
}

.left-top {
	position: relative;
	z-index: 1
}

.left-logo {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 1.7rem;
	font-weight: 800;
	color: white;
	text-decoration: none;
	letter-spacing: .02em;
}

.left-logo span {
	color: #FF8C94
}

.left-mid {
	position: relative;
	z-index: 1;
	margin-top: auto;
	padding-top: 4rem
}

.left-mid h2 {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 2.5rem;
	font-weight: 800;
	color: white;
	line-height: 1.06;
	letter-spacing: -.02em;
	max-width: 340px;
}

.left-mid h2 span {
	color: #FF8C94
}

.left-mid p {
	color: rgba(255, 255, 255, .6);
	margin-top: .85rem;
	font-size: .95rem;
	line-height: 1.65;
	max-width: 320px
}

.feature-pills {
	display: flex;
	flex-direction: column;
	gap: .6rem;
	margin-top: 2rem
}

.feature-pill {
	display: flex;
	align-items: center;
	gap: .7rem;
	background: rgba(255, 255, 255, .06);
	border: 1px solid rgba(255, 255, 255, .1);
	border-radius: 10px;
	padding: .65rem 1rem;
	font-size: .85rem;
	color: rgba(255, 255, 255, .8);
	transition: background .2s;
}

.feature-pill:hover {
	background: rgba(255, 255, 255, .1)
}

.pill-ico {
	font-size: 1rem;
	flex-shrink: 0
}

.left-bot {
	position: relative;
	z-index: 1;
	border-top: 1px solid rgba(255, 255, 255, .1);
	padding-top: 1.5rem
}

.left-bot p {
	font-size: .75rem;
	color: rgba(255, 255, 255, .3)
}

.left-bot a {
	color: rgba(255, 255, 255, .5);
	text-decoration: none
}

.left-bot a:hover {
	color: rgba(255, 255, 255, .8)
}

/* ── RIGHT PANEL ── */
.right-panel {
	background: var(--white);
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: space-between;
	padding: 2rem;
	overflow-y: auto;
	min-height: 100vh;
}

.right-top {
	width: 100%;
	display: flex;
	justify-content: space-between;
	align-items: center
}

/* LANG SWITCHER */
.lang-switcher {
	display: flex;
	gap: .35rem;
	align-items: center
}

.lang-btn {
	display: flex;
	align-items: center;
	gap: .3rem;
	background: none;
	border: 1px solid var(--border);
	border-radius: 6px;
	padding: .3rem .6rem;
	cursor: pointer;
	font-size: .78rem;
	font-weight: 600;
	color: var(--muted);
	transition: all .2s;
}

.lang-btn:hover {
	border-color: rgba(11, 35, 112, .2);
	color: var(--navy)
}

.lang-btn.active {
	background: var(--navy);
	color: white;
	border-color: var(--navy)
}

.flag {
	font-size: .9rem;
	line-height: 1
}

.right-top-logo {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 1.3rem;
	font-weight: 800;
	color: var(--navy);
	text-decoration: none;
	display: none;
}

.right-top-logo span {
	color: var(--red)
}

@media (max-width: 860px) {
	.right-top-logo {
		display: block
	}
}

/* FORM AREA */
.form-wrap {
	width: 100%;
	max-width: 410px;
	margin: auto 0
}

.login-header {
	text-align: center;
	margin-bottom: 2rem
}

.login-header h1 {
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 2rem;
	font-weight: 800;
	color: var(--text);
	letter-spacing: -.02em;
	line-height: 1.1;
}

.login-header p {
	color: var(--muted);
	font-size: .9rem;
	margin-top: .4rem
}

/* TABS */
.login-tabs {
	display: flex;
	background: var(--bg);
	border-radius: 10px;
	padding: .3rem;
	margin-bottom: 1.75rem;
	gap: .25rem;
}

.tab-btn {
	flex: 1;
	padding: .55rem;
	border-radius: 7px;
	border: none;
	background: transparent;
	cursor: pointer;
	font-family: 'DM Sans', sans-serif;
	font-size: .85rem;
	font-weight: 600;
	color: var(--muted);
	transition: all .22s;
}

.tab-btn.active {
	background: white;
	color: var(--navy);
	box-shadow: 0 1px 4px rgba(11, 35, 112, .12)
}

/* FORM */
.form-group {
	position: relative;
	margin-bottom: 1rem
}

.form-label {
	display: block;
	font-size: .78rem;
	font-weight: 700;
	color: var(--navy);
	letter-spacing: .01em;
	margin-bottom: .4rem;
}

.form-input {
	width: 100%;
	padding: .78rem 1rem;
	border: 1px solid var(--border);
	border-radius: 10px;
	font-family: 'DM Sans', sans-serif;
	font-size: .95rem;
	color: var(--text);
	background: var(--bg);
	transition: border-color .2s, background .2s, box-shadow .2s;
	outline: none;
}

.form-input::placeholder {
	color: #b0bcc8
}

.form-input:focus {
	border-color: var(--navy);
	background: white;
	box-shadow: 0 0 0 3px rgba(11, 35, 112, .08);
}

.form-input.error {
	border-color: var(--red);
	background: rgba(230, 57, 70, .03)
}

.form-input.error:focus {
	box-shadow: 0 0 0 3px rgba(230, 57, 70, .1)
}

.form-input.success {
	border-color: #00b87c
}

.pwd-wrap {
	position: relative
}

.pwd-wrap .form-input {
	padding-right: 3rem
}

.pwd-toggle {
	position: absolute;
	right: .85rem;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	cursor: pointer;
	color: var(--muted);
	font-size: 1rem;
	padding: .25rem;
	transition: color .2s;
	line-height: 1;
}

.pwd-toggle:hover {
	color: var(--navy)
}

.field-error {
	font-size: .75rem;
	color: var(--red);
	margin-top: .3rem;
	display: none
}

.field-error.show {
	display: block
}

/* PIN INPUT */
.pin-row {
	display: flex;
	gap: .6rem;
	justify-content: center;
	margin-bottom: 1rem
}

.pin-digit {
	width: 52px;
	height: 58px;
	text-align: center;
	border: 1px solid var(--border);
	border-radius: 10px;
	font-size: 1.4rem;
	font-weight: 700;
	color: var(--text);
	background: var(--bg);
	font-family: 'Barlow Condensed', sans-serif;
	transition: border-color .2s, box-shadow .2s, background .2s;
	outline: none;
}

.pin-digit:focus {
	border-color: var(--navy);
	background: white;
	box-shadow: 0 0 0 3px rgba(11, 35, 112, .08)
}

.pin-digit.filled {
	border-color: var(--navy2);
	background: rgba(11, 35, 112, .04)
}

/* SESSION SELECT */
.session-row {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin-bottom: 1.25rem;
}

.session-label {
	font-size: .82rem;
	color: var(--muted);
	font-weight: 500
}

.session-select-wrap {
	position: relative
}

.session-select-wrap::after {
	content: '▾';
	position: absolute;
	right: .65rem;
	top: 50%;
	transform: translateY(-50%);
	pointer-events: none;
	color: var(--muted);
	font-size: .78rem
}

.session-select {
	appearance: none;
	-webkit-appearance: none;
	border: 1px solid var(--border);
	border-radius: 8px;
	padding: .35rem 1.8rem .35rem .7rem;
	font-family: 'DM Sans', sans-serif;
	font-size: .82rem;
	font-weight: 600;
	color: var(--text);
	background: var(--bg);
	cursor: pointer;
	outline: none;
	transition: border-color .2s;
}

.session-select:focus {
	border-color: var(--navy)
}

/* SUBMIT */
.btn-submit {
	width: 100%;
	padding: .9rem;
	border: none;
	border-radius: 10px;
	background: var(--navy);
	color: white;
	cursor: pointer;
	font-family: 'Barlow Condensed', sans-serif;
	font-size: 1.1rem;
	font-weight: 800;
	letter-spacing: .04em;
	text-transform: uppercase;
	transition: all .22s;
	position: relative;
	overflow: hidden;
	margin-top: .25rem;
}

.btn-submit::after {
	content: '';
	position: absolute;
	inset: 0;
	background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .1), transparent);
	transform: translateX(-100%);
	transition: transform .4s;
}

.btn-submit:hover {
	background: var(--navy3);
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(11, 35, 112, .3)
}

.btn-submit:hover::after {
	transform: translateX(100%)
}

.btn-submit:active {
	transform: translateY(0)
}

.btn-submit.loading {
	pointer-events: none;
	opacity: .75
}

.btn-submit.loading span {
	display: none
}

.btn-submit.loading::before {
	content: '';
	display: inline-block;
	width: 18px;
	height: 18px;
	border: 2px solid rgba(255, 255, 255, .3);
	border-top-color: white;
	border-radius: 50%;
	animation: spin .7s linear infinite;
	vertical-align: middle
}

@keyframes spin {
	to {
		transform: rotate(360deg)
	}
}

/* AUX LINKS */
.aux-links {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: .55rem;
	margin-top: 1.5rem
}

.aux-link {
	color: var(--navy2);
	text-decoration: none;
	font-size: .85rem;
	font-weight: 500;
	transition: color .2s;
	display: flex;
	align-items: center;
	gap: .35rem
}

.aux-link:hover {
	color: var(--red)
}

.aux-divider {
	width: 1px;
	height: 1px;
	background: var(--border);
	align-self: stretch;
	display: none
}

.aux-links-row {
	display: flex;
	gap: 1.5rem;
	justify-content: center;
	flex-wrap: wrap;
	margin-top: .75rem
}

.aux-links-row a {
	color: var(--muted);
	text-decoration: none;
	font-size: .8rem;
	font-weight: 500;
	display: flex;
	align-items: center;
	gap: .3rem;
	transition: color .2s;
	padding: .4rem .6rem;
	border-radius: 7px;
	border: 1px solid var(--border)
}

.aux-links-row a:hover {
	color: var(--navy);
	border-color: rgba(11, 35, 112, .2);
	background: rgba(11, 35, 112, .03)
}

/* RIGHT BOT */
.right-bot {
	width: 100%;
	text-align: center;
	max-width: 380px
}

.right-bot p {
	font-size: .75rem;
	color: var(--muted);
	line-height: 1.6
}

.right-bot a {
	color: var(--navy2);
	text-decoration: none
}

.right-bot a:hover {
	text-decoration: underline
}

/* ERROR SHAKE */
@keyframes shake {
	0%, 100% {
		transform: translateX(0)
	}
	20%, 60% {
		transform: translateX(-5px)
	}
	40%, 80% {
		transform: translateX(5px)
	}
}

.shake {
	animation: shake .4s ease
}

/* FADE IN */
@keyframes fadeUp {
	from {
		opacity: 0;
		transform: translateY(18px)
	}
	to {
		opacity: 1;
		transform: translateY(0)
	}
}

.form-wrap {
	animation: fadeUp .5s ease both
}

/* ALERT */
.alert {
	display: none;
	padding: .75rem 1rem;
	border-radius: 9px;
	font-size: .85rem;
	margin-bottom: 1rem;
	align-items: center;
	gap: .6rem;
}

.alert.show {
	display: flex
}

.alert.error {
	background: rgba(230, 57, 70, .06);
	border: 1px solid rgba(230, 57, 70, .25);
	color: #a01520
}

.alert.success {
	background: rgba(0, 184, 124, .06);
	border: 1px solid rgba(0, 184, 124, .25);
	color: #0a5c3c
}
