/* Modern login/home header - additive, used by home.jsp for both the logged-out
   login card and the logged-in welcome header (.mt-home-header/.mt-welcome).
   Every class here is new (mt- prefix); nothing existing is overridden, so this
   cannot affect any other page. Colors reuse the brand blue (#2a5298) and the
   night-sky gradient already approved for the sidebar during the 2026-09
   theme pilot, to stay consistent with the rest of the app. */

.mt-home-header {
	display: flex;
	align-items: center;
	gap: 1.25rem;
	text-align: left;
	padding: .5rem 0 1rem;
}

.mt-home-logo {
	width: 72px;
	height: 72px;
	object-fit: contain;
	flex-shrink: 0;
}

.mt-home-title {
	font-size: 1.3rem;
	font-weight: 700;
	color: #2a5298;
	margin: 0 0 .15rem;
}

.mt-home-sub {
	font-size: .9rem;
	font-weight: 600;
	color: #495057;
	margin: 0 0 .25rem;
}

.mt-home-powered {
	font-size: .75rem;
	color: #adb5bd;
	margin: 0;
}

.mt-welcome {
	display: flex;
	align-items: center;
	gap: .85rem;
	text-align: left;
	background: #f4f6fb;
	border-radius: 10px;
	padding: .75rem 1rem;
	margin: 0 auto;
	max-width: 460px;
}

.mt-welcome__avatar {
	flex-shrink: 0;
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: #2a5298;
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.1rem;
}

.mt-welcome__text {
	flex: 1;
	min-width: 0;
}

.mt-welcome__hi {
	font-size: .9rem;
	color: #333;
}

.mt-welcome__last {
	font-size: .75rem;
	color: #6c757d;
	margin-top: .15rem;
}

.mt-welcome__logout {
	flex-shrink: 0;
	font-size: .8rem;
	font-weight: 600;
	color: #2a5298;
	text-decoration: none;
	white-space: nowrap;
}

.mt-welcome__logout:hover {
	text-decoration: underline;
}

@media (max-width: 480px) {
	.mt-home-header {
		flex-direction: column;
		text-align: center;
	}
	.mt-welcome {
		flex-wrap: wrap;
		justify-content: center;
		text-align: center;
	}
	.mt-welcome__text {
		flex: 0 0 100%;
		order: 3;
		text-align: center;
		margin-top: .35rem;
	}
}

/* main.css (.login-card-outer{margin-top:15vh}) and .login-card-logo (a fixed,
   circular logo badge, bootImportCss.jsp) were both sized for the old, shorter
   card. Forcing a full extra 100vh box on top of whatever header space already
   exists above this div is what caused the page to scroll - so this no longer
   tries to force any specific viewport height, just removes the old fixed
   offset and lets the card center itself in whatever space is actually left. */
.login-card-outer.modern-login {
	margin-top: 0;
}

/* The old fixed circular badge (bootImportCss.jsp) is superseded by
   .mt-form-logo below, which puts the same logo in its own row directly above
   "Sign in" instead of floating over the card - hide the old one here only. */
.modern-login .login-card-logo {
	display: none;
}

/* Match .mt-brand-panel's flex-basis exactly so the two halves split the shell
   evenly instead of the card only taking whatever width its content needs. */
.modern-login .main-card {
	flex: 0 0 50%;
	min-width: 0;
}

.modern-login {
	align-items: center;
	background-size: cover;
	background-position: center;
}

.mt-auth-shell {
	display: flex;
	width: 100%;
	max-width: 782px; /* 920px - 15% */
	/* Cap to the viewport (minus its own top/bottom margin) so a long brand-panel
	   list or a login card with every optional row (OTP/captcha/reget-password)
	   showing can't push the actual PAGE into scrolling - each side scrolls on
	   its own instead, see .mt-brand-panel/.mt-form-card below. */
	max-height: 96vh;
	margin: 2vh auto;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 10px 40px rgba(0, 0, 0, 0.25);
}

.mt-form-logo {
	text-align: center;
	margin-bottom: 1rem;
}

/* Two possible elements share this class (see home.jsp): a <div> for orgs whose
   loginlogoName is a full inline-style string (background-image baked in, plus
   position:fixed/top:20vh left over from the old fixed-badge layout - overridden
   here so it flows normally in this row), or a plain <img> for every other org
   (the common case, default "logo-inverse.png"). Sizing is intentionally NOT
   forced into a 72x72 circle - that cropped non-square logos. */
.mt-form-logo-img {
	display: inline-block !important;
	position: static !important;
	top: auto !important;
	max-width: 100%;
	min-height: 60px;
	background-color: transparent;
	background-size: contain !important;
	background-position: center !important;
	background-repeat: no-repeat !important;
}

img.mt-form-logo-img {
	max-height: 72px;
	width: auto;
	min-height: 0;
	object-fit: contain;
}

