/**
 * STW Login Guard — custom login page styles.
 * Colors are driven by CSS custom properties set inline from settings:
 *   --stw-lg-accent, --stw-lg-bg
 */

:root {
	--stw-lg-accent: #2563eb;
	--stw-lg-bg: #f3f4f6;
	--stw-lg-card: #ffffff;
	--stw-lg-text: #1f2937;
	--stw-lg-muted: #6b7280;
	--stw-lg-border: #d1d5db;
	--stw-lg-error-bg: #fef2f2;
	--stw-lg-error-border: #fca5a5;
	--stw-lg-error-text: #991b1b;
	--stw-lg-success-bg: #f0fdf4;
	--stw-lg-success-border: #86efac;
	--stw-lg-success-text: #166534;
	--stw-lg-radius: 12px;
}

* {
	box-sizing: border-box;
}

.stw-lg-body {
	margin: 0;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: var(--stw-lg-bg);
	color: var(--stw-lg-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
	font-size: 15px;
	line-height: 1.5;
	-webkit-font-smoothing: antialiased;
}

.stw-lg-wrap {
	width: 100%;
	max-width: 420px;
	padding: 24px 16px;
}

.stw-lg-card {
	background: var(--stw-lg-card);
	border-radius: var(--stw-lg-radius);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08), 0 2px 8px rgba(0, 0, 0, 0.04);
	padding: 32px 28px;
}

.stw-lg-logo {
	margin: 0 0 16px;
	text-align: center;
}

.stw-lg-logo img {
	max-width: 200px;
	max-height: 90px;
	height: auto;
}

.stw-lg-title {
	margin: 0;
	font-size: 22px;
	font-weight: 700;
	text-align: center;
}

.stw-lg-subtitle {
	margin: 4px 0 20px;
	font-size: 14px;
	font-weight: 500;
	text-align: center;
	color: var(--stw-lg-muted);
	text-transform: uppercase;
	letter-spacing: 0.06em;
}

.stw-lg-welcome,
.stw-lg-help {
	margin: 0 0 16px;
	font-size: 14px;
	color: var(--stw-lg-muted);
}

/* Notices */
.stw-lg-notice {
	border-radius: 8px;
	border: 1px solid;
	padding: 10px 14px;
	margin: 0 0 16px;
	font-size: 14px;
}

.stw-lg-notice p {
	margin: 0 0 6px;
}

.stw-lg-notice p:last-child {
	margin-bottom: 0;
}

.stw-lg-notice-error {
	background: var(--stw-lg-error-bg);
	border-color: var(--stw-lg-error-border);
	color: var(--stw-lg-error-text);
}

.stw-lg-notice-success {
	background: var(--stw-lg-success-bg);
	border-color: var(--stw-lg-success-border);
	color: var(--stw-lg-success-text);
}

.stw-lg-notice a {
	color: inherit;
	font-weight: 600;
}

/* Fields */
.stw-lg-field {
	margin: 0 0 16px;
}

.stw-lg-field label {
	display: block;
	margin-bottom: 6px;
	font-size: 13px;
	font-weight: 600;
}

.stw-lg-field input[type="text"],
.stw-lg-field input[type="email"],
.stw-lg-field input[type="password"] {
	width: 100%;
	padding: 10px 12px;
	font-size: 15px;
	color: var(--stw-lg-text);
	background: #fff;
	border: 1px solid var(--stw-lg-border);
	border-radius: 8px;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.stw-lg-field input:focus {
	outline: none;
	border-color: var(--stw-lg-accent);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--stw-lg-accent) 20%, transparent);
}

.stw-lg-pass-wrap {
	position: relative;
	display: block;
}

.stw-lg-pass-wrap input {
	padding-right: 44px;
}

.stw-lg-toggle-pass {
	position: absolute;
	top: 50%;
	right: 6px;
	transform: translateY(-50%);
	border: 0;
	background: transparent;
	font-size: 16px;
	line-height: 1;
	padding: 8px;
	cursor: pointer;
	color: var(--stw-lg-muted);
	border-radius: 6px;
}

.stw-lg-toggle-pass:hover,
.stw-lg-toggle-pass:focus-visible {
	color: var(--stw-lg-text);
	background: var(--stw-lg-bg);
}

.stw-lg-capslock {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	font-weight: 600;
	color: #b45309;
}

.stw-lg-remember {
	margin: 0 0 16px;
	font-size: 14px;
}

.stw-lg-remember input {
	margin-right: 6px;
}

/* Submit */
.stw-lg-submit {
	margin: 0;
}

.stw-lg-button {
	width: 100%;
	padding: 11px 16px;
	font-size: 15px;
	font-weight: 600;
	color: #fff;
	background: var(--stw-lg-accent);
	border: 0;
	border-radius: 8px;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.05s ease;
}

.stw-lg-button:hover {
	filter: brightness(1.08);
}

.stw-lg-button:active {
	transform: translateY(1px);
}

.stw-lg-button[disabled] {
	opacity: 0.6;
	cursor: wait;
}

/* Links */
.stw-lg-links {
	display: flex;
	flex-wrap: wrap;
	gap: 8px 16px;
	justify-content: center;
	margin-top: 20px;
	font-size: 13px;
}

.stw-lg-links a {
	color: var(--stw-lg-muted);
	text-decoration: none;
}

.stw-lg-links a:hover,
.stw-lg-links a:focus-visible {
	color: var(--stw-lg-accent);
	text-decoration: underline;
}

.stw-lg-footer-text {
	margin: 20px 0 0;
	font-size: 12px;
	text-align: center;
	color: var(--stw-lg-muted);
}

.stw-lg-colophon {
	margin: 16px 0 0;
	text-align: center;
	font-size: 12px;
	color: var(--stw-lg-muted);
}

/* Honeypot — keep visually hidden but present in DOM */
.stw-lg-hp {
	position: absolute !important;
	left: -9999px !important;
	top: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 480px) {
	.stw-lg-card {
		padding: 24px 18px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.stw-lg-field input,
	.stw-lg-button {
		transition: none;
	}
}
