/**
 * DOCtrac Password Recovery Stylesheet
 * High-performance, GPU-accelerated CSS with Zero Render-Blocking Dependencies
 */

:root {
	--primary-dark: #071527;
	--primary-navy: #0e2a47;
	--primary-blue: #1b4d7e;
	--accent-cyan: #38bdf8;
	--text-main: #0f172a;
	--text-muted: #64748b;
	--border-color: #e2e8f0;
	--bg-light: #f8fafc;
}

*, *::before, *::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body, html {
	height: 100%;
	font-family: 'Plus Jakarta Sans', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
	background: #f1f5f9;
	color: var(--text-main);
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	text-rendering: optimizeLegibility;
}

@keyframes fadeInUp {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeInScale {
	from { opacity: 0; transform: scale(0.97); }
	to   { opacity: 1; transform: scale(1); }
}
@keyframes pulseGlow {
	0%, 100% { opacity: 0.35; transform: scale(1); }
	50%      { opacity: 0.65; transform: scale(1.06); }
}
@keyframes btnSpin {
	0%   { transform: rotate(0deg); }
	100% { transform: rotate(360deg); }
}
@keyframes dotPulse {
	0%, 80%, 100% { opacity: 0.2; transform: scale(0.8); }
	40%           { opacity: 1; transform: scale(1.2); }
}
@keyframes inputShake {
	10%, 90%      { transform: translateX(-2px); }
	20%, 80%      { transform: translateX(3px); }
	30%, 50%, 70% { transform: translateX(-4px); }
	40%, 60%      { transform: translateX(4px); }
}

.login-wrapper {
	display: flex;
	min-height: 100vh;
	width: 100vw;
	position: relative;
	overflow-x: hidden;
}

/* ══════════════════════════════════════════════════════
   LEFT BRAND HERO PANEL
   ══════════════════════════════════════════════════════ */
.login-brand-panel {
	flex: 1.15;
	background: linear-gradient(145deg, #05111e 0%, #0a1f36 28%, #0f2d4e 58%, #163e68 82%, #1b4f80 100%);
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	align-items: center;
	padding: 48px 56px;
	position: relative;
	overflow: hidden;
	color: #ffffff;
	contain: layout style paint;
}

.brand-glow-1 {
	position: absolute;
	top: -10%;
	left: -10%;
	width: 550px;
	height: 550px;
	background: radial-gradient(circle, rgba(56, 189, 248, 0.16) 0%, rgba(56, 189, 248, 0) 70%);
	border-radius: 50%;
	filter: blur(40px);
	animation: pulseGlow 10s ease-in-out infinite alternate;
	pointer-events: none;
	will-change: transform, opacity;
}

.brand-glow-2 {
	position: absolute;
	bottom: -12%;
	right: -10%;
	width: 500px;
	height: 500px;
	background: radial-gradient(circle, rgba(99, 102, 241, 0.14) 0%, rgba(99, 102, 241, 0) 70%);
	border-radius: 50%;
	filter: blur(40px);
	animation: pulseGlow 12s ease-in-out infinite alternate-reverse;
	pointer-events: none;
	will-change: transform, opacity;
}

.brand-grid-overlay {
	position: absolute;
	inset: 0;
	background-image: radial-gradient(rgba(255, 255, 255, 0.08) 1px, transparent 1px);
	background-size: 32px 32px;
	opacity: 0.7;
	pointer-events: none;
}

.brand-top-badge {
	position: relative;
	z-index: 2;
	align-self: flex-start;
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 6px 14px;
	background: rgba(255, 255, 255, 0.06);
	border: 1px solid rgba(255, 255, 255, 0.12);
	border-radius: 30px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.5px;
	color: #bae6fd;
	text-transform: uppercase;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.brand-top-badge .badge-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: #38bdf8;
	box-shadow: 0 0 8px #38bdf8;
}

.brand-content {
	position: relative;
	z-index: 2;
	text-align: center;
	max-width: 500px;
	margin: auto 0;
	animation: fadeInScale 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.brand-icon-shield {
	width: 80px;
	height: 80px;
	margin: 0 auto 28px;
	background: linear-gradient(135deg, rgba(56, 189, 248, 0.15), rgba(99, 102, 241, 0.1));
	border: 1px solid rgba(255, 255, 255, 0.15);
	border-radius: 24px;
	display: flex;
	align-items: center;
	justify-content: center;
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.brand-icon-shield svg {
	width: 38px;
	height: 38px;
	fill: none;
	stroke: #38bdf8;
	stroke-width: 1.8;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.brand-content h1 {
	font-size: 32px;
	font-weight: 800;
	color: #ffffff;
	margin-bottom: 12px;
	letter-spacing: -0.6px;
}

.brand-content p {
	font-size: 15px;
	color: #94a3b8;
	line-height: 1.65;
	margin-bottom: 32px;
}

/* Feature List */
.brand-checklist {
	display: flex;
	flex-direction: column;
	gap: 14px;
	text-align: left;
	max-width: 380px;
	margin: 0 auto;
}

.checklist-item {
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 13.5px;
	color: #e2e8f0;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 10px 14px;
	border-radius: 10px;
	backdrop-filter: blur(10px);
	-webkit-backdrop-filter: blur(10px);
}

.checklist-icon {
	width: 20px;
	height: 20px;
	border-radius: 50%;
	background: rgba(56, 189, 248, 0.15);
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.checklist-icon svg {
	width: 12px;
	height: 12px;
	stroke: #38bdf8;
	fill: none;
	stroke-width: 2.5;
}

.brand-footer-text {
	position: relative;
	z-index: 2;
	font-size: 12px;
	color: rgba(255, 255, 255, 0.4);
}

/* ══════════════════════════════════════════════════════
   RIGHT FORM PANEL
   ══════════════════════════════════════════════════════ */
.login-form-panel {
	flex: 0.95;
	min-width: 440px;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 56px 48px;
	background: #ffffff;
	position: relative;
	box-shadow: -12px 0 40px rgba(0, 0, 0, 0.04);
}

.login-form-container {
	width: 100%;
	max-width: 380px;
	animation: fadeInUp 0.55s cubic-bezier(0.16, 1, 0.3, 1);
}

.login-logo-wrapper {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 32px;
}

.login-logo-wrapper img {
	max-height: 46px;
	width: auto;
	object-fit: contain;
}

.login-header-group {
	text-align: left;
	margin-bottom: 28px;
}

.login-header-group h2 {
	font-size: 24px;
	font-weight: 700;
	color: #0f172a;
	letter-spacing: -0.5px;
	margin-bottom: 6px;
}

.login-header-group p {
	font-size: 14px;
	color: #64748b;
	line-height: 1.5;
}

.form-group-custom {
	margin-bottom: 22px;
}

.form-label-custom {
	font-size: 13px;
	font-weight: 600;
	color: #334155;
	margin-bottom: 8px;
	display: block;
}

.input-container {
	position: relative;
	display: flex;
	align-items: center;
}

.input-icon-left {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	width: 18px;
	height: 18px;
	stroke: #94a3b8;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
	transition: stroke 0.2s ease;
	pointer-events: none;
	z-index: 2;
}

.input-control-custom {
	width: 100%;
	height: 48px;
	padding: 12px 14px 12px 42px;
	border: 1.5px solid #e2e8f0;
	border-radius: 10px;
	font-size: 14px;
	font-family: inherit;
	color: #0f172a;
	background: #f8fafc;
	transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
	outline: none;
}

.input-control-custom:focus {
	border-color: #0f2d4e;
	background: #ffffff;
	box-shadow: 0 0 0 3.5px rgba(15, 45, 78, 0.1);
}

.input-control-custom.input-error {
	border-color: #ef4444 !important;
	background: #fff5f5 !important;
	box-shadow: 0 0 0 3.5px rgba(239, 68, 68, 0.15) !important;
	animation: inputShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

.input-container:focus-within .input-icon-left {
	stroke: #0f2d4e;
}

.btn-signin {
	width: 100%;
	height: 48px;
	margin-top: 10px;
	background: linear-gradient(135deg, #0a1f36 0%, #0f2d4e 50%, #163e68 100%);
	color: #ffffff;
	border: none;
	border-radius: 10px;
	font-size: 15px;
	font-weight: 600;
	letter-spacing: 0.3px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
	position: relative;
	overflow: hidden;
	box-shadow: 0 4px 14px rgba(10, 31, 54, 0.22);
}

.btn-signin:hover {
	background: linear-gradient(135deg, #05111e 0%, #0a1f36 50%, #0f2d4e 100%);
	box-shadow: 0 8px 22px rgba(10, 31, 54, 0.35);
	transform: translateY(-1.5px);
}

.btn-signin.submitting {
	pointer-events: none;
	background: linear-gradient(135deg, #05111e 0%, #0a1f36 50%, #0f2d4e 100%);
	box-shadow: 0 4px 14px rgba(10, 31, 54, 0.22);
	transform: none;
}

.btn-spinner {
	display: none;
	width: 20px;
	height: 20px;
	border: 2.5px solid rgba(255, 255, 255, 0.25);
	border-top-color: #38bdf8;
	border-right-color: #ffffff;
	border-radius: 50%;
	animation: btnSpin 0.75s cubic-bezier(0.4, 0, 0.2, 1) infinite;
	flex-shrink: 0;
}

.btn-signin.submitting .btn-spinner {
	display: inline-block;
}

.btn-signin.submitting .btn-arrow-icon {
	display: none;
}

.loading-dots {
	display: none;
	align-items: center;
	margin-left: 2px;
}

.btn-signin.submitting .loading-dots {
	display: inline-flex;
}

.loading-dots span {
	animation: dotPulse 1.4s infinite both;
	font-size: 18px;
	line-height: 1;
}
.loading-dots span:nth-child(2) {
	animation-delay: 0.2s;
}
.loading-dots span:nth-child(3) {
	animation-delay: 0.4s;
}

.login-nav-links {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-top: 24px;
}

.back-to-login-link {
	font-size: 13.5px;
	color: #1b4f80;
	text-decoration: none;
	font-weight: 600;
	transition: color 0.2s ease;
	display: inline-flex;
	align-items: center;
	gap: 6px;
}

.back-to-login-link:hover {
	color: #0a1f36;
	text-decoration: underline;
}

.back-to-login-link svg {
	width: 16px;
	height: 16px;
	stroke: currentColor;
	fill: none;
	stroke-width: 2;
	stroke-linecap: round;
	stroke-linejoin: round;
}

.login-form-panel::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	width: 3px;
	height: 100%;
	background: linear-gradient(180deg, #38bdf8 0%, #163e68 50%, #0a1f36 100%);
}

@media (max-width: 980px) {
	.login-wrapper {
		background: linear-gradient(145deg, #05111e 0%, #0a1f36 50%, #0f2d4e 100%);
		align-items: center;
		justify-content: center;
		padding: 24px;
	}
	.login-brand-panel {
		display: none;
	}
	.login-form-panel {
		flex: none;
		width: 100%;
		max-width: 440px;
		min-width: unset;
		border-radius: 16px;
		box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25);
		padding: 44px 32px;
	}
	.login-form-panel::before {
		display: none;
	}
}

@media (max-width: 480px) {
	.login-wrapper {
		padding: 16px;
	}
	.login-form-panel {
		padding: 32px 20px;
		border-radius: 12px;
	}
}
