/*
 * NOTICE: This software is owned and developed by Powersys. Only Powersys employees are allowed to use it.
 *
 * Login pages (index.php, twofa.php) - 2026-10-21 redesign with the 2023 Powersys brand.
 * Brand tokens taken from global.powersys-solutions.com: black #0A0203, grey #717176,
 * light grey #F2F2F2, lime accent #BDE300. The brand fonts (Kross Neue Grotesk, HD Colton) are
 * commercial: a close system grotesque stack is used instead (no external font request).
 * Every rule is scoped under body.pws-login so that the other pages (css/style.css) are unaffected.
 */

body.pws-login {
	--pws-black: #0A0203;
	--pws-ink: #1d1d22;
	--pws-grey: #717176;
	--pws-line: #dcdce0;
	--pws-light: #F2F2F2;
	--pws-accent: #BDE300;
	--pws-error: #b42318;
	--pws-error-bg: #fef3f2;
	--pws-info-bg: #f5f8e6;
	margin: 0;
	min-height: 100vh;
	background: var(--pws-light);
	color: var(--pws-ink);
	font-family: "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
	font-size: 16px;
	line-height: 1.5;
}

.pws-login .pws-split {
	display: grid;
	grid-template-columns: minmax(320px, 5fr) 7fr;
	min-height: 100vh;
}

/* Brand panel (left) */
.pws-login .pws-brand {
	position: relative;
	display: flex;
	flex-direction: column;
	justify-content: center;
	padding: 48px;
	background: var(--pws-black);
	color: #fff;
	overflow: hidden;
}
.pws-login .pws-brand::after {          /* large faint sigle shape, decorative */
	content: "";
	position: absolute;
	right: -120px;
	bottom: -140px;
	width: 520px;
	height: 520px;
	border: 56px solid rgba(255, 255, 255, 0.04);
	border-radius: 0 160px 160px 0;
	transform: rotate(-8deg);
	pointer-events: none;
}
.pws-login .pws-brand-inner {
	position: relative;
	z-index: 1;
	max-width: 360px;
	margin: 0 auto;
	text-align: center;
}
.pws-login .pws-brand-logo {
	width: 220px;
	height: auto;
}
.pws-login .pws-brand-title {
	margin: 40px 0 12px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.24em;
	text-transform: uppercase;
	color: rgba(255, 255, 255, 0.85);
}
.pws-login .pws-accent {
	display: inline-block;
	width: 56px;
	height: 4px;
	border-radius: 2px;
	background: var(--pws-accent);
}
.pws-login .pws-brand-foot {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 24px;
	margin: 0;
	text-align: center;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.45);
}

/* Form panel (right) */
.pws-login .pws-panel {
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	padding: 48px 24px;
}
.pws-login .pws-card {
	width: 100%;
	max-width: 420px;
	padding: 40px;
	background: #fff;
	border-radius: 16px;
	box-shadow: 0 1px 2px rgba(10, 2, 3, 0.06), 0 12px 32px rgba(10, 2, 3, 0.08);
}
.pws-login .pws-card-sigle {
	display: block;
	width: 44px;
	height: auto;
	margin-bottom: 24px;
}
.pws-login .pws-card h1 {
	margin: 0 0 6px;
	font-size: 26px;
	font-weight: 700;
	letter-spacing: -0.01em;
	color: var(--pws-black);
}
.pws-login .pws-subtitle {
	margin: 0 0 28px;
	color: var(--pws-grey);
	font-size: 15px;
}

.pws-login .pws-field {
	margin-bottom: 18px;
}
.pws-login .pws-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 14px;
	font-weight: 600;
	color: var(--pws-ink);
}
.pws-login .pws-input-wrap {
	position: relative;
}
.pws-login .pws-field input {
	display: block;
	width: 100%;
	box-sizing: border-box;
	height: 48px;
	padding: 0 14px;
	border: 1px solid var(--pws-line);
	border-radius: 10px;
	background: #fff;
	color: var(--pws-ink);
	font: inherit;
	transition: border-color 0.15s, box-shadow 0.15s;
}
.pws-login .pws-field input::placeholder {
	color: #a3a3a8;
}
.pws-login .pws-field input:focus {
	outline: none;
	border-color: var(--pws-black);
	box-shadow: 0 0 0 3px rgba(189, 227, 0, 0.55);
}
.pws-login .pws-input-wrap input {
	padding-right: 64px;
}
.pws-login .pws-toggle {
	position: absolute;
	top: 50%;
	right: 8px;
	transform: translateY(-50%);
	padding: 6px 8px;
	border: 0;
	border-radius: 6px;
	background: transparent;
	color: var(--pws-grey);
	font: inherit;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
}
.pws-login .pws-toggle:hover,
.pws-login .pws-toggle:focus-visible {
	color: var(--pws-black);
	background: var(--pws-light);
	outline: none;
}

