/* 后台登录页 — 工业紧固件 · 工业专业风 */
:root {
	--navy-deep: #071525;
	--navy: #0c4d89;
	--navy-mid: #1565a8;
	--amber: #ff9e16;
	--amber-light: #ffb84d;
	--white: #ffffff;
	--gray-100: #f4f7fb;
	--gray-400: #94a3b8;
	--gray-600: #475569;
	--shadow-lg: 0 24px 64px rgba(7, 21, 37, 0.35);
	--radius: 16px;
	--font-display: 'Playfair Display', Georgia, serif;
	--font-ui: 'DM Sans', system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
	height: 100%;
	font-family: var(--font-ui);
	-webkit-font-smoothing: antialiased;
}

body.login-page {
	min-height: 100vh;
	background: var(--navy-deep);
	overflow-x: hidden;
}

.login-bg {
	position: fixed;
	inset: 0;
	z-index: 0;
	background:
		radial-gradient(ellipse 80% 60% at 20% 80%, rgba(255, 158, 22, 0.12) 0%, transparent 55%),
		radial-gradient(ellipse 60% 50% at 85% 15%, rgba(21, 101, 168, 0.35) 0%, transparent 50%),
		linear-gradient(145deg, #071525 0%, #0c4d89 48%, #0a3060 100%);
}

.login-bg::before {
	content: '';
	position: absolute;
	inset: 0;
	opacity: 0.04;
	background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='1'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}

.bearing-ring {
	position: absolute;
	border-radius: 50%;
	border: 2px solid rgba(255, 255, 255, 0.06);
	pointer-events: none;
}
.bearing-ring--1 {
	width: 520px; height: 520px;
	top: -120px; right: -80px;
	animation: ring-spin 80s linear infinite;
}
.bearing-ring--2 {
	width: 320px; height: 320px;
	bottom: 10%; left: -60px;
	border-color: rgba(255, 158, 22, 0.08);
	animation: ring-spin 60s linear infinite reverse;
}
.bearing-ring--3 {
	width: 180px; height: 180px;
	top: 35%; right: 18%;
	border-style: dashed;
	border-color: rgba(255, 255, 255, 0.05);
	animation: ring-spin 40s linear infinite;
}

@keyframes ring-spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

.login-shell {
	position: relative;
	z-index: 1;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
}

.login-card {
	display: flex;
	width: 100%;
	max-width: 960px;
	min-height: 560px;
	background: var(--white);
	border-radius: calc(var(--radius) + 4px);
	box-shadow: var(--shadow-lg);
	overflow: hidden;
	animation: card-rise 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}

@keyframes card-rise {
	from { opacity: 0; transform: translateY(28px); }
	to { opacity: 1; transform: translateY(0); }
}

.login-welcome {
	flex: 1.15;
	position: relative;
	padding: 48px 44px;
	background: linear-gradient(160deg, var(--navy) 0%, #083a6e 55%, #062848 100%);
	color: var(--white);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	overflow: hidden;
}

.login-welcome::after {
	content: '';
	position: absolute;
	bottom: -80px; right: -80px;
	width: 260px; height: 260px;
	border-radius: 50%;
	border: 40px solid rgba(255, 158, 22, 0.15);
	pointer-events: none;
}

.welcome-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--amber-light);
	background: rgba(255, 158, 22, 0.12);
	border: 1px solid rgba(255, 158, 22, 0.25);
	padding: 6px 14px;
	border-radius: 100px;
	width: fit-content;
	animation: fade-in 0.6s 0.2s both;
}

.welcome-badge svg {
	width: 14px; height: 14px;
	fill: var(--amber);
}

.welcome-greeting {
	font-family: var(--font-display);
	font-size: clamp(1.75rem, 3.5vw, 2.35rem);
	font-weight: 600;
	line-height: 1.25;
	margin-top: 28px;
	animation: fade-in 0.7s 0.35s both;
}

.welcome-greeting em {
	font-style: normal;
	color: var(--amber-light);
}

.welcome-sub {
	margin-top: 16px;
	font-size: 15px;
	line-height: 1.7;
	color: rgba(255, 255, 255, 0.78);
	max-width: 340px;
	animation: fade-in 0.7s 0.5s both;
}

.welcome-quote {
	margin-top: 32px;
	padding-left: 16px;
	border-left: 3px solid var(--amber);
	font-size: 13px;
	line-height: 1.65;
	color: rgba(255, 255, 255, 0.55);
	font-style: italic;
	animation: fade-in 0.7s 0.65s both;
}

.welcome-footer {
	margin-top: auto;
	padding-top: 40px;
	animation: fade-in 0.7s 0.8s both;
}

.welcome-logo {
	display: flex;
	align-items: center;
	gap: 14px;
}

.welcome-logo img {
	max-height: 44px;
	max-width: 160px;
	object-fit: contain;
	opacity: 0.92;
}

.welcome-logo-text {
	font-size: 13px;
	font-weight: 500;
	line-height: 1.4;
	color: rgba(255, 255, 255, 0.7);
}

