/**
 * Brightsand HRIS sign-in and sign-out.
 *
 * wp-login.php gives us #login as a narrow centred column with no wrapper
 * around it, so BODY itself becomes the card and the two panels are placed by
 * explicit grid position. That lets the photograph be printed after the form
 * in the DOM, which login_footer forces, and still sit on the left. Nothing
 * here rewrites core markup, so a WordPress update cannot break the layout.
 */

:root {
	--bsd-cream: #F4F3F0;
	--bsd-ink: #232321;
	--bsd-muted: #78766F;
	--bsd-line: #EAE8E1;
	--bsd-line-2: #DBD8CF;
	--bsd-green: #123A2E;
	--bsd-gold: #C9A227;
	--bsd-red: #B02A2A;
	--bsd-red-soft: #FBE9EC;
}

html {
	background: var(--bsd-cream);
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	box-sizing: border-box;
	overflow-x: hidden;
}

/* Two pages, two situations.
 *
 * wp-login.php gives no wrapper we can rely on, so BODY is the card there. The
 * signed-out page is our own markup and has a real .bsd-login-card. Both get
 * the same rules, and the panels are placed by explicit grid position so the
 * photograph can be printed after the form (login_footer is the only hook in
 * every WordPress version) and still sit on the left.
 *
 * No min-height: the card is as tall as the form needs and no taller, then it
 * is centred. Width uses 100% of the padded frame rather than vw units, which
 * include the scrollbar and would push a horizontal scrollbar onto the page.
 */
body.login,
.bsd-login-card {
	width: min(1120px, 100%);
	margin: 0 auto;
	background: #fff;
	border: 1px solid var(--bsd-line);
	border-radius: 20px;
	box-shadow: 0 24px 60px rgba(18,32,26,.16);
	overflow: hidden;
	display: grid;
	grid-template-columns: 1.05fr 1fr;
	grid-template-rows: auto;
	box-sizing: border-box;
	padding: 0;
}
body.login {
	color: var(--bsd-ink);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
}
body.login > *:not(#login):not(.bsd-login-art) { display: none; }

/* WordPress's own logo heading. The wordmark is printed as a real image with
   the rest of the panel content instead. */
body.login h1 { display: none; }

/* ---------- the photograph ---------- */
.bsd-login-art {
	grid-column: 1;
	grid-row: 1;
	position: relative;
	background-color: var(--bsd-green);
	background-size: cover;
	background-position: center;
	display: flex;
	align-items: flex-end;
	padding: 32px 34px;
	overflow: hidden;
}
.bsd-login-art:after {
	content: "";
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, rgba(10,28,22,.10) 0%, rgba(10,28,22,.06) 42%, rgba(10,28,22,.78) 100%);
}
.bsd-login-quote { position: relative; z-index: 2; color: #fff; max-width: 360px; }
.bsd-login-quote .rule { width: 34px; height: 2px; background: var(--bsd-gold); margin-bottom: 15px; }
.bsd-login-quote p {
	margin: 0; font-size: 17px; line-height: 1.45; font-weight: 500;
	letter-spacing: -.012em; color: #fff;
}
.bsd-login-quote span {
	display: block; margin-top: 11px; font-size: 10.5px; letter-spacing: .16em;
	text-transform: uppercase; color: rgba(255,255,255,.66); font-weight: 700;
}

/* ---------- the form panel ---------- */
body.login #login,
.bsd-out-panel {
	grid-column: 2;
	grid-row: 1;
	width: auto;
	max-width: none;
	margin: 0;
	padding: 15px 46px;
	min-height: 0;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background: var(--bsd-cream);
	box-sizing: border-box;
	overflow: hidden;
}

.bsd-login-logo {
	display: block;
	width: 202px;   /* the source is 350 x 45; stating both stops a flex column */
	height: 26px;   /* stretching a width:auto image to the panel width */
	margin: 0 0 20px;
	align-self: flex-start;
	flex: 0 0 auto;
	object-fit: contain;
}

.bsd-login-head { margin-bottom: 14px; }
/* Feature chips under the Sign in heading, per the approved design. */
.bsd-login-chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; }
.bsd-login-chip { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 700; padding: 5px 11px; border-radius: 999px; }
.bsd-login-chip-dot { width: 7px; height: 7px; border-radius: 50%; }
.bsd-login-head .eyebrow {
	font-size: 10px; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
	color: var(--bsd-muted); margin-bottom: 11px;
}
.bsd-login-head h2 {
	margin: 0; font-size: 27px; letter-spacing: -.028em; line-height: 1.15; color: var(--bsd-ink);
}
.bsd-login-head p { margin: 9px 0 0; color: var(--bsd-muted); font-size: 13.5px; line-height: 1.5; }