.mt-brand-panel {
	flex: 0 0 50%;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	padding: 2.5rem 2rem;
	color: #fff;
	background: linear-gradient(160deg, #0f2247 0%, #1c3f73 55%, #2a5298 100%);
	overflow-y: auto;
}

/* The card side can also grow past one screen with OTP + captcha + reget-password
   all showing at once - same treatment, scrolls in place instead of the page.
   Scoped to modern-login only; .login-card/.home-card are shared classnames used
   elsewhere too. */
.modern-login .login-card {
	max-height: 96vh;
	overflow-y: auto;
}

.mt-brand-logo {
	max-width: 140px;
	max-height: 56px;
	object-fit: contain;
}

.mt-brand-body {
	margin-top: 2rem;
}

.mt-brand-eyebrow {
	text-transform: uppercase;
	letter-spacing: .08em;
	font-size: .75rem;
	opacity: .75;
	margin-bottom: .4rem;
}

.mt-brand-title {
	font-size: 1.6rem;
	font-weight: 700;
	margin: 0 0 .75rem;
	line-height: 1.3;
}

.mt-brand-sub {
	font-size: .9rem;
	opacity: .85;
	line-height: 1.5;
	margin-bottom: 1.5rem;
}

.mt-brand-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.mt-brand-list li {
	display: flex;
	align-items: center;
	gap: .6rem;
	font-size: .85rem;
	opacity: .9;
	margin-bottom: .75rem;
}

.mt-brand-list i {
	width: 18px;
	text-align: center;
	opacity: .85;
}

.mt-brand-foot {
	font-size: .75rem;
	opacity: .65;
	margin: 0;
}

.mt-form-head {
	margin-bottom: 1.25rem;
	text-align: left;
}

.mt-form-title {
	font-size: 1.3rem;
	font-weight: 700;
	margin: 0 0 .25rem;
	color: #2a5298;
}

.mt-form-sub {
	font-size: .85rem;
	color: #6c757d;
	margin: 0;
}

.mt-field {
	text-align: left;
	margin-bottom: .25rem;
}

.mt-label {
	display: block;
	font-size: .8rem;
	font-weight: 600;
	color: #495057;
	margin-bottom: .3rem;
}

.mt-input-shell {
	display: flex;
	align-items: center;
	border: 1px solid #ced4da;
	border-radius: 6px;
	padding: 0 .6rem;
	background: #fff;
}

.mt-input-shell:focus-within {
	border-color: #2a5298;
	box-shadow: 0 0 0 3px rgba(42, 82, 152, 0.15);
}

.mt-input-icon {
	color: #adb5bd;
	margin-right: .5rem;
	font-size: .85rem;
}

.mt-input {
	flex: 1;
	border: 0;
	outline: 0;
	padding: .55rem 0;
	font-size: .9rem;
	background: transparent;
}

.mt-input-action {
	border: 0;
	background: transparent;
	color: #adb5bd;
	cursor: pointer;
	padding: .3rem;
}

.mt-input-action:hover {
	color: #2a5298;
}

.mt-help {
	display: none;
	font-size: .75rem;
	color: #d92550;
	margin-top: .25rem;
}

.mt-field.mt-field-error .mt-input-shell {
	border-color: #d92550;
}

.mt-field.mt-field-error .mt-help {
	display: block;
}

.mt-login-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	font-size: .8rem;
	margin: .5rem 0 1rem;
}

.mt-check {
	display: flex;
	align-items: center;
	gap: .4rem;
	color: #495057;
	font-weight: normal;
	cursor: pointer;
}

.mt-link {
	color: #2a5298;
	text-decoration: none;
}

.mt-link:hover {
	text-decoration: underline;
}

.mt-login-actions .login-card-button {
	position: relative;
}

.mt-login-actions.mt-loading .login-card-button {
	color: transparent;
	pointer-events: none;
}

.mt-login-actions.mt-loading .login-card-button::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	width: 16px;
	height: 16px;
	margin: -8px 0 0 -8px;
	border: 2px solid rgba(255, 255, 255, 0.5);
	border-top-color: #fff;
	border-radius: 50%;
	animation: mt-spin .6s linear infinite;
}

@keyframes mt-spin {
	to { transform: rotate(360deg); }
}

.mt-login-footer {
	text-align: center;
	font-size: .75rem;
	color: #adb5bd;
	margin-top: .75rem;
}

@media (max-width: 767px) {
	.modern-login {
		align-items: flex-start;
	}
	.mt-auth-shell {
		flex-direction: column;
		margin: 1rem auto;
	}
	/* The brand panel (logo/title/tagline/feature list) pushed the actual sign-in
	   fields below the fold on phones - hide it entirely here so Login ID/Password/
	   the Login button are visible without scrolling first. It still shows on
	   tablet/desktop, where there's room for both. */
	.mt-brand-panel {
		display: none;
	}
}
