/* ═══════════════════════════════════════════
   Corteva Login – Premium Modern Design
   ═══════════════════════════════════════════ */

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	min-height: 100vh;
	display: flex;
	align-items: center;
	justify-content: center;
	background: linear-gradient(135deg, #0059A7 0%, #0072CE 30%, #00A3E0 70%, #40C4FF 100%);
	background-size: 400% 400%;
	animation: gradientShift 12s ease infinite;
	position: relative;
	overflow: hidden;
}

@keyframes gradientShift {
	0% { background-position: 0% 50%; }
	50% { background-position: 100% 50%; }
	100% { background-position: 0% 50%; }
}

/* Animated background shapes */
body::before,
body::after {
	content: '';
	position: fixed;
	border-radius: 50%;
	opacity: 0.08;
	background: #ffffff;
	z-index: 0;
}

body::before {
	width: 500px;
	height: 500px;
	top: -150px;
	right: -100px;
	animation: floatBubble 20s ease-in-out infinite;
}

body::after {
	width: 350px;
	height: 350px;
	bottom: -100px;
	left: -80px;
	animation: floatBubble 15s ease-in-out infinite reverse;
}

@keyframes floatBubble {
	0%, 100% { transform: translate(0, 0) scale(1); }
	25% { transform: translate(30px, -40px) scale(1.05); }
	50% { transform: translate(-20px, -60px) scale(0.95); }
	75% { transform: translate(40px, -20px) scale(1.02); }
}

/* ── Login Container ── */
.login-wrapper {
	width: 100%;
	max-width: 420px;
	padding: 20px;
	z-index: 1;
	animation: slideUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
	opacity: 0;
}

@keyframes slideUp {
	from {
		opacity: 0;
		transform: translateY(40px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

/* ── Glass Card ── */
.login-card {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-radius: 24px;
	padding: 24px 36px 36px;
	box-shadow:
		0 24px 80px rgba(0, 0, 0, 0.15),
		0 8px 32px rgba(0, 0, 0, 0.08),
		inset 0 1px 0 rgba(255, 255, 255, 0.6);
	position: relative;
	overflow: hidden;
}

/* Subtle top accent line */
.login-card::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(90deg, #0072CE, #00A3E0, #40C4FF);
	border-radius: 24px 24px 0 0;
}

/* ── Logo ── */
.login-logo {
	text-align: center;
	margin-bottom: 20px;
}

.login-logo img {
	height: 56px;
	width: auto;
	transition: transform 0.3s ease;
}

.login-logo img:hover {
	transform: scale(1.05);
}

/* ── Title ── */
.login-title {
	text-align: center;
	font-size: 24px;
	font-weight: 700;
	color: #1a1a2e;
	margin-bottom: 6px;
	letter-spacing: -0.5px;
}

.login-subtitle {
	text-align: center;
	font-size: 14px;
	color: #9CA3AF;
	margin-bottom: 32px;
	font-weight: 400;
}

/* ── Error / Success Messages ── */
.login-alert {
	padding: 12px 16px;
	border-radius: 12px;
	font-size: 13px;
	font-weight: 500;
	margin-bottom: 20px;
	display: flex;
	align-items: center;
	gap: 10px;
	animation: shakeAlert 0.4s ease;
}

.login-alert--error {
	background: #FEF2F2;
	color: #DC2626;
	border: 1px solid #FECACA;
}

.login-alert--success {
	background: #F0FDF4;
	color: #16A34A;
	border: 1px solid #BBF7D0;
}

.login-alert i {
	font-size: 16px;
	flex-shrink: 0;
}

@keyframes shakeAlert {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-6px); }
	40% { transform: translateX(6px); }
	60% { transform: translateX(-4px); }
	80% { transform: translateX(4px); }
}

/* ── Form Fields ── */
.login-field {
	margin-bottom: 20px;
	position: relative;
}

.login-field label {
	display: block;
	font-size: 13px;
	font-weight: 600;
	color: #374151;
	margin-bottom: 8px;
	letter-spacing: 0.2px;
}

.login-field .field-wrapper {
	position: relative;
}

.login-field .field-icon {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	color: #9CA3AF;
	font-size: 16px;
	transition: color 0.3s ease;
	z-index: 2;
}

.login-field input {
	width: 100%;
	padding: 14px 16px 14px 46px;
	font-size: 15px;
	font-family: 'Inter', sans-serif;
	font-weight: 400;
	color: #1a1a2e;
	background: #F8FAFC;
	border: 2px solid #E5E7EB;
	border-radius: 14px;
	outline: none;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	-webkit-appearance: none;
}

.login-field input::placeholder {
	color: #C4C9D2;
	font-weight: 400;
}

.login-field input:focus {
	border-color: #0072CE;
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(0, 114, 206, 0.1);
}

.login-field input:focus ~ .field-icon,
.login-field input:focus + .field-icon {
	color: #0072CE;
}

/* Password toggle */
.pwd-toggle {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: #9CA3AF;
	font-size: 16px;
	cursor: pointer;
	padding: 4px;
	transition: color 0.3s ease;
	z-index: 2;
}

.pwd-toggle:hover {
	color: #0072CE;
}

/* ── Login Button ── */
.login-btn {
	width: 100%;
	padding: 15px 24px;
	font-size: 16px;
	font-family: 'Inter', sans-serif;
	font-weight: 600;
	color: #ffffff;
	background: linear-gradient(135deg, #0072CE 0%, #005EA6 100%);
	border: none;
	border-radius: 14px;
	cursor: pointer;
	margin-top: 8px;
	position: relative;
	overflow: hidden;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	letter-spacing: 0.3px;
}

.login-btn:hover {
	transform: translateY(-2px);
	box-shadow: 0 8px 25px rgba(0, 114, 206, 0.35);
	background: linear-gradient(135deg, #0082E8 0%, #0068B8 100%);
}

.login-btn:active {
	transform: translateY(0) scale(0.98);
	box-shadow: 0 2px 10px rgba(0, 114, 206, 0.2);
}

/* Button shimmer effect */
.login-btn::after {
	content: '';
	position: absolute;
	top: 0;
	left: -100%;
	width: 100%;
	height: 100%;
	background: linear-gradient(
		90deg,
		transparent,
		rgba(255, 255, 255, 0.2),
		transparent
	);
	transition: left 0.5s ease;
}

.login-btn:hover::after {
	left: 100%;
}

/* ── Footer ── */
.login-footer {
	text-align: center;
	margin-top: 28px;
	padding-top: 24px;
	border-top: 1px solid #F3F4F6;
}

.login-footer-text {
	font-size: 12px;
	color: #9CA3AF;
	line-height: 1.6;
}

/* ── Bottom bar outside card ── */
.login-bottom {
	text-align: center;
	margin-top: 24px;
}

.login-bottom-text {
	font-size: 12px;
	color: rgba(255, 255, 255, 0.7);
}

.login-status {
	display: inline-block;
	padding: 4px 14px;
	border-radius: 20px;
	font-size: 11px;
	font-weight: 600;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 1px;
}

.login-status--online {
	background: rgba(34, 197, 94, 0.2);
	color: #22C55E;
	border: 1px solid rgba(34, 197, 94, 0.3);
}

.login-status--offline {
	background: rgba(239, 68, 68, 0.2);
	color: #EF4444;
	border: 1px solid rgba(239, 68, 68, 0.3);
}

/* ── Responsive ── */
@media (max-width: 480px) {
	.login-wrapper {
		padding: 16px;
	}
	.login-card {
		padding: 20px 24px 28px;
		border-radius: 20px;
	}
	.login-title {
		font-size: 22px;
	}
}

/* ── Standalone PWA ── */
@media (display-mode: standalone) {
	body {
		padding-top: env(safe-area-inset-top, 0px);
	}
}
