:root {
	--brand: #2563eb;
	--brand-dark: #1d4ed8;
	--ink: #0f172a;
	--muted: #64748b;
	--line: #e2e8f0;
	--bg: #f8fafc;
	--danger: #dc2626;
}

* { box-sizing: border-box; }

html, body { height: 100%; margin: 0; }

body {
	font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
	color: var(--ink);
	background: var(--bg);
	-webkit-font-smoothing: antialiased;
}

.login-shell {
	display: flex;
	min-height: 100vh;
}

/* ---------- Brand panel ---------- */
.brand-panel {
	flex: 1 1 46%;
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 48px 56px;
	color: #fff;
	background:
		radial-gradient(circle at 15% 10%, rgba(59, 130, 246, .35), transparent 45%),
		radial-gradient(circle at 90% 90%, rgba(30, 64, 175, .55), transparent 50%),
		linear-gradient(160deg, #0f172a 0%, #172554 100%);
	overflow: hidden;
}

.brand-panel::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(rgba(255, 255, 255, .04) 1px, transparent 1px),
		linear-gradient(90deg, rgba(255, 255, 255, .04) 1px, transparent 1px);
	background-size: 40px 40px;
	mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent 80%);
	-webkit-mask-image: linear-gradient(to bottom, rgba(0, 0, 0, .7), transparent 80%);
	pointer-events: none;
}

.brand-panel > * { position: relative; z-index: 1; }

.brand-mark {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 20px;
	font-weight: 700;
	letter-spacing: .2px;
}

.brand-mark .icon {
	width: 42px;
	height: 42px;
	border-radius: 11px;
	background: var(--brand);
	display: grid;
	place-items: center;
	box-shadow: 0 8px 20px rgba(37, 99, 235, .45);
}

.brand-copy h2 {
	font-size: 34px;
	line-height: 1.2;
	font-weight: 700;
	margin: 0 0 14px;
	max-width: 440px;
}

.brand-copy p {
	margin: 0 0 28px;
	max-width: 420px;
	color: #cbd5e1;
	font-size: 15px;
	line-height: 1.6;
}

.feature-list {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

.feature-list li {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 14.5px;
	color: #e2e8f0;
}

.feature-list svg {
	flex: none;
	width: 20px;
	height: 20px;
	color: #60a5fa;
}

.brand-foot { font-size: 13px; color: #94a3b8; }

/* ---------- Form panel ---------- */
.form-panel {
	flex: 1 1 54%;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 32px 24px;
}

.card {
	width: 100%;
	max-width: 420px;
	background: #fff;
	border: 1px solid var(--line);
	border-radius: 16px;
	padding: 40px 36px 32px;
	box-shadow: 0 10px 30px rgba(15, 23, 42, .06);
}

.card .mobile-brand {
	display: none;
	align-items: center;
	gap: 10px;
	font-weight: 700;
	margin-bottom: 24px;
}

.card .mobile-brand .icon {
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: var(--brand);
	display: grid;
	place-items: center;
}

.card h1 {
	margin: 0 0 6px;
	font-size: 24px;
	font-weight: 700;
}

.card .sub {
	margin: 0 0 28px;
	color: var(--muted);
	font-size: 14.5px;
}

.field { margin-bottom: 18px; }

.field label {
	display: block;
	margin-bottom: 7px;
	font-size: 13.5px;
	font-weight: 500;
	color: #334155;
}

.input-wrap { position: relative; }

.input-wrap input {
	width: 100%;
	height: 46px;
	padding: 0 14px;
	font: inherit;
	font-size: 15px;
	color: var(--ink);
	background: #fff;
	border: 1px solid #cbd5e1;
	border-radius: 10px;
	outline: none;
	transition: border-color .15s, box-shadow .15s;
}

.input-wrap input::placeholder { color: #94a3b8; }

.input-wrap input:focus {
	border-color: var(--brand);
	box-shadow: 0 0 0 4px rgba(37, 99, 235, .15);
}

.input-wrap input.is-invalid { border-color: var(--danger); }

.input-wrap input.is-invalid:focus { box-shadow: 0 0 0 4px rgba(220, 38, 38, .15); }

.input-wrap.has-toggle input { padding-right: 46px; }

.toggle-pw {
	position: absolute;
	top: 0;
	right: 0;
	height: 46px;
	width: 46px;
	border: 0;
	background: transparent;
	color: #94a3b8;
	cursor: pointer;
	display: grid;
	place-items: center;
	border-radius: 0 10px 10px 0;
}

.toggle-pw:hover { color: var(--ink); }

.toggle-pw:focus-visible { outline: 2px solid var(--brand); outline-offset: -2px; }

.toggle-pw svg { width: 20px; height: 20px; }

.toggle-pw .eye-off { display: none; }

.toggle-pw.showing .eye { display: none; }

.toggle-pw.showing .eye-off { display: block; }

.error-text {
	display: block;
	margin-top: 6px;
	font-size: 13px;
	color: var(--danger);
}

.row-between {
	display: flex;
	align-items: center;
	justify-content: space-between;
	margin: 4px 0 22px;
	font-size: 13.5px;
}

.remember {
	display: flex;
	align-items: center;
	gap: 8px;
	color: #475569;
	cursor: pointer;
	user-select: none;
}

.remember input {
	width: 16px;
	height: 16px;
	accent-color: var(--brand);
	margin: 0;
}

.row-between a,
.link {
	color: var(--brand);
	text-decoration: none;
	font-weight: 500;
}

.row-between a:hover { color: var(--brand-dark); text-decoration: underline; }

.btn-submit {
	width: 100%;
	height: 48px;
	border: 0;
	border-radius: 10px;
	background: var(--brand);
	color: #fff;
	font: inherit;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: background .15s, transform .05s, box-shadow .15s;
	box-shadow: 0 6px 16px rgba(37, 99, 235, .3);
}

.btn-submit:hover { background: var(--brand-dark); }

.btn-submit:active { transform: translateY(1px); }

.btn-submit:focus-visible { outline: 3px solid rgba(37, 99, 235, .35); outline-offset: 2px; }

.btn-submit[disabled] { opacity: .7; cursor: not-allowed; }

.card-foot {
	margin-top: 26px;
	padding-top: 18px;
	border-top: 1px solid var(--line);
	text-align: center;
	font-size: 12.5px;
	color: var(--muted);
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.brand-panel { display: none; }

	.form-panel { padding: 24px 16px; }

	.card .mobile-brand { display: flex; }
}

@media (max-width: 480px) {
	.card { padding: 28px 20px 24px; border-radius: 14px; }
}

/* ---------- Alerts / helper text (shared by the auth pages) ---------- */
.alert-box {
	margin: 0 0 18px;
	padding: 11px 14px;
	border-radius: 10px;
	font-size: 13.5px;
	border: 1px solid;
}

.alert-box.success { background: #f0fdf4; border-color: #bbf7d0; color: #166534; }

.alert-box.error { background: #fef2f2; border-color: #fecaca; color: #991b1b; }

.back-link { display: block; margin-top: 18px; text-align: center; font-size: 13.5px; }

.back-link a { color: var(--brand); text-decoration: none; font-weight: 500; }

.back-link a:hover { color: var(--brand-dark); text-decoration: underline; }
