/* ==========================================================================
   EIU portal entry pages (sign-in, password reset).

   Shared by:
     /eIU25Mlogin.php
     /login/resetStdPassword.php

   These pages also load the admin theme (common/assets/admin/css/style.css)
   so the typography (Manrope) and the EIU palette match the pages behind the
   login. What they deliberately do NOT borrow is admin *chrome* -- no
   .card-header bar, no filter-card divider -- because those belong to data
   screens, not to an entry page.

   The theme is built for dense admin layouts, and two of its global rules have
   to be answered here. Both are called out inline below.

   Colours read from the theme's :root block (style.css:23) with literal
   fallbacks, so this file still renders correctly on its own.
   ========================================================================== */

:root {
	--lp-ink: #2E2350;
	--lp-muted: #7B6FA0;
	--lp-field: #F7F5FC;
	--lp-field-icon: #EFEAF8;
	--lp-line: #E3DCF2;
}

body.login-page {
	background: linear-gradient(135deg, #FBFAFE 0%, #F3EFFA 55%, #EDE7F6 100%) !important;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 96px 20px 48px;
	position: relative;
	overflow-x: hidden;
}

/* --------------------------------------------------------------------------
   Background decoration
   -------------------------------------------------------------------------- */

.bg-decor {
	position: fixed;
	top: 0;
	right: 0;
	bottom: 0;
	left: 0;      /* longhand rather than inset: older browsers ignore the
	                 shorthand and would collapse the layer to zero size */
	overflow: hidden;
	pointer-events: none;
	z-index: 0;
}

.bg-decor svg { position: absolute; display: block; }

.decor-tr { top: 0; right: 0; width: 41vw; max-width: 680px; }
.decor-bl { bottom: 0; left: 0; width: 35vw; max-width: 560px; }
.decor-arc-tl { top: -140px; left: -150px; width: 420px; }
.decor-arc-br { bottom: -180px; right: -120px; width: 620px; }

/* --------------------------------------------------------------------------
   Brand lock-up, top left
   -------------------------------------------------------------------------- */

.page-brand {
	position: absolute;
	top: 28px;
	left: 34px;
	display: flex;
	align-items: center;
	z-index: 2;
}

.page-brand img { width: 58px; height: 58px; object-fit: contain; }

.page-brand .brand-rule {
	width: 2px;
	height: 40px;
	background: var(--lp-line);
	margin: 0 16px;
	border-radius: 2px;
}

.page-brand .brand-name {
	font-size: 1.02rem;
	font-weight: 800;
	line-height: 1.25;
	color: var(--eiu-purple, #43267E);
}

/* --------------------------------------------------------------------------
   Card
   -------------------------------------------------------------------------- */

.login-card {
	position: relative;
	z-index: 1;
	width: 100%;
	max-width: 478px;
	margin: auto;              /* not align-items:center -- a centred flex child
	                              taller than the viewport gets its top clipped
	                              with no way to scroll up to it */
	background: linear-gradient(180deg, #FFFFFF 0%, #FCFBFE 100%);
	border-radius: 16px;
	padding: 38px 44px 34px;
	box-shadow: 0 18px 50px rgba(67, 38, 126, 0.11), 0 2px 10px rgba(67, 38, 126, 0.05);
}

/* style.css:75-79 gives EVERY h1/h2 font-size:2.4rem, padding-bottom:1.2rem and
   a border-bottom. Right for an admin page header, wrong here -- it drew a stray
   rule under the title. Reset, then size explicitly. */
.login-card h1 {
	font-size: 1.32rem;
	font-weight: 800;
	padding-bottom: 0;
	border-bottom: 0;
	margin: 0;
	color: var(--eiu-purple, #43267E);
	text-align: center;
	line-height: 1.3;
}

.card-logo {
	display: block;
	width: 88px;
	height: 88px;
	object-fit: contain;
	margin: 0 auto 16px;
}

.card-kicker {
	text-align: center;
	font-size: 0.68rem;
	font-weight: 600;
	letter-spacing: 0.2em;
	text-transform: uppercase;
	color: var(--lp-muted);
	margin: 6px 0 0;
}

.card-lead {
	text-align: center;
	font-size: 0.85rem;
	color: var(--lp-muted);
	margin: 8px 0 26px;
}

/* --------------------------------------------------------------------------
   Fields
   -------------------------------------------------------------------------- */

.login-card label {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--lp-ink);
	margin-bottom: 0.4rem;
}

.login-card label .req { color: var(--eiu-orange, #E64A23); }

/* The theme pins .form-control to height:36px / padding:0 .75rem /
   font-size:.85rem with !important (style.css:557-565), so a comfortable entry
   field has to answer in kind. */
.login-card .form-control {
	height: 48px !important;
	padding: 0 0.9rem !important;
	font-size: 0.85rem !important;
	background: var(--lp-field);
	border: 1px solid var(--lp-line);
	border-left: 0;
	border-radius: 0 9px 9px 0 !important;
	color: var(--lp-ink);
	box-shadow: none;
}

.login-card .form-control:focus {
	background: #fff;
	border-color: #B9A5DF;
	box-shadow: none;
}

.login-card .form-control::placeholder { color: #A79CC4; }

.login-card .input-group-text {
	width: 48px;
	justify-content: center;
	background: var(--lp-field-icon);
	border: 1px solid var(--lp-line);
	border-right: 0;
	border-radius: 9px 0 0 9px;
	color: var(--eiu-purple, #43267E);
	font-size: 0.95rem;
}

.login-card .btn-eye {
	background: var(--lp-field);
	border: 1px solid var(--lp-line);
	border-left: 0;
	border-radius: 0 9px 9px 0 !important;
	color: #9B8FBC;
	width: 46px;
	padding: 0 !important;
	box-shadow: none !important;
}

.login-card .btn-eye:hover { color: var(--eiu-purple, #43267E); }

/* A field that sits between the icon box and a trailing button. */
.login-card .has-eye .form-control { border-radius: 0 !important; }

.login-forgot {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--eiu-purple, #43267E);
	text-decoration: none;
}

.login-forgot:hover { color: var(--eiu-purple-deep, #2A1857); text-decoration: underline; }

/* --------------------------------------------------------------------------
   Submit
   -------------------------------------------------------------------------- */

/* style.css:363 pins .btn padding with !important, so a taller button would
   leave its label at the top of the box; flex centring sidesteps that. */
.login-card .btn-signin {
	height: 52px;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	border: 0 !important;
	border-radius: 10px;
	font-size: 0.92rem;
	font-weight: 700;
	color: #fff !important;
	background: linear-gradient(90deg, #452983 0%, #5B3AA3 100%) !important;
	box-shadow: 0 8px 20px rgba(67, 38, 126, 0.28);
}

.login-card .btn-signin:hover {
	background: linear-gradient(90deg, #38206C 0%, #4B2F8A 100%) !important;
	box-shadow: 0 10px 24px rgba(67, 38, 126, 0.34) !important;
}

.login-alert { font-size: 0.78rem; border-radius: 9px; }

/* --------------------------------------------------------------------------
   "or" rule and secondary links
   -------------------------------------------------------------------------- */

.or-divider {
	display: flex;
	align-items: center;
	margin: 22px 0 16px;
}

.or-divider::before,
.or-divider::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: #E9E3F4;
}

.or-divider span { padding: 0 14px; font-size: 0.76rem; color: #A69BC1; }

.alt-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: space-between;
}

.alt-links a {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--eiu-purple, #43267E);
	text-decoration: none;
	display: inline-flex;
	align-items: center;
}

.alt-links a:hover { color: var(--eiu-purple-deep, #2A1857); text-decoration: underline; }
.alt-links a i { margin-right: 7px; font-size: 0.9rem; }

/* --------------------------------------------------------------------------
   Password-reset extras
   -------------------------------------------------------------------------- */

/* Google renders the widget at a fixed 304px; scale it down on narrow screens
   rather than letting it push the card into a horizontal scroll. */
.captcha-wrap {
	display: flex;
	justify-content: center;
	margin-bottom: 1.25rem;
}

.staff-note {
	font-size: 0.74rem;
	border-radius: 9px;
	text-align: center;
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

@media (max-width: 767px) {
	body.login-page { padding: 88px 16px 32px; }
	.page-brand { top: 20px; left: 20px; }
	.page-brand img { width: 46px; height: 46px; }
	.page-brand .brand-rule { height: 32px; margin: 0 12px; }
	.page-brand .brand-name { font-size: 0.88rem; }
	.login-card { padding: 30px 24px 26px; border-radius: 14px; }
	.card-logo { width: 74px; height: 74px; }
	.login-card h1 { font-size: 1.15rem; }
	.decor-tr { width: 56vw; }
	.decor-bl { width: 52vw; }
	.decor-arc-br { width: 380px; bottom: -120px; right: -90px; }
}

@media (max-width: 400px) {
	.alt-links { justify-content: center; }
	.alt-links a { margin: 0 8px 6px; }
	.captcha-wrap { transform: scale(0.86); transform-origin: center top; }
}