.welcome-logo-text strong {
	display: block;
	color: var(--white);
	font-size: 14px;
	font-weight: 600;
}

.welcome-tags {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-top: 20px;
}

.welcome-tags span {
	font-size: 11px;
	padding: 4px 10px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.08);
	color: rgba(255, 255, 255, 0.65);
	border: 1px solid rgba(255, 255, 255, 0.1);
}

@keyframes fade-in {
	from { opacity: 0; transform: translateY(12px); }
	to { opacity: 1; transform: translateY(0); }
}

.login-form-panel {
	flex: 0.85;
	padding: 48px 40px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	background: var(--gray-100);
	animation: fade-in 0.8s 0.3s both;
}

.form-header { margin-bottom: 32px; }

.form-header h2 {
	font-family: var(--font-display);
	font-size: 1.65rem;
	font-weight: 600;
	color: var(--navy-deep);
	margin-bottom: 6px;
}

.form-header p {
	font-size: 14px;
	color: var(--gray-600);
}

.login-form .field { margin-bottom: 22px; }

.login-form label {
	display: block;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--gray-600);
	margin-bottom: 8px;
}

.input-wrap { position: relative; }

.input-wrap svg {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px; height: 18px;
	fill: var(--gray-400);
	pointer-events: none;
	transition: fill 0.2s;
}

.login-form input[type="text"],
.login-form input[type="password"],
.login-form input[type="email"] {
	width: 100%;
	padding: 14px 14px 14px 44px;
	font-family: var(--font-ui);
	font-size: 15px;
	color: var(--navy-deep);
	background: var(--white);
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	outline: none;
	transition: border-color 0.2s, box-shadow 0.2s;
}

.login-form input[type="email"] {
	padding-right: 14px;
}

.login-form input:focus {
	border-color: var(--navy);
	box-shadow: 0 0 0 3px rgba(12, 77, 137, 0.12);
}

.login-form input:focus + svg,
.input-wrap:focus-within svg { fill: var(--navy); }

.remember-row {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0;
	cursor: pointer;
	user-select: none;
}