body.login form {
	background: transparent; border: 0; box-shadow: none;
	padding: 0; margin: 0; overflow: visible;
	display: flex;
	flex-direction: column;
}
/* WordPress fires login_form before the remember row, so the note is printed
   above it. Ordering puts it back at the bottom where the design has it. */
body.login form .bsd-login-foot { order: 5; }

/* Neither the help line nor the secured-host line appears, whichever layer
   prints it. The HR plugin's own login reskin uses .bsd-login-help and
   .bsd-login-secure, so those names are covered too and the lines stay gone
   even on an install where that layer is still active. */
body.login .bsd-lg-help,
body.login .bsd-lg-secure,
body.login .bsd-login-help,
body.login .bsd-login-secure { display: none !important; }
body.login form label {
	display: block; font-size: 10px; font-weight: 800; letter-spacing: .07em;
	text-transform: uppercase; color: #6f6e68; margin: 0 0 6px;
}
body.login form .input,
body.login input[type="text"],
body.login input[type="email"],
body.login input[type="password"] {
	width: 100%; height: 44px; border: 1px solid var(--bsd-line-2); border-radius: 11px;
	background: #fff; padding: 0 13px; font-size: 14px; color: var(--bsd-ink);
	box-shadow: none; margin: 0 0 12px;
	transition: border-color .14s, box-shadow .14s;
}
body.login input[type="password"]::-ms-reveal,
body.login input[type="password"]::-ms-clear { display: none; }

/* The approved design has no show/hide control on the password field, so
   WordPress's own is hidden and nothing takes its place. */
body.login .wp-hide-pw { display: none !important; }
body.login .wp-pwd { position: relative; }
body.login .wp-pwd input[type="password"],
body.login .wp-pwd input[type="text"] { padding-right: 13px; }

body.login input:focus {
	border-color: var(--bsd-green); box-shadow: 0 0 0 3px rgba(18,58,46,.10); outline: none;
}
body.login .forgetmenot {
	float: none;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	gap: 6px;
	margin: 16px 0 0;
}
body.login .forgetmenot input[type="checkbox"] {
	margin: 0 !important;
	width: 15px;
	height: 15px;
	flex: 0 0 auto;
}
body.login .forgetmenot label {
	text-transform: none;
	letter-spacing: 0;
	font-size: 12.5px;
	font-weight: 500;
	color: #54524d;
	margin: 0 !important;
	padding: 0 !important;
	line-height: 1;
	flex: 0 0 auto;   /* no stretching, so the label stays beside the box */
	white-space: nowrap;
}

body.login .bsd-lg-lost {
	margin-left: auto;
	font-size: 12.5px;
	font-weight: 700;
	color: var(--bsd-ink);
	text-decoration: none;
	border-bottom: 1px solid var(--bsd-line-2);
}
body.login .bsd-lg-lost:hover { border-color: var(--bsd-ink); }

body.login .submit, body.login p.submit { float: none; margin: 18px 0 0; padding: 0; }
body.login .button-primary, body.login #wp-submit {
	width: 100%; height: 46px; line-height: 44px;
	border: 1px solid var(--bsd-ink); border-radius: 12px; background: var(--bsd-ink);
	color: #fff; font-size: 14px; font-weight: 700; text-shadow: none; box-shadow: none;
	float: none; transition: background .14s;
}
body.login .button-primary:hover, body.login #wp-submit:hover { background: #000; border-color: #000; }

body.login #nav, body.login #backtoblog {
	padding: 0; margin: 0; text-align: left; text-shadow: none;
}
body.login #nav { margin-top: 18px; }
body.login #backtoblog { margin-top: 8px; }
body.login #nav a, body.login #backtoblog a {
	color: var(--bsd-ink); font-size: 12.5px; font-weight: 700; text-decoration: none;
	border-bottom: 1px solid var(--bsd-line-2);
}
body.login #nav a:hover, body.login #backtoblog a:hover { border-color: var(--bsd-ink); color: var(--bsd-ink); }

