/* SitePilot frontend login — /panel/ */
*,
*::before,
*::after {
	box-sizing: border-box;
}

html,
body.sp-login {
	margin: 0;
	padding: 0;
	min-height: 100%;
	font-family: "Segoe UI", system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
	color: #1a2332;
	background: #f4f6f8;
}

.sp-login__wrap {
	min-height: 100vh;
	display: grid;
	grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
}

.sp-login__visual {
	position: relative;
	min-height: 100vh;
	background: #0e2207;
}

.sp-login__photo {
	position: absolute;
	inset: 0;
	background-size: cover;
	background-position: var(--sp-login-image-pos, center center);
	background-repeat: no-repeat;
}

.sp-login__photo--fallback {
	background: linear-gradient(145deg, var(--sp-login-accent, #0e7c6b), #0e2207 70%);
}

.sp-login__panel {
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 2.5rem 1.5rem;
	background: #fff;
}

.sp-login__card {
	width: 100%;
	max-width: 400px;
}

.sp-login__logo {
	display: block;
	max-width: 180px;
	max-height: 64px;
	width: auto;
	height: auto;
	margin: 0 0 1.5rem;
	object-fit: contain;
}

.sp-login__logo-fallback {
	width: 48px;
	height: 48px;
	border-radius: 12px;
	background: var(--sp-login-accent, #0e7c6b);
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 700;
	font-size: 1.25rem;
	margin-bottom: 1.5rem;
}

.sp-login__title {
	margin: 0 0 0.5rem;
	font-size: 1.75rem;
	line-height: 1.2;
	font-weight: 700;
	letter-spacing: -0.02em;
}

.sp-login__desc {
	margin: 0 0 1.5rem;
	color: #5a6b7d;
	font-size: 0.95rem;
	line-height: 1.5;
}

.sp-login__error,
.sp-login__status {
	margin: 0 0 1rem;
	padding: 0.75rem 0.9rem;
	border-radius: 10px;
	font-size: 0.9rem;
	line-height: 1.4;
}

.sp-login__error {
	background: #fdeceb;
	color: #8a1f1f;
	border: 1px solid #e8a2a2;
}

.sp-login__status {
	background: #e7f5f2;
	color: #0e4f43;
	border: 1px solid #9ad4c8;
}

.sp-login__field {
	margin: 0 0 1rem;
}

.sp-login__field label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.85rem;
	font-weight: 600;
}

.sp-login__field input[type="text"],
.sp-login__field input[type="password"],
.sp-login__field input[type="email"] {
	width: 100%;
	padding: 0.75rem 0.9rem;
	border: 1px solid #d5dde5;
	border-radius: 10px;
	font-size: 1rem;
	background: #fff;
	transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.sp-login__field input:focus {
	outline: none;
	border-color: var(--sp-login-accent, #0e7c6b);
	box-shadow: 0 0 0 3px color-mix(in srgb, var(--sp-login-accent, #0e7c6b) 25%, transparent);
}

.sp-login__pass-wrap {
	display: flex;
	gap: 0.5rem;
	align-items: stretch;
}

.sp-login__pass-wrap input {
	flex: 1;
}

.sp-login__toggle {
	border: 1px solid #d5dde5;
	background: #f7f9fb;
	border-radius: 10px;
	padding: 0 0.85rem;
	cursor: pointer;
	font-size: 0.85rem;
	font-weight: 600;
	color: #3a4a5c;
	white-space: nowrap;
}

.sp-login__toggle:hover,
.sp-login__toggle:focus-visible {
	border-color: var(--sp-login-accent, #0e7c6b);
	outline: none;
}

.sp-login__remember {
	margin: 0 0 1.25rem;
	font-size: 0.9rem;
	color: #3a4a5c;
}

.sp-login__remember label {
	display: inline-flex;
	gap: 0.45rem;
	align-items: center;
	cursor: pointer;
}

.sp-login__submit {
	width: 100%;
	border: 0;
	border-radius: 999px;
	padding: 0.85rem 1.25rem;
	background: var(--sp-login-accent, #0e7c6b);
	color: #fff;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: filter 0.15s ease, transform 0.15s ease;
}

.sp-login__submit:hover,
.sp-login__submit:focus-visible {
	filter: brightness(0.92);
	outline: none;
}

.sp-login__lost {
	margin: 1rem 0 0;
	text-align: center;
	font-size: 0.9rem;
}

.sp-login__lost a {
	color: var(--sp-login-accent, #0e7c6b);
	text-decoration: none;
	font-weight: 600;
}

.sp-login__lost a:hover,
.sp-login__lost a:focus-visible {
	text-decoration: underline;
}

@media (max-width: 900px) {
	.sp-login__wrap {
		grid-template-columns: 1fr;
	}

	.sp-login__visual {
		min-height: 180px;
		max-height: 220px;
	}

	.sp-login__panel {
		padding: 1.75rem 1.15rem 2.5rem;
		align-items: flex-start;
	}
}

@media (max-width: 420px) {
	.sp-login__visual {
		min-height: 140px;
		max-height: 160px;
	}

	.sp-login__title {
		font-size: 1.45rem;
	}

	.sp-login__pass-wrap {
		flex-direction: column;
	}
}