.remember-input {
	position: absolute;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

.remember-box {
	flex-shrink: 0;
	width: 16px;
	height: 16px;
	border: 1px solid #cbd5e1;
	border-radius: 4px;
	background: var(--white);
	display: flex;
	align-items: center;
	justify-content: center;
	transition: border-color 0.15s, background 0.15s;
}

.remember-check {
	width: 10px;
	height: 10px;
	fill: var(--white);
	opacity: 0;
	transition: opacity 0.15s;
}

.remember-input:checked + .remember-box {
	background: var(--navy);
	border-color: var(--navy);
}

.remember-input:checked + .remember-box .remember-check {
	opacity: 1;
}

.remember-input:focus-visible + .remember-box {
	border-color: var(--navy);
}

.remember-text {
	font-size: 13px;
	font-weight: 400;
	color: var(--gray-600);
	line-height: 1;
}

.remember-row:hover .remember-text {
	color: var(--navy-deep);
}

.form-meta {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin: -2px 0 20px;
}

.forgot-link {
	font-size: 13px;
	color: var(--gray-600);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.15s;
}

.forgot-link:hover {
	color: var(--amber);
}

.forgot-overlay {
	position: fixed;
	inset: 0;
	z-index: 100;
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 24px;
	background: rgba(7, 21, 37, 0.62);
	backdrop-filter: blur(6px);
	animation: forgot-fade-in 0.25s ease both;
}

@keyframes forgot-fade-in {
	from { opacity: 0; }
	to { opacity: 1; }
}

.forgot-overlay[hidden] {
	display: none;
}

body.forgot-open {
	overflow: hidden;
}

.forgot-dialog {
	position: relative;
	width: 100%;
	max-width: 420px;
	overflow: hidden;
	background: var(--white);
	border-radius: calc(var(--radius) + 4px);
	box-shadow: 0 28px 72px rgba(7, 21, 37, 0.32);
	animation: card-rise 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.forgot-accent {
	height: 4px;
	background: linear-gradient(90deg, var(--navy) 0%, var(--amber) 50%, var(--amber-light) 100%);
}

.forgot-close {
	position: absolute;
	top: 14px;
	right: 14px;
	z-index: 2;
	width: 34px;
	height: 34px;
	border: none;
	background: rgba(255, 255, 255, 0.9);
	font-size: 0;
	line-height: 0;
	color: var(--gray-600);
	cursor: pointer;
	border-radius: 10px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: color 0.15s, background 0.15s, transform 0.15s;
}

.forgot-close svg {
	width: 18px;
	height: 18px;
	fill: currentColor;
}

.forgot-close:hover {
	color: var(--navy-deep);
	background: var(--white);
	transform: rotate(90deg);
}

.forgot-header {
	padding: 28px 28px 0;
	text-align: center;
}

.forgot-icon {
	width: 52px;
	height: 52px;
	margin: 0 auto 16px;
	border-radius: 14px;
	background: linear-gradient(145deg, rgba(12, 77, 137, 0.12) 0%, rgba(255, 158, 22, 0.08) 100%);
	border: 1px solid rgba(12, 77, 137, 0.2);
	display: flex;
	align-items: center;
	justify-content: center;
}

.forgot-icon svg {
	width: 24px;
	height: 24px;
	fill: var(--navy);
}

.forgot-title {
	font-family: var(--font-display);
	font-size: 1.45rem;
	font-weight: 600;
	color: var(--navy-deep);
	margin-bottom: 8px;
}

.forgot-desc {
	font-size: 13px;
	line-height: 1.65;
	color: var(--gray-600);
	max-width: 320px;
	margin: 0 auto;
}

.forgot-steps {
	display: flex;
	justify-content: center;
	gap: 8px;
	margin-top: 16px;
	flex-wrap: wrap;
}

.forgot-step {
	font-size: 11px;
	font-weight: 600;
	letter-spacing: 0.04em;
	padding: 5px 12px;
	border-radius: 100px;
	color: var(--gray-400);
	background: rgba(255, 255, 255, 0.6);
	border: 1px solid #e2e8f0;
}

.forgot-step--active {
	color: var(--navy);
	background: rgba(12, 77, 137, 0.08);
	border-color: rgba(12, 77, 137, 0.25);
}

.forgot-step--done {
	color: var(--gray-600);
}

.forgot-form[hidden] {
	display: none;
}

#forgotCode {
	letter-spacing: 0.35em;
	font-weight: 600;
	text-align: center;
	padding-left: 44px;
	padding-right: 14px;
}

.forgot-back {
	display: block;
	width: 100%;
	margin-top: 12px;
	padding: 10px;
	font-family: var(--font-ui);
	font-size: 13px;
	font-weight: 500;
	color: var(--gray-600);
	background: transparent;
	border: none;
	cursor: pointer;
	transition: color 0.15s;
}

.forgot-back:hover {
	color: var(--navy);
}

.forgot-form {
	padding: 24px 28px 28px;
	background: var(--gray-100);
	border-top: 1px solid rgba(12, 77, 137, 0.08);
}

.forgot-form .field {
	margin-bottom: 18px;
}

.forgot-form .field:last-of-type {
	margin-bottom: 8px;
}

.forgot-form .field-hint {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	line-height: 1.5;
	color: var(--gray-400);
}

.forgot-tip {
	min-height: 18px;
	margin: 0 0 16px;
	padding: 8px 12px;
	font-size: 13px;
	line-height: 1.5;
	border-radius: 8px;
	background: transparent;
}

.forgot-tip:empty {
	display: none;
}

.forgot-tip--error {
	color: #c62828;
	background: rgba(229, 57, 53, 0.08);
	border: 1px solid rgba(229, 57, 53, 0.15);
}

.forgot-tip--success {
	color: #1b5e20;
	background: rgba(46, 125, 50, 0.08);
	border: 1px solid rgba(46, 125, 50, 0.15);
}

.btn-login--block {
	width: 100%;
	margin-top: 2px;
}

.form-actions {
	display: flex;
	gap: 12px;
	margin-top: 8px;
}

.btn-login {
	flex: 1;
	padding: 14px 24px;
	font-family: var(--font-ui);
	font-size: 15px;
	font-weight: 600;
	color: var(--white);
	background: linear-gradient(135deg, var(--navy) 0%, var(--navy-mid) 100%);
	border: none;
	border-radius: 10px;
	cursor: pointer;
	transition: transform 0.2s, box-shadow 0.2s;
	box-shadow: 0 4px 14px rgba(12, 77, 137, 0.35);
}

.btn-login:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 24px rgba(12, 77, 137, 0.4);
}

.btn-login:active { transform: translateY(0); }

.btn-reset {
	padding: 14px 20px;
	font-family: var(--font-ui);
	font-size: 14px;
	font-weight: 500;
	color: var(--gray-600);
	background: transparent;
	border: 1.5px solid #cbd5e1;
	border-radius: 10px;
	cursor: pointer;
	transition: border-color 0.2s, color 0.2s;
}

.btn-reset:hover {
	border-color: var(--navy);
	color: var(--navy);
}

.form-footer {
	margin-top: 28px;
	padding-top: 20px;
	border-top: 1px solid #e2e8f0;
	font-size: 12px;
	color: var(--gray-400);
	text-align: center;
	line-height: 1.6;
}

.form-footer strong {
	color: var(--navy);
	font-weight: 600;
}

@media (max-width: 768px) {
	.login-card {
		flex-direction: column;
		min-height: auto;
		max-width: 420px;
	}
	.login-welcome { padding: 32px 28px; }
	.welcome-greeting { font-size: 1.5rem; margin-top: 16px; }
	.welcome-quote { display: none; }
	.login-form-panel { padding: 32px 28px 36px; }
}