body.login .message, body.login .notice, body.login #login_error {
	border: 1px solid var(--bsd-line); border-left-width: 4px; border-radius: 11px;
	background: #fff; box-shadow: none; padding: 11px 13px;
	font-size: 12.5px; line-height: 1.45; margin: 0 0 20px;
}
body.login #login_error {
	background: var(--bsd-red-soft); border-color: #F0C7CF;
	border-left-color: var(--bsd-red); color: #7d2020;
}
body.login #login_error a { color: #7d2020; }
body.login .message { border-left-color: var(--bsd-green); color: #4a4944; }

.bsd-login-foot {
	margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--bsd-line);
	font-size: 11.5px; color: var(--bsd-muted); line-height: 1.55;
}
.bsd-login-foot b { color: var(--bsd-ink); }

/* ---------- signed out ---------- */
.bsd-out-badge {
	width: 52px; height: 52px; border-radius: 14px; background: #EFF6F2; color: #0F5C46;
	display: flex; align-items: center; justify-content: center;
	margin-bottom: 18px; align-self: flex-start; flex: 0 0 auto;
}
.bsd-out-badge svg { width: 24px; height: 24px; }
.bsd-out-summary {
	background: #FBFAF7; border: 1px solid var(--bsd-line); border-radius: 12px;
	padding: 14px 16px; margin-bottom: 22px;
}
.bsd-out-summary div {
	display: flex; justify-content: space-between; gap: 12px; padding: 6px 0; font-size: 12.5px;
}
.bsd-out-summary div + div { border-top: 1px solid #F1EFE9; }
.bsd-out-summary span { color: var(--bsd-muted); }
.bsd-out-summary b { font-variant-numeric: tabular-nums; }
.bsd-out-btn {
	display: block; width: 100%; height: 46px; line-height: 44px; text-align: center;
	border: 1px solid var(--bsd-ink); border-radius: 12px; background: var(--bsd-ink);
	color: #fff; font-size: 14px; font-weight: 700; text-decoration: none; transition: background .14s;
}
.bsd-out-btn:hover { background: #000; color: #fff; }
.bsd-out-btn.ghost { background: #fff; color: var(--bsd-ink); margin-top: 10px; }
.bsd-out-btn.ghost:hover { background: #FAF9F6; color: var(--bsd-ink); }

/* ---------- narrow screens ---------- */
@media screen and (max-width: 860px) {
	html { padding: 16px; align-items: flex-start; }
	body.login,
	.bsd-login-card {
		grid-template-columns: 1fr;
		grid-template-rows: auto auto;
		width: 100%;
	}
	.bsd-login-art { grid-column: 1; grid-row: 1; min-height: 190px; padding: 24px 26px; }
	.bsd-login-quote p { font-size: 15px; }
	body.login #login,
	.bsd-out-panel { grid-column: 1; grid-row: 2; padding: 30px 26px 34px; }
}

/* ------------------------------------------------------------------ */
/* Defensive overrides                                                  */
/*                                                                      */
/* If the HR plugin's own login layer is still active, i.e. Brightsand  */
/* HR is older than 2.99.54 and cannot see add_theme_support('bsd-login'),*/
/* its stylesheet is loaded alongside this one and sets:                 */
/*                                                                      */
/*   html, body.login { height: 100%; }                                 */
/*   #login { min-height: 100vh; max-width: 400px; padding: 40px 24px; } */
/*   body.login { padding-left: min(44%, 560px); }                       */
/*                                                                      */
/* Those are what make the card a full viewport tall. It is not the      */
/* photograph: its column holds only the quote. Same specificity as the  */
/* rules here, so whichever loads last wins, which is why the height     */
/* would not come down. Forced here so the page is right either way.     */
/* ------------------------------------------------------------------ */
html, body.login { height: auto !important; }
body.login { padding: 0 !important; }
body.login #login {
	min-height: 0 !important;
	max-width: none !important;
	width: auto !important;
	margin: 0 !important;
	padding: 15px 46px !important;
	animation: none !important;
}
/* The plugin's dark brand panel and mobile logo, in case they are printed. */
body.login .bsd-login-brand,
body.login .bsd-login-mobilelogo { display: none !important; }

@media screen and (max-width: 860px) {
	body.login #login { padding: 26px 26px 30px !important; }
}

/* Signed out, drawn on wp-login.php so no cache layer can swallow it. The
   login form itself is hidden; the panel content comes from login_message. */
body.login.bsd-signed-out #loginform,
body.login.bsd-signed-out #nav,
body.login.bsd-signed-out #backtoblog,
body.login.bsd-signed-out .message:not(.bsd-keep) { display: none !important; }
body.login.bsd-signed-out .bsd-out-btn + .bsd-out-btn { margin-top: 10px; }
