:root {
    --primary-dark: #2d5a3b;
    --primary-light: #4c9a6b;
    --primary-accent: #3d7a54;
    --primary-gradient-start: #2a5238;
    --primary-gradient-mid: #2d5a3b;
    --primary-gradient-end: #3a7a4f;
    --accent-gradient-start: #3d7a54;
    --accent-gradient-end: #4c9a6b;
    --light-accent: #6bb88a;
    --text-dark: #1a2521;
    --text-light: #5a6b63;
    --bg-light: #f8fbf9;
    --white: #ffffff;
    --shadow-sm: 0 4px 12px rgba(45, 90, 59, 0.15);
    --shadow-md: 0 8px 24px rgba(45, 90, 59, 0.2);
    --shadow-lg: 0 16px 48px rgba(45, 90, 59, 0.3);
    --shadow-xl: 0 24px 64px rgba(45, 90, 59, 0.4);
}

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

body {
    font-family: 'Segoe UI', 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    background-image: linear-gradient(33deg, #3a7a4f, #2d5a3b);
    background-size: 400% 400%;
    animation: gradientShift 15s ease infinite;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-x: hidden;
    position: relative;
}

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

/* Animated Background with SVG Waves */
.animated-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.bg-svg {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: auto;
    animation: waveAnimation 20s ease-in-out infinite;
    transform-origin: center;
}

.bg-svg-2 {
    animation-delay: -10s;
    opacity: 0.7;
}

@keyframes waveAnimation {
    0%, 100% {
        transform: translateX(0) translateY(0) scaleY(1);
    }
    50% {
        transform: translateX(-50px) translateY(-20px) scaleY(1.1);
    }
}

/* Floating Particles */
.floating-particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--primary-light);
    border-radius: 50%;
    opacity: 0.6;
    animation: floatParticle 25s infinite ease-in-out;
    box-shadow: 0 0 20px var(--primary-light);
}

.particle:nth-child(1) {
    left: 10%;
    animation-delay: 0s;
    width: 6px;
    height: 6px;
}

.particle:nth-child(2) {
    left: 20%;
    animation-delay: 3s;
    width: 10px;
    height: 10px;
    background: var(--primary-accent);
}

.particle:nth-child(3) {
    left: 30%;
    animation-delay: 6s;
    width: 7px;
    height: 7px;
}

.particle:nth-child(4) {
    left: 40%;
    animation-delay: 9s;
    width: 9px;
    height: 9px;
    background: var(--primary-accent);
}

.particle:nth-child(5) {
    left: 50%;
    animation-delay: 12s;
    width: 8px;
    height: 8px;
}

.particle:nth-child(6) {
    left: 60%;
    animation-delay: 15s;
    width: 6px;
    height: 6px;
    background: var(--light-accent);
}

.particle:nth-child(7) {
    left: 70%;
    animation-delay: 18s;
    width: 10px;
    height: 10px;
}

.particle:nth-child(8) {
    left: 80%;
    animation-delay: 21s;
    width: 7px;
    height: 7px;
    background: var(--primary-accent);
}

@keyframes floatParticle {
    0%, 100% {
        transform: translateY(100vh) translateX(0) scale(1);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    50% {
        transform: translateY(0) translateX(50px) scale(1.5);
        opacity: 1;
    }
}

.login-container {
    position: relative;
    width: 100%;
    max-width: 450px;
    z-index: 1;
}

/* Login Card with Vector Background */
.login-card {
    background: var(--white);
    border-radius: 28px;
    padding: 45px 40px;
    box-shadow: var(--shadow-xl);
    animation: cardEntrance 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
    backdrop-filter: blur(20px);
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(76, 154, 107, 0.2);
}

.login-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(76, 154, 107, 0.1), transparent);
    animation: cardShimmer 3s infinite;
}

@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(50px) scale(0.9) rotateX(10deg);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1) rotateX(0deg);
    }
}

@keyframes cardShimmer {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* Vector Animated Background inside Card */
.card-vector-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

.vector-circle {
    animation: vectorPulse 4s ease-in-out infinite;
    transform-origin: center;
}

.vector-circle-1 {
    animation-delay: 0s;
}

.vector-circle-2 {
    animation-delay: 1s;
}

.vector-circle-3 {
    animation-delay: 2s;
}

.vector-circle-4 {
    animation-delay: 1.5s;
}

@keyframes vectorPulse {
    0%, 100% {
        transform: scale(1) translate(0, 0);
        opacity: 0.4;
    }
    50% {
        transform: scale(1.2) translate(10px, -10px);
        opacity: 0.6;
    }
}

.vector-path {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: vectorDraw 8s ease-in-out infinite;
}

.vector-path-2 {
    animation-delay: 4s;
}

@keyframes vectorDraw {
    0% {
        stroke-dashoffset: 1000;
        opacity: 0;
    }
    50% {
        opacity: 1;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.5;
    }
}

/* Logo Section */
.logo-container {
    text-align: center;
    margin-bottom: 40px;
    animation: fadeInDown 1s ease-out 0.3s backwards;
    position: relative;
    z-index: 2;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-wrapper {
    width: auto;
    height: auto;
    margin: 0 auto 35px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    z-index: 2;
    padding: 15px;
}

.logo-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 154, 107, 0.15), transparent 70%);
    opacity: 0.6;
    z-index: -1;
    animation: logoRotate 8s linear infinite;
    filter: blur(20px);
}

