* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #0a5c2f 0%, #1e7b4a 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* Animated background elements */
body::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: rgba(255, 255, 255, 0.08);
    transform: rotate(45deg);
    top: -50%;
    left: -50%;
    z-index: 1;
    animation: rotate 20s linear infinite;
    overflow: hidden;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.login-wrapper {
    position: relative;
    z-index: 2;

    display: flex;
    justify-content: center;
    align-items: center;

    width: 100%;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 400px; /* controls form width */
    margin: auto;
    background: white;
    border-radius: 20px;
    padding: 40px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);

    transform: translateY(0);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid rgba(10, 92, 47, 0.1);
}

.login-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 30px 50px rgba(10, 92, 47, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header i {
    font-size: 50px;
    color: #0a5c2f;
    margin-bottom: 15px;
}

.login-header h2 {
    color: #0a5c2f;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.login-header p {
    color: #4a5568;
    font-size: 14px;
}

.input-group {
    margin-bottom: 25px;
    position: relative;
}

.input-group label {
    display: block;
    margin-bottom: 8px;
    color: #2d3748;
    font-weight: 500;
    font-size: 14px;
}

.input-group label i {
    margin-right: 5px;
    color: #0a5c2f;
}

.input-group .input-icon {
    position: absolute;
    left: 15px;
    top: 42px;
    color: #0a5c2f;
    font-size: 16px;
    opacity: 0.7;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: white;
    color: #1a202c;
}

.input-group input:focus {
    outline: none;
    border-color: #0a5c2f;
    box-shadow: 0 0 0 4px rgba(10, 92, 47, 0.1);
}

.input-group input:hover {
    border-color: #2d6a4f;
}

.input-group input::placeholder {
    color: #a0aec0;
    opacity: 0.8;
}

.input-group .toggle-password {
    position: absolute;
    right: 15px;
    top: 42px;
    color: #0a5c2f;
    cursor: pointer;
    font-size: 16px;
    opacity: 0.7;
}

.input-group .toggle-password:hover {
    opacity: 1;
}

.login-btn {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #0a5c2f, #1e7b4a);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    letter-spacing: 0.5px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #0a4a26, #166638);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(10, 92, 47, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn i {
    margin-right: 8px;
}

.login-btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.login-btn:hover::before {
    width: 300px;
    height: 300px;
}

.login-footer {
    text-align: center;
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.login-footer p {
    color: #718096;
    font-size: 13px;
}

.error-message {
    background: #fef2f2;
    color: #b91c1c;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #b91c1c;
}

.error-message i {
    font-size: 18px;
}

.success-message {
    background: #f0f9f1;
    color: #0a5c2f;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-left: 4px solid #0a5c2f;
}

/* Loading spinner */
.spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Animated shapes - light green tint */
.shape {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    z-index: 1;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: -150px;
    right: -150px;
    background: rgba(255, 255, 255, 0.15);
}

.shape-2 {
    width: 200px;
    height: 200px;
    bottom: -100px;
    left: -100px;
    background: rgba(255, 255, 255, 0.1);
}

.shape-3 {
    width: 150px;
    height: 150px;
    bottom: 50px;
    right: 50px;
    background: rgba(255, 255, 255, 0.08);
}

/* Responsive */
@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }
    
    .login-header h2 {
        font-size: 24px;
    }
}