:root {
	--oadusni-login-logo: none;
	--oadusni-login-photo: none;
	--login-blue: #2a81ba;
	--login-amber: #f4a024;
	--login-ink: #172033;
	--login-muted: #627089;
	--login-border: rgba(42, 129, 186, 0.18);
	--login-surface: rgba(255, 255, 255, 0.96);
	--login-shadow: 0 26px 70px rgba(23, 32, 51, 0.16);
}

html,
body.login {
	min-height: 100%;
	background: #f8fbff;
}

body.login {
	display: grid;
	place-items: center;
	overflow-x: hidden;
	margin: 0;
	color: var(--login-ink);
	font-family: "Poppins", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body.login::before,
body.login::after {
	content: "";
	position: fixed;
	inset: 0;
	pointer-events: none;
}

body.login::before {
	z-index: -2;
	background-color: var(--login-blue);
	background:
		linear-gradient(90deg, rgba(42, 129, 186, 0.96) 0%, rgba(42, 129, 186, 0.84) 44%, rgba(42, 129, 186, 0.38) 72%, rgba(248, 251, 255, 0.72) 100%),
		var(--oadusni-login-photo) center / cover no-repeat;
}

body.login::after {
	z-index: -1;
	background:
		radial-gradient(circle at 9% 18%, rgba(244, 160, 36, 0.16) 0 96px, transparent 98px),
		radial-gradient(circle at 91% 78%, rgba(42, 129, 186, 0.12) 0 150px, transparent 152px),
		url("data:image/svg+xml,%3Csvg viewBox='0 0 1440 900' xmlns='http://www.w3.org/2000/svg' preserveAspectRatio='none'%3E%3Cg fill='none' stroke='%23ffffff' stroke-opacity='.22'%3E%3Cpath d='M20 780 C220 670 310 705 470 610'/%3E%3Cpath d='M0 842 C210 720 360 760 538 650'/%3E%3Ccircle cx='1260' cy='210' r='92'/%3E%3Ccircle cx='1260' cy='210' r='136'/%3E%3Ccircle cx='1260' cy='210' r='182'/%3E%3C/g%3E%3Cg fill='%23ffffff' fill-opacity='.42'%3E%3Ccircle cx='112' cy='186' r='2.2'/%3E%3Ccircle cx='136' cy='186' r='2.2'/%3E%3Ccircle cx='160' cy='186' r='2.2'/%3E%3Ccircle cx='112' cy='210' r='2.2'/%3E%3Ccircle cx='136' cy='210' r='2.2'/%3E%3Ccircle cx='160' cy='210' r='2.2'/%3E%3Ccircle cx='112' cy='234' r='2.2'/%3E%3Ccircle cx='136' cy='234' r='2.2'/%3E%3Ccircle cx='160' cy='234' r='2.2'/%3E%3C/g%3E%3C/svg%3E") center / cover no-repeat;
}

#login {
	position: relative;
	width: min(420px, calc(100vw - 32px));
	padding: clamp(1.25rem, 4vw, 2rem) 0;
}

#login::before {
	content: "Administrace školy";
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;
	margin: 0 0 0.85rem;
	padding: 0.45rem 0.78rem;
	border: 1px solid rgba(255, 255, 255, 0.36);
	border-radius: 999px;
	color: #fff;
	font-size: 0.78rem;
	font-weight: 850;
	letter-spacing: 0.04em;
	text-transform: uppercase;
}

#login::after {
	content: "";
	position: absolute;
	right: -36px;
	top: 112px;
	z-index: 0;
	width: 96px;
	height: 96px;
	border-radius: 50%;
	background: rgba(244, 160, 36, 0.18);
	box-shadow: 0 0 0 18px rgba(244, 160, 36, 0.08);
	pointer-events: none;
}

.login h1 {
	position: relative;
	z-index: 1;
	margin: 0;
}

.login h1 a {
	width: 250px;
	height: 86px;
	margin: 0 0 1rem;
	background-image: var(--oadusni-login-logo);
	background-position: left center;
	background-repeat: no-repeat;
	background-size: contain;
	filter: drop-shadow(0 12px 24px rgba(23, 32, 51, 0.14));
}

.login form {
	position: relative;
	z-index: 1;
	overflow: hidden;
	margin-top: 0;
	padding: clamp(1.25rem, 4vw, 1.75rem);
	border: 1px solid rgba(255, 255, 255, 0.64);
	border-radius: 22px;
	background:
		linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 251, 255, 0.96)),
		radial-gradient(circle at 100% 0%, rgba(244, 160, 36, 0.11) 0 82px, transparent 84px);
	box-shadow: var(--login-shadow);
}

.login form::after {
	content: "";
	position: absolute;
	right: 14px;
	bottom: 12px;
	width: 70px;
	height: 48px;
	border: 1px solid rgba(42, 129, 186, 0.12);
	border-top-left-radius: 70px;
	pointer-events: none;
}

.login label {
	color: var(--login-ink);
	font-size: 0.86rem;
	font-weight: 750;
}

.login form .input,
.login input[type="text"],
.login input[type="password"],
.login input[type="email"] {
	min-height: 48px;
	margin-top: 0.32rem;
	padding: 0.65rem 0.85rem;
	border: 1px solid var(--login-border);
	border-radius: 14px;
	background: #fff;
	color: var(--login-ink);
	font-family: inherit;
	font-size: 1rem;
	font-weight: 600;
	box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
	transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.login form .input:focus,
.login input[type="text"]:focus,
.login input[type="password"]:focus,
.login input[type="email"]:focus {
	border-color: rgba(42, 129, 186, 0.72);
	box-shadow: 0 0 0 4px rgba(42, 129, 186, 0.14);
	outline: none;
}

.login .forgetmenot {
	display: flex;
	align-items: center;
	min-height: 38px;
}

.login .forgetmenot label {
	display: inline-flex;
	align-items: center;
	gap: 0.45rem;
	color: var(--login-muted);
	font-size: 0.78rem;
	font-weight: 700;
}

.login input[type="checkbox"] {
	width: 18px;
	height: 18px;
	border-color: rgba(42, 129, 186, 0.28);
	border-radius: 6px;
	box-shadow: none;
}

.login input[type="checkbox"]:checked::before {
	width: 1.2rem;
	height: 1.2rem;
	margin: -0.12rem 0 0 -0.16rem;
	color: var(--login-blue);
}

.wp-core-ui .button-primary {
	min-height: 46px;
	padding: 0 1.25rem;
	border: 0;
	border-radius: 14px;
	background: linear-gradient(135deg, var(--login-amber), #ff8f00);
	color: var(--login-ink);
	font-family: inherit;
	font-size: 0.9rem;
	font-weight: 900;
	box-shadow: 0 14px 30px rgba(244, 160, 36, 0.26);
	text-shadow: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
}

.wp-core-ui .button-primary:hover,
.wp-core-ui .button-primary:focus {
	background: linear-gradient(135deg, #ffad34, #ff8f00);
	box-shadow: 0 18px 34px rgba(244, 160, 36, 0.34);
	color: var(--login-ink);
	filter: saturate(1.03);
	transform: translateY(-1px);
}

.wp-core-ui .button-primary:focus {
	outline: 3px solid rgba(255, 255, 255, 0.7);
	outline-offset: 2px;
}

.login #nav,
.login #backtoblog,
.login .privacy-policy-page-link {
	position: relative;
	z-index: 1;
	margin: 1rem 0 0;
	padding: 0;
	color: rgba(255, 255, 255, 0.88);
	font-size: 0.82rem;
	font-weight: 700;
	text-align: left;
}

.login #nav a,
.login #backtoblog a,
.login .privacy-policy-page-link a {
	color: #fff;
	text-decoration: none;
	text-shadow: 0 1px 14px rgba(23, 32, 51, 0.18);
}

.login #nav a:hover,
.login #backtoblog a:hover,
.login .privacy-policy-page-link a:hover,
.login #nav a:focus,
.login #backtoblog a:focus,
.login .privacy-policy-page-link a:focus {
	color: #fff;
	text-decoration: underline;
	text-decoration-color: var(--login-amber);
	text-decoration-thickness: 2px;
	text-underline-offset: 4px;
}

.login .message,
.login .notice,
.login #login_error {
	position: relative;
	z-index: 1;
	margin: 0 0 1rem;
	padding: 0.9rem 1rem;
	border: 1px solid rgba(42, 129, 186, 0.18);
	border-left: 4px solid var(--login-amber);
	border-radius: 16px;
	background: var(--login-surface);
	color: var(--login-ink);
	font-size: 0.86rem;
	font-weight: 650;
	box-shadow: 0 16px 36px rgba(23, 32, 51, 0.1);
}

.login #login_error {
	border-left-color: #d63638;
}

.login .button.wp-hide-pw {
	top: 5px;
	right: 5px;
	width: 40px;
	height: 40px;
	border-radius: 12px;
	color: var(--login-blue);
}

.login .button.wp-hide-pw:focus {
	border-color: transparent;
	box-shadow: 0 0 0 3px rgba(42, 129, 186, 0.14);
}

.login .language-switcher {
	position: relative;
	z-index: 1;
	margin-top: 1rem;
	padding: 0;
}

.login .language-switcher select {
	min-height: 42px;
	border-color: rgba(255, 255, 255, 0.58);
	border-radius: 12px;
	background-color: rgba(255, 255, 255, 0.92);
	color: var(--login-ink);
	font-family: inherit;
	font-weight: 700;
}

.login .language-switcher .button {
	min-height: 42px;
	border-color: rgba(255, 255, 255, 0.5);
	border-radius: 12px;
	background: rgba(255, 255, 255, 0.94);
	color: var(--login-blue);
	font-family: inherit;
	font-weight: 850;
}

/* Final contrast polish. */
#login::before {
	content: "Administrace školy";
	position: relative;
	z-index: 2;
	padding: 0.52rem 0.88rem;
	border: 1px solid rgba(42, 129, 186, 0.16);
	background: rgba(255, 255, 255, 0.95);
	color: var(--login-blue);
	box-shadow: 0 14px 34px rgba(23, 32, 51, 0.12);
}

.login h1 {
	display: inline-flex;
	align-items: center;
	gap: 0.95rem;
	box-sizing: border-box;
	width: 100%;
	margin: 0 0 1rem;
	padding: 0.72rem 1rem;
	border: 1px solid rgba(42, 129, 186, 0.14);
	border-radius: 22px;
	background: rgba(255, 255, 255, 0.96);
	box-shadow: 0 18px 44px rgba(23, 32, 51, 0.14);
}

.login h1 a {
	flex: 0 0 92px;
	width: 92px;
	height: 68px;
	margin: 0;
	background-position: center;
	filter: none;
}

.login h1::after {
	content: var(--oadusni-login-title, "Obchodní akademie Dušní");
	display: block;
	min-width: 0;
	padding-left: 0.95rem;
	border-left: 1px solid rgba(42, 129, 186, 0.14);
	color: var(--login-ink);
	font-size: clamp(1rem, 2.45vw, 1.2rem);
	font-weight: 900;
	line-height: 1.16;
}

.login #nav,
.login #backtoblog,
.login .privacy-policy-page-link {
	padding: 0.78rem 1rem;
	border: 1px solid rgba(255, 255, 255, 0.62);
	border-radius: 16px;
	background: rgba(255, 255, 255, 0.9);
	color: var(--login-muted);
	box-shadow: 0 12px 30px rgba(23, 32, 51, 0.1);
}

.login #nav a,
.login #backtoblog a,
.login .privacy-policy-page-link a {
	color: var(--login-blue);
	text-shadow: none;
}

.login #nav a:hover,
.login #backtoblog a:hover,
.login .privacy-policy-page-link a:hover,
.login #nav a:focus,
.login #backtoblog a:focus,
.login .privacy-policy-page-link a:focus {
	color: var(--login-ink);
}

@media (max-width: 640px) {
	body.login {
		display: block;
		padding: 22px 16px;
	}

	body.login::before {
		background:
			linear-gradient(180deg, rgba(42, 129, 186, 0.96) 0%, rgba(42, 129, 186, 0.84) 54%, rgba(42, 129, 186, 0.54) 100%),
			var(--oadusni-login-photo) center / cover no-repeat;
	}

	#login {
		width: 100%;
		padding: 0;
	}

	#login::after {
		display: none;
	}

	.login h1 {
		gap: 0.75rem;
		padding: 0.65rem 0.8rem;
		border-radius: 18px;
	}

	.login h1 a {
		flex-basis: 74px;
		width: 74px;
		height: 58px;
	}

	.login h1::after {
		padding-left: 0.75rem;
		font-size: clamp(1rem, 5vw, 1.2rem);
	}

	.login form {
		border-radius: 18px;
	}

	.login .submit {
		margin-top: 0.85rem;
	}

	.wp-core-ui .button-primary {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
		animation-iteration-count: 1 !important;
		scroll-behavior: auto !important;
	}
}