.logo-wrapper::after {
    content: '';
    position: absolute;
    inset: -10px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(76, 154, 107, 0.1), transparent 70%);
    opacity: 0.4;
    z-index: -2;
    animation: logoRotate 10s linear infinite reverse;
    filter: blur(30px);
}

@keyframes logoRotate {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

/* Logo Image Styling */
.logo-image {
    max-width: 100%;
    height: auto;
    width: auto;
    max-height: 120px;
    object-fit: contain;
    z-index: 1;
    position: relative;
    animation: logoFloat 3s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(45, 90, 59, 0.2));
    transition: transform 0.3s ease;
}

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

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0) scale(1);
    }
    50% {
        transform: translateY(-6px) scale(1.02);
    }
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 32px;
    animation: fadeInDown 1s ease-out 0.4s backwards;
    position: relative;
    z-index: 2;
}

.welcome-title {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 12px;
    background-image: linear-gradient(33deg, #3d7a54, #2d5a3b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.welcome-text {
    font-size: 15px;
    color: var(--text-light);
    line-height: 1.6;
    margin: 0;
}

/* Form Styles */
.login-form {
    animation: fadeInUp 1s ease-out 0.5s backwards;
    position: relative;
    z-index: 2;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.form-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: color 0.3s ease;
}

.form-label i {
    color: var(--primary-dark);
    font-size: 16px;
    transition: transform 0.3s ease;
}

.form-group:focus-within .form-label {
    color: var(--primary-accent);
}

.form-group:focus-within .form-label i {
    transform: scale(1.2);
    color: var(--primary-accent);
}

.input-wrapper {
    position: relative;
}

.form-control {
    width: 100%;
    padding: 16px 18px;
    font-size: 15px;
    border: 2px solid #e1e8ed;
    border-radius: 14px;
    background: var(--bg-light);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    position: relative;
    z-index: 1;
}

.form-control:hover {
    border-color: var(--primary-light);
    background: var(--white);
}

.form-control:focus {
    border-color: var(--primary-accent);
    background: var(--white);
    box-shadow: 0 0 0 6px rgba(76, 154, 107, 0.12), var(--shadow-sm);
    transform: translateY(-2px);
}

.input-focus-line {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 3px;
    background-image: linear-gradient(33deg, #3d7a54, #2d5a3b);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(-50%);
    border-radius: 2px;
    z-index: 2;
}

.form-control:focus ~ .input-focus-line {
    width: 100%;
}

.password-toggle {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-light);
    cursor: pointer;
    padding: 6px;
    transition: all 0.3s ease;
    z-index: 2;
    border-radius: 6px;
}

.password-toggle:hover {
    color: var(--primary-accent);
    background: rgba(76, 154, 107, 0.1);
    transform: translateY(-50%) scale(1.1);
}

/* Login Button */
.btn-login {
    width: 100%;
    padding: 16px;
    font-size: 17px;
    font-weight: 600;
    color: var(--white);
    background-image: linear-gradient(33deg, #3d7a54, #2d5a3b);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    margin-top: 10px;
    z-index: 2;
    box-shadow: 0 6px 20px rgba(45, 90, 59, 0.3);
}

.btn-login::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.6s ease;
}

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

.btn-login:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(45, 90, 59, 0.4);
    background-image: linear-gradient(33deg, #3d7a54, #2d5a3b);
}

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

.btn-login .ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: scale(0);
    animation: rippleAnimation 0.7s ease-out;
    pointer-events: none;
}

@keyframes rippleAnimation {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-loader {
    display: inline-flex;
    align-items: center;
}

/* Responsive Design */
@media (max-width: 576px) {
    .login-card {
        padding: 35px 28px;
        border-radius: 24px;
    }
    
    .logo-image {
        max-height: 100px;
    }
    
    .welcome-title {
        font-size: 26px;
    }
    
    .welcome-text {
        font-size: 14px;
    }
    
    .form-control {
        padding: 14px 16px;
    }
}

/* Smooth transitions for all interactive elements */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

#rememberedAccounts{
    padding-bottom: 30px;
}

@keyframes buttonPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

@keyframes inputTyping {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.02); }
}

.btn-loader {
    display: inline-flex;
    align-items: center;
    gap: 8px;
}