/* ============================================
           SELARAS LOGIN - Nature-Inspired Design
           Color Palette from Logo:
           - Dark Teal: #0E423E
           - Light Green: #8DDB90
           - Accent: #5BA88A
        ============================================ */

:root {
	--primary-dark: #0e423e;
	--primary-light: #8ddb90;
	--primary-mid: #5ba88a;
	--accent-warm: #e8f5e9;
	--text-dark: #1a3330;
	--text-muted: #4a6360;
	--card-bg: rgba(255, 255, 255, 0.95);
	--input-border: #c8e6c9;
	--shadow-color: rgba(14, 66, 62, 0.15);
}

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

body {
	min-height: 100vh;
	font-family: "Outfit", sans-serif;
	overflow-x: hidden;
	background: linear-gradient(
		135deg,
		#0e423e 0%,
		#1a5c54 25%,
		#2d7a6f 50%,
		#5ba88a 75%,
		#8ddb90 100%
	);
	position: relative;
}

/* Organic flowing background shapes */
body::before {
	content: "";
	position: fixed;
	top: -50%;
	left: -50%;
	width: 200%;
	height: 200%;
	background: radial-gradient(
			ellipse 80% 50% at 20% 40%,
			rgba(141, 219, 144, 0.3) 0%,
			transparent 50%
		),
		radial-gradient(
			ellipse 60% 80% at 80% 20%,
			rgba(91, 168, 138, 0.25) 0%,
			transparent 45%
		),
		radial-gradient(
			ellipse 50% 60% at 70% 80%,
			rgba(141, 219, 144, 0.2) 0%,
			transparent 40%
		),
		radial-gradient(
			ellipse 70% 40% at 10% 90%,
			rgba(14, 66, 62, 0.3) 0%,
			transparent 50%
		);
	animation: floatBackground 25s ease-in-out infinite;
	pointer-events: none;
	z-index: 0;
}

body::after {
	content: "";
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: radial-gradient(
			circle at 15% 85%,
			rgba(141, 219, 144, 0.15) 0%,
			transparent 25%
		),
		radial-gradient(
			circle at 85% 15%,
			rgba(255, 255, 255, 0.08) 0%,
			transparent 20%
		);
	pointer-events: none;
	z-index: 0;
}

@keyframes floatBackground {
	0%,
	100% {
		transform: translate(0, 0) rotate(0deg);
	}

	25% {
		transform: translate(2%, 1%) rotate(1deg);
	}

	50% {
		transform: translate(0%, 2%) rotate(0deg);
	}

	75% {
		transform: translate(-1%, 1%) rotate(-1deg);
	}
}

/* Decorative leaf patterns */
.leaf-pattern {
	position: fixed;
	width: 100%;
	height: 100%;
	top: 0;
	left: 0;
	pointer-events: none;
	z-index: 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%3Cpath d='M30 5c5 10 15 15 25 15-5 10-15 25-25 35-10-10-20-25-25-35 10 0 20-5 25-15z' fill='%23ffffff' fill-opacity='1'/%3E%3C/svg%3E");
	background-size: 120px 120px;
}

.login-container {
	min-height: 100vh;
	display: flex;
	align-items: stretch;
	position: relative;
	z-index: 1;
}

/* Left Brand Section */
.brand-section {
	flex: 1;
	display: flex;
	flex-direction: column;
	justify-content: center;
	align-items: center;
	padding: 60px;
	position: relative;
}

.logo-container {
	position: relative;
	display: inline-block;
	margin-bottom: 40px;
}

/* Organic glow effect for logo */
.logo-glow {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 280px;
	height: 280px;
	background: radial-gradient(
		circle,
		rgba(141, 219, 144, 0.4) 0%,
		rgba(91, 168, 138, 0.2) 40%,
		transparent 70%
	);
	border-radius: 50%;
	filter: blur(40px);
	animation: pulseGlow 4s ease-in-out infinite;
	z-index: 0;
}

@keyframes pulseGlow {
	0%,
	100% {
		transform: translate(-50%, -50%) scale(1);
		opacity: 0.6;
	}

	50% {
		transform: translate(-50%, -50%) scale(1.1);
		opacity: 0.8;
	}
}

.logo-frame {
	position: relative;
	z-index: 1;
	padding: 30px;
	background: rgba(255, 255, 255, 0.1);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid rgba(255, 255, 255, 0.2);
	border-radius: 24px;
	box-shadow: 0 8px 32px rgba(14, 66, 62, 0.2),
		inset 0 1px 0 rgba(255, 255, 255, 0.2);
	transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1),
		box-shadow 0.4s ease;
}

.logo-frame:hover {
	transform: translateY(-5px) scale(1.02);
	box-shadow: 0 16px 48px rgba(14, 66, 62, 0.25),
		inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.logo-frame img {
	max-width: 140px;
	height: auto;
	display: block;
	filter: drop-shadow(0 4px 8px rgba(14, 66, 62, 0.2));
}

.tagline {
	font-family: "Fraunces", serif;
	font-style: italic;
	font-weight: 400;
	color: rgba(255, 255, 255, 0.95);
	font-size: 1.5rem;
	text-align: center;
	letter-spacing: 0.02em;
	text-shadow: 0 2px 10px rgba(14, 66, 62, 0.3);
	animation: fadeInUp 0.8s ease-out 0.3s both;
}

/* Right Login Section */
.login-section {
	flex: 0 0 580px;
	display: flex;
	align-items: center;
	justify-content: flex-start;
	padding: 40px 60px 40px 40px;
	position: relative;
}

/* Glassmorphism card */
.login-card {
	width: 100%;
	max-width: 400px;
	padding: 48px 40px;
	background: var(--card-bg);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border-radius: 32px;
	box-shadow: 0 24px 80px rgba(14, 66, 62, 0.2),
		0 8px 32px rgba(14, 66, 62, 0.1), inset 0 1px 0 rgba(255, 255, 255, 0.8);
	position: relative;
	overflow: hidden;
	animation: slideInCard 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes slideInCard {
	from {
		opacity: 0;
		transform: translateX(40px) scale(0.95);
	}

	to {
		opacity: 1;
		transform: translateX(0) scale(1);
	}
}

/* Decorative top gradient bar */
.login-card::before {
	content: "";
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 4px;
	background: linear-gradient(
		90deg,
		var(--primary-dark),
		var(--primary-mid),
		var(--primary-light)
	);
	border-radius: 32px 32px 0 0;
}

.welcome-text {
	color: var(--text-muted);
	font-size: 0.95rem;
	font-weight: 400;
	margin-bottom: 8px;
	letter-spacing: 0.03em;
}

.login-card .logo-header {
	margin-bottom: 36px;
}

.login-card .logo-header img {
	width: 65%;
	height: auto;
}

/* Flash messages */
.flash-message {
	margin-bottom: 20px;
}

.form-group {
	margin-bottom: 24px;
}

.form-label {
	color: var(--text-dark);
	font-weight: 500;
	font-size: 0.9rem;
	margin-bottom: 10px;
	display: block;
	letter-spacing: 0.02em;
}

.form-control {
	width: 100%;
	border: 2px solid var(--input-border);
	border-radius: 12px;
	padding: 14px 18px;
	font-size: 1rem;
	font-family: "Outfit", sans-serif;
	background: #fff;
	color: var(--text-dark);
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
	box-shadow: 0 2px 8px rgba(14, 66, 62, 0.04);
}

.form-control:focus {
	outline: none;
	border-color: var(--primary-mid);
	box-shadow: 0 0 0 4px rgba(91, 168, 138, 0.15),
		0 4px 12px rgba(14, 66, 62, 0.08);
	transform: translateY(-1px);
}

.form-control::placeholder {
	color: #a0b5b3;
}

.password-input-wrapper {
	position: relative;
}

.password-input-wrapper .form-control {
	padding-right: 50px;
}

.password-toggle {
	position: absolute;
	right: 16px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: var(--text-muted);
	cursor: pointer;
	padding: 4px;
	transition: color 0.2s ease, transform 0.2s ease;
	font-size: 1.1rem;
}

.password-toggle:hover {
	color: var(--primary-mid);
	transform: translateY(-50%) scale(1.1);
}

/* Login Button */
.btn-login {
	width: 100%;
	padding: 16px 32px;
	margin-top: 16px;
	font-family: "Outfit", sans-serif;
	font-size: 1rem;
	font-weight: 600;
	letter-spacing: 0.03em;
	color: #fff;
	background: linear-gradient(
		135deg,
		var(--primary-dark) 0%,
		var(--primary-mid) 100%
	);
	border: none;
	border-radius: 12px;
	cursor: pointer;
	position: relative;
	overflow: hidden;
	transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
	box-shadow: 0 4px 16px rgba(14, 66, 62, 0.3), 0 2px 4px rgba(14, 66, 62, 0.2);
}

.btn-login::before {
	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;
}

.btn-login:hover {
	transform: translateY(-3px);
	box-shadow: 0 8px 24px rgba(14, 66, 62, 0.35), 0 4px 8px rgba(14, 66, 62, 0.2);
	background: linear-gradient(135deg, #0a3532 0%, #4a9a7a 100%);
}

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

.btn-login:active {
	transform: translateY(-1px);
}

.btn-login:disabled {
	opacity: 0.7;
	cursor: not-allowed;
	transform: none;
}

/* Footer */
.powered-by {
	text-align: center;
	margin-top: 32px;
	padding-top: 24px;
	border-top: 1px solid rgba(14, 66, 62, 0.08);
	color: var(--text-muted);
	font-size: 0.8rem;
	font-weight: 400;
	letter-spacing: 0.05em;
}

/* Animations */
@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}

	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.brand-section .logo-container {
	animation: fadeInUp 0.6s ease-out;
}

/* Mobile Responsive */
@media (max-width: 992px) {
	.login-section {
		flex: 0 0 450px;
	}
}

@media (max-width: 768px) {
	.login-container {
		flex-direction: column;
	}

	.brand-section {
		flex: 0 0 auto;
		padding: 40px 20px 30px;
	}

	.logo-frame {
		padding: 20px;
	}

	.logo-frame img {
		max-width: 100px;
	}

	.logo-glow {
		width: 200px;
		height: 200px;
	}

	.tagline {
		font-size: 1.2rem;
		margin-bottom: 0;
	}

	.login-section {
		flex: 1;
		padding: 20px;
	}

	.login-card {
		padding: 36px 28px;
		border-radius: 24px;
		max-width: 100%;
	}

	.login-card .logo-header img {
		width: 55%;
	}
}

@media (max-width: 480px) {
	.brand-section {
		padding: 30px 15px 20px;
	}

	.logo-frame {
		padding: 16px;
		border-radius: 16px;
	}

	.logo-frame img {
		max-width: 80px;
	}

	.tagline {
		font-size: 1rem;
	}

	.login-section {
		padding: 15px;
	}

	.login-card {
		padding: 28px 24px;
		border-radius: 20px;
	}

	.form-control {
		padding: 12px 16px;
	}

	.btn-login {
		padding: 14px 28px;
	}
}

/* Floating particles effect */
.particles {
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	pointer-events: none;
	z-index: 0;
	overflow: clip;
}

.particle {
	position: absolute;
	width: 6px;
	height: 6px;
	background: rgba(141, 219, 144, 0.4);
	border-radius: 50%;
	opacity: 0;
	animation: floatParticle 15s infinite linear;
	animation-fill-mode: both;
}

.particle:nth-child(1) {
	left: 10%;
	animation-delay: 0s;
	animation-duration: 18s;
}

.particle:nth-child(2) {
	left: 20%;
	animation-delay: 2s;
	animation-duration: 22s;
}

.particle:nth-child(3) {
	left: 35%;
	animation-delay: 4s;
	animation-duration: 16s;
}

.particle:nth-child(4) {
	left: 50%;
	animation-delay: 1s;
	animation-duration: 20s;
}

.particle:nth-child(5) {
	left: 65%;
	animation-delay: 3s;
	animation-duration: 24s;
}

.particle:nth-child(6) {
	left: 80%;
	animation-delay: 5s;
	animation-duration: 19s;
}

@keyframes floatParticle {
	0% {
		transform: translateY(100vh) scale(0);
		opacity: 0;
	}

	10% {
		opacity: 1;
		transform: translateY(90vh) scale(1);
	}

	90% {
		opacity: 1;
		transform: translateY(10vh) scale(1);
	}

	100% {
		transform: translateY(-10vh) scale(0);
		opacity: 0;
	}
}