.pws-login .pws-code input {
	height: 56px;
	text-align: center;
	font-size: 26px;
	font-weight: 600;
	letter-spacing: 0.35em;
}

.pws-login .pws-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	width: 100%;
	height: 48px;
	margin-top: 8px;
	border: 0;
	border-radius: 10px;
	background: var(--pws-black);
	color: #fff;
	font: inherit;
	font-weight: 600;
	cursor: pointer;
	transition: background 0.15s, transform 0.05s;
}
.pws-login .pws-btn:hover {
	background: #2a2a30;
}
.pws-login .pws-btn:active {
	transform: translateY(1px);
}
.pws-login .pws-btn:focus-visible {
	outline: 3px solid var(--pws-accent);
	outline-offset: 2px;
}
.pws-login .pws-btn-arrow {
	color: var(--pws-accent);
	font-size: 18px;
	line-height: 1;
}
.pws-login .pws-link {
	display: block;
	margin-top: 16px;
	text-align: center;
	font-size: 14px;
	color: var(--pws-grey);
}

.pws-login .pws-notice {
	margin: 0 0 20px;
	padding: 12px 14px;
	border-radius: 10px;
	font-size: 14px;
}
.pws-login .pws-notice-error {
	background: var(--pws-error-bg);
	color: var(--pws-error);
	border: 1px solid #fecdca;
}
.pws-login .pws-notice-info {
	background: var(--pws-info-bg);
	color: #3f4a00;
	border: 1px solid #e3ef9c;
}

.pws-login .pws-steps {
	margin: 0 0 20px;
	padding-left: 20px;
	color: var(--pws-ink);
	font-size: 14px;
}
.pws-login .pws-steps li {
	margin-bottom: 6px;
}
.pws-login .pws-qr {
	display: flex;
	justify-content: center;
	margin: 8px 0 12px;
	padding: 16px;
	border: 1px solid var(--pws-line);
	border-radius: 12px;
}
.pws-login .pws-key {
	margin: 0 0 24px;
	text-align: center;
	font-size: 13px;
	color: var(--pws-grey);
}
.pws-login .pws-key code {
	display: inline-block;
	margin-top: 6px;
	padding: 6px 10px;
	border-radius: 8px;
	background: var(--pws-light);
	color: var(--pws-black);
	font-size: 13px;
	letter-spacing: 0.04em;
	word-break: normal;          /* wrap only between the 4-character groups */
}

.pws-login .pws-help {
	overflow-wrap: anywhere;
	margin: 24px 0 0;
	text-align: center;
	font-size: 13px;
	color: var(--pws-grey);
}
.pws-login a {
	color: var(--pws-black);
	text-decoration: underline;
	text-decoration-color: var(--pws-accent);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

/* Tablet / phone: the brand panel becomes a compact top band */
@media (max-width: 860px) {
	.pws-login .pws-split {
		/* minmax(0, 1fr): a plain 1fr column cannot shrink below its content (long e-mail address)
		   and made the card overflow on phones */
		grid-template-columns: minmax(0, 1fr);
		grid-template-rows: auto 1fr;
	}
	.pws-login .pws-brand {
		padding: 28px 24px;
	}
	.pws-login .pws-brand-logo {
		width: 120px;
	}
	.pws-login .pws-brand-title {
		margin-top: 16px;
		font-size: 12px;
	}
	.pws-login .pws-brand-foot,
	.pws-login .pws-brand::after {
		display: none;
	}
	.pws-login .pws-panel {
		justify-content: flex-start;
		padding: 24px 16px 40px;
	}
	.pws-login .pws-card {
		padding: 28px 22px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.pws-login * {
		transition: none !important;
	}
}
