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

body {
    font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
    /* background: linear-gradient(135deg, #fffbea 0%, #e8f5e9 100%); */
    background-color: #ecf0f1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    color: #2b2b2b; 
}

.login-container {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1), 0 4px 16px rgba(0, 0, 0, 0.05);
    padding: 30px;
    width: 100%;
    max-width: 420px;
    margin-top: 10px;
    border-top: 3px solid #ffde00;
    overflow: hidden;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-header h2 {
    /* color: #2d5f3f; */
    color: #000000;
    font-size: 1.4rem;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    margin-bottom: 40px;
    width: 100%;
}

.top-logo {
    text-align: center;
    margin-bottom: 8px;
    height: 100px; /* reserve space */
    display: flex;
    align-items: center;
    justify-content: center;
}

.top-logo img {
    max-height: 100px;
    width: auto;
    max-width: 100%;
    display: block;
}

.top-logo h3 {
    color: #2d5f3f;
    font-size: 25px;
    font-weight: 600;
    margin-top: 20px;
}

.form-group .form-label {
    color: #2d5f3f; 
    font-size: 0.95rem;
    margin-bottom: 2px;
    display: inline-block;
    font-weight: 600;
}

.form-group {
    margin-bottom: 24px;
    position: relative;
    /* min-height: 92px; */
}

.form-group input {
    width: 100%;
    padding: 13px 16px;
    padding-left: 46px !important;
    border: 1px solid #e1e8e5;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s ease;
    color: #1f2937;
    /* background-color: #fafafa; */
}

/* Email icon */
.form-group:first-of-type::before {
    content: '\f0e0'; /* FontAwesome envelope code */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 16px;
    top: 38px; /* Adjust based on label height */
    color: #6b7280;
    font-size: 15px;
    pointer-events: none;
}

/* Password icon */
.form-group:nth-of-type(2)::before {
    content: '\f023'; /* FontAwesome lock code */
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    position: absolute;
    left: 16px;
    top: 38px; /* Adjust based on label height */
    color: #6b7280;
    font-size: 15px;
    pointer-events: none;
}

/* Icon color on focus */
.form-group input:focus {
    padding-left: 46px !important;
}

.form-group input:focus {
    outline: none;
    border-color: #009432;
    background: white;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.form-group input::placeholder {
    color: #9ca3af;
}

.form-group.success input {
    border-color: #009432;
    background-color: #f1f8f4;
}

.form-group.error input {
    border-color: #ef4444;
    /* background-color: #fef2f2; */
}

.error {
    color: #ef4444;
    font-size: 0.80rem;
    margin-top: 6px;
    font-weight: 500;
}

.login-btn {
    width: 100%;
    padding: 14px;
    background: linear-gradient(135deg, #009432 0%, #007a28 100%); /* theme green -> darker for gradient */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 148, 50, 0.25); /* new green shadow */
    margin-top: 8px;
}

.login-btn:hover {
    background: linear-gradient(135deg, #00a838 0%, #008a2f 100%);
    box-shadow: 0 5px 14px rgba(0, 148, 50, 0.3);
    /* transform: translateY(-1px); */
}


.login-btn:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.3);
}

.error-message {
    color: #ef4444;
    font-size: 14px;
    margin-top: 5px;
    font-weight: 500;
}

.loader {
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-left-color: #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    animation: spin 0.8s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Footer */
.text-center p {
    text-align: center;
    font-size: 0.9rem;
    margin-top: 16px;
    color: #4b5563;
}

.text-center a {
    color: #4caf50 !important;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s ease;
}

.text-center a:hover {
    color: #45a049 !important;
    text-decoration: underline;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 37px;
    cursor: pointer;
    color: #6b7280;
    font-size: 14px;
    transition: color 0.2s ease;
}

/* .toggle-password:hover {
    color: #4caf50;
} */

/* Mobile Responsive Styles */
@media (max-width: 576px) {
    body {
        padding: 15px;
    }

    .page-wrapper {
        margin-bottom: 20px;
    }

    .top-logo img {
        height: 120px;
        max-height: 120px;
    }

    .top-logo h3 {
        font-size: 22px;
        margin-top: 15px;
    }

    .login-container {
        padding: 30px 24px;
        max-width: 100%;
    }

    .login-header h2 {
        font-size: 1.25rem;
    }

    .form-group input {
        padding-left: 42px !important;
    }

    .login-btn {
        padding: 13px;
        font-size: 15px;
    }

    .text-center p {
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    body {
        padding: 10px;
    }

    .page-wrapper {
        margin-bottom: 15px;
    }

    .top-logo img {
        height: 100px;
        max-height: 100px;
    }

    .top-logo h3 {
        font-size: 20px;
        margin-top: 12px;
    }

    .login-container {
        padding: 24px 20px;
        border-radius: 10px;
    }

    .login-header {
        margin-bottom: 20px;
    }

    .login-header h2 {
        font-size: 1.1rem;
    }

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

    .form-group .form-label {
        font-size: 0.9rem;
        margin-bottom: 6px;
    }

    .form-group input {
        padding-left: 40px !important;
    }

    .toggle-password {
        right: 12px;
        top: 40px;
        font-size: 14px;
    }

    .login-btn {
        padding: 12px;
        font-size: 15px;
        margin-top: 6px;
    }

    .text-center p {
        font-size: 0.8rem;
        margin-top: 14px;
    }

    .error {
        font-size: 0.75rem;
    }
}

/* Landscape mode adjustments */
@media (max-height: 576px) and (orientation: landscape) {
    body {
        padding: 10px;
    }

    .page-wrapper {
        margin-bottom: 10px;
    }

    .top-logo img {
        height: 70px;
        max-height: 70px;
    }

    .top-logo h3 {
        font-size: 18px;
        margin-top: 8px;
    }

    .login-container {
        padding: 20px;
        margin-top: 5px;
    }

    .login-header {
        margin-bottom: 15px;
    }

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

.forgot-password {
    text-align: right;
    margin-bottom: 8px;
}

.forgot-password a {
    font-size: 0.9rem;
    color: #4caf50;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.footer {
    margin-top: 28px;
    margin-left: -30px;
    margin-right: -30px;
    margin-bottom: -30px;
    padding: 16px 20px;
    background-color: #f0f2f5;
    border-top: 1px solid #e4e6eb;
    text-align: center;
}

.copy-right {
    margin: 0;
    color: #65676b;
    font-size: 0.75rem;
    line-height: 1.4;
}
