:root {
	--login-ink: #101828;
	--login-muted: #667085;
	--login-line: #dfe4ec;
	--login-surface: rgba(255, 255, 255, 0.96);
	--login-blue: var(--color-blue, #478dff);
	--login-page-bg: #eef2f8;
	--login-workspace-bg:
		radial-gradient(circle at 100% 0, rgba(71,141,255,.12), transparent 30%),
		linear-gradient(180deg, #f8faff 0%, #eef3f9 100%);
	--login-brand-bg:
		radial-gradient(circle at 8% 85%, rgba(125, 61, 180, 0.55), transparent 36%),
		radial-gradient(circle at 82% 12%, rgba(120, 184, 255, 0.45), transparent 32%),
		linear-gradient(145deg, #0f285e 0%, #214f9d 48%, #397be6 100%);
	--login-card-border: rgba(208, 216, 229, .9);
	--login-card-shadow: 0 30px 70px rgba(23, 43, 77, .13);
	--login-control-bg: #fff;
	--login-control-hover: #f2f4f7;
	--login-control-icon: #98a2b3;
	--login-legal: #8792a4;
	--login-error-text: #9c1515;
	--login-error-border: #ffc5c5;
	--login-error-bg: #fff1f1;
	--login-success-text: #2d6810;
	--login-success-border: #cbe7bc;
	--login-success-bg: #f2faed;
	--login-primary-badge-text: #2f6f11;
	--login-primary-badge-bg: #ecf7e5;
}

[data-theme="dark"] {
	--login-ink: #f5f7fb;
	--login-muted: #a4adbd;
	--login-line: #344054;
	--login-surface: rgba(17, 17, 17, .96);
	--login-page-bg: #05070b;
	--login-workspace-bg:
		radial-gradient(circle at 100% 0, rgba(71,141,255,.13), transparent 32%),
		linear-gradient(180deg, #0b1019 0%, #05070b 100%);
	--login-brand-bg:
		radial-gradient(circle at 8% 85%, rgba(125, 61, 180, .42), transparent 36%),
		radial-gradient(circle at 82% 12%, rgba(71, 141, 255, .28), transparent 32%),
		linear-gradient(145deg, #071329 0%, #102b58 48%, #17478f 100%);
	--login-card-border: rgba(71, 85, 105, .72);
	--login-card-shadow: 0 30px 78px rgba(0, 0, 0, .48);
	--login-control-bg: #171b23;
	--login-control-hover: #252c38;
	--login-control-icon: #7f8a9d;
	--login-legal: #7f8a9d;
	--login-error-text: #ffb4b4;
	--login-error-border: #6f3030;
	--login-error-bg: #321a1d;
	--login-success-text: #b9e69e;
	--login-success-border: #3c6330;
	--login-success-bg: #182b17;
	--login-primary-badge-text: #b9e69e;
	--login-primary-badge-bg: #20351c;
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

body.login-page {
	margin: 0;
	min-height: 100vh;
	font-family: var(--font-body, Inter, system-ui, sans-serif);
	color: var(--login-ink);
	background: var(--login-page-bg);
	overflow-x: hidden;
}

button, input { font: inherit; }

.login-shell {
	display: grid;
	grid-template-columns: minmax(360px, 0.92fr) minmax(520px, 1.08fr);
	min-height: 100vh;
}

.login-brand {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	min-height: 100%;
	padding: clamp(36px, 5vw, 76px);
	overflow: hidden;
	color: #fff;
	background: var(--login-brand-bg);
}

.login-brand::before,
.login-brand::after {
	content: "";
	position: absolute;
	border: 1px solid rgba(255,255,255,.14);
	border-radius: 50%;
	pointer-events: none;
}

.login-brand::before { width: 520px; height: 520px; right: -310px; top: 13%; }
.login-brand::after { width: 300px; height: 300px; left: -170px; bottom: -80px; }

.login-brand__mark {
	position: relative;
	z-index: 1;
	display: grid;
	place-items: center;
	width: 68px;
	height: 68px;
	border-radius: var(--radius-lg, 12px);
	background: rgba(255,255,255,.96);
	box-shadow: 0 18px 38px rgba(4, 21, 56, .25);
}

.login-brand__mark img { width: 48px; height: 48px; display: block; }

.login-brand__copy { position: relative; z-index: 1; max-width: 620px; padding: 64px 0; }

.login-brand__eyebrow,
.login-card__eyebrow {
	margin: 0 0 14px;
	font: 800 .78rem/1 var(--font-body, Inter, sans-serif);
	letter-spacing: .16em;
}

.login-brand__eyebrow { color: rgba(255,255,255,.72); }

.login-brand h1 {
	margin: 0;
	font: 800 clamp(3rem, 4.1vw, 4.75rem)/.96 var(--font-display, Montserrat, Inter, sans-serif);
	letter-spacing: -.055em;
}

.login-brand h1 span { display: block; }

.login-brand__copy > p:last-child {
	max-width: 540px;
	margin: 28px 0 0;
	font-size: clamp(1.02rem, 1.5vw, 1.28rem);
	line-height: 1.65;
	color: rgba(255,255,255,.78);
}

.login-brand__detail { position: relative; z-index: 1; display: flex; gap: 8px; }
.login-brand__detail span { width: 30px; height: 4px; border-radius: 999px; background: rgba(255,255,255,.28); }
.login-brand__detail span:first-child { width: 68px; background: #fff; }

.login-workspace {
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 22px;
	padding: clamp(30px, 6vw, 88px);
	background: var(--login-workspace-bg);
}

.login-card {
	width: min(100%, 560px);
	padding: clamp(30px, 4vw, 52px);
	border: 1px solid var(--login-card-border);
	border-radius: 24px;
	background: var(--login-surface);
	box-shadow: var(--login-card-shadow);
}

.login-card--office-selector { width: min(100%, 720px); }

.login-card__brand { display: none; align-items: center; gap: 10px; margin-bottom: 36px; font-weight: 800; }
.login-card__brand img { width: 34px; height: 34px; }

.login-stage { animation: login-stage-in .24s ease both; }
.login-stage[hidden] { display: none !important; }

@keyframes login-stage-in { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }

.login-card__header { margin-bottom: 32px; }
.login-card__eyebrow { color: var(--login-blue); }
.login-card__header h2 {
	margin: 0;
	font: 800 clamp(2rem, 3vw, 2.65rem)/1.06 var(--font-display, Montserrat, Inter, sans-serif);
	letter-spacing: -.035em;
}
.login-card__header > p:last-child { margin: 14px 0 0; color: var(--login-muted); line-height: 1.55; }

.login-form { display: grid; gap: 22px; }
.login-field { display: grid; gap: 9px; }
.login-field label { font-weight: 750; font-size: .9rem; }

.login-control {
	display: grid;
	grid-template-columns: 24px minmax(0, 1fr) auto;
	align-items: center;
	gap: 12px;
	min-height: 56px;
	padding: 0 14px 0 16px;
	border: 1px solid var(--login-line);
	border-radius: var(--radius-md, 8px);
	background: var(--login-control-bg);
	transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}

.login-control:focus-within { border-color: var(--login-blue); box-shadow: 0 0 0 4px rgba(71,141,255,.14); }
.login-control.is-invalid { border-color: var(--color-red, #c81111); box-shadow: 0 0 0 4px rgba(200,17,17,.09); }
.login-control > svg { width: 22px; height: 22px; fill: none; stroke: var(--login-control-icon); stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.login-control input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--login-ink); background: transparent; font-weight: 650; }
.login-control input::placeholder { color: var(--login-control-icon); font-weight: 500; }

.login-control__action {
	display: grid;
	place-items: center;
	width: 36px;
	height: 36px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	color: var(--login-muted);
	background: transparent;
	cursor: pointer;
}
.login-control__action:hover { background: var(--login-control-hover); color: var(--login-blue); }
.login-control__action svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.7; }

.login-field__error { display: none; margin: 0; color: var(--color-red, #c81111); font-size: .82rem; font-weight: 650; }
.login-field__error:not(:empty) { display: block; }
.login-message { display: none; padding: 12px 14px; border-radius: var(--radius-md, 8px); font-size: .88rem; font-weight: 650; line-height: 1.4; }
.login-message.is-visible { display: block; }
.login-message.is-error { color: var(--login-error-text); border: 1px solid var(--login-error-border); background: var(--login-error-bg); }
.login-message.is-success { color: var(--login-success-text); border: 1px solid var(--login-success-border); background: var(--login-success-bg); }

.login-submit {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 11px;
	min-height: 56px;
	padding: 0 22px;
	border: 0;
	border-radius: var(--radius-md, 8px);
	color: #fff;
	background: var(--login-blue);
	box-shadow: 0 12px 24px rgba(71,141,255,.24);
	font-weight: 800;
	cursor: pointer;
	transition: transform .18s ease, filter .18s ease;
}
.login-submit:hover { filter: brightness(.96); transform: translateY(-1px); }
.login-submit:disabled { cursor: wait; opacity: .7; transform: none; }
.login-submit svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.login-support { margin: 28px 0 0; color: var(--login-muted); text-align: center; font-size: .86rem; }
.login-support span { color: var(--login-ink); font-weight: 700; }
.login-support a { color: var(--login-blue); font-weight: 750; text-decoration: none; }
.login-support a:hover { text-decoration: underline; }
.login-support a:focus-visible { border-radius: 3px; outline: 3px solid rgba(71,141,255,.22); outline-offset: 3px; }
.login-legal { margin: 0; color: var(--login-legal); font-size: .78rem; }

.office-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.office-option {
	position: relative;
	display: flex;
	align-items: center;
	gap: 13px;
	min-width: 0;
	min-height: 96px;
	padding: 16px;
	border: 1px solid var(--login-line);
	border-radius: var(--radius-lg, 12px);
	color: var(--login-ink);
	background: var(--login-control-bg);
	text-align: left;
	cursor: pointer;
	transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}
.office-option:hover, .office-option:focus-visible { border-color: var(--login-blue); box-shadow: 0 8px 20px rgba(71,141,255,.14); transform: translateY(-1px); outline: 0; }
.office-option__icon { display: grid; place-items: center; flex: 0 0 44px; width: 44px; height: 44px; border-radius: 10px; color: var(--login-blue); background: rgba(71,141,255,.1); }
.office-option__icon svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.office-option__copy { min-width: 0; flex: 1; }
.office-option__name {
	display: block;
	font-weight: 800;
	line-height: 1.3;
	overflow-wrap: anywhere;
	white-space: normal;
}
.office-option__location { display: block; overflow: hidden; margin-top: 5px; color: var(--login-muted); font-size: .78rem; text-overflow: ellipsis; white-space: nowrap; }
.office-option__badge { display: inline-block; margin-top: 7px; padding: 3px 7px; border-radius: 999px; color: var(--login-primary-badge-text); background: var(--login-primary-badge-bg); font-size: .66rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; }
.office-option__arrow { width: 18px; height: 18px; flex: 0 0 18px; fill: none; stroke: var(--login-control-icon); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.office-option.is-loading { opacity: .6; cursor: wait; }

.login-back { display: flex; align-items: center; gap: 8px; margin: 24px auto 0; padding: 10px 12px; border: 0; color: var(--login-muted); background: transparent; font-weight: 750; cursor: pointer; }
.login-back:hover { color: var(--login-blue); }
.login-back svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

@media (max-width: 900px) {
	.login-shell { grid-template-columns: 1fr; }
	.login-brand { min-height: auto; padding: 26px 30px; }
	.login-brand__copy, .login-brand__detail { display: none; }
	.login-brand__mark { width: 52px; height: 52px; }
	.login-brand__mark img { width: 38px; height: 38px; }
	.login-workspace { min-height: calc(100vh - 104px); padding: 38px 22px; }
	.login-card__brand { display: none; }
}

@media (max-width: 560px) {
	.login-brand { background: var(--login-brand-bg); }
	.login-workspace { justify-content: flex-start; padding: 22px 14px 28px; }
	.login-card { padding: 28px 22px; border-radius: 18px; }
	.login-card__header { margin-bottom: 26px; }
	.login-card__header h2 { font-size: var(--type-page-title); }
	.office-options { grid-template-columns: 1fr; }
	.office-option { min-height: 82px; }
	.login-legal { text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
	*, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
