/* Modern Reset */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    line-height: 1.5;
    background: #f4f7fa;
    color: #333;
    height: 100vh;
    display: flex;
}

.auth-page {
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
}

.auth-page::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, .55);
    z-index: 1;
}

/* Wrapper keeps card on the left on desktop */
.auth-wrapper {
    padding: 4vw;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    width: 100%;
    position: relative;
    z-index: 2;
}

/* Card */
.auth-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, .08);
    padding: 45px 40px;
    width: 100%;
    max-width: 420px;
    transition: transform .35s ease, box-shadow .35s ease;
}

.auth-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 25px 55px rgba(0, 0, 0, .12);
}

.auth-card .logo {
    max-width: 140px;
    margin: 0 auto 25px;
    display: block;
}

/* Typography */
.auth-header h2 {
    font-size: 1.9rem;
    font-weight: 600;
    margin-bottom: 8px;
    letter-spacing: .5px;
    color: #222;
}

.auth-header p {
    font-size: .95rem;
    color: #666;
    margin-bottom: 30px;
}

/* Form */
.form-group {
    margin-bottom: 22px;
    text-align: left;
}

label {
    font-weight: 500;
    font-size: .9rem;
    margin-bottom: 6px;
    display: block;
}

.form-control {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    font-size: 1rem;
    transition: border .25s, box-shadow .25s;
}

.form-control:focus {
    border-color: #4f46e5;
    box-shadow: 0 0 0 3px rgba(79, 70, 229, .15);
    outline: none;
}

/* Checkbox & Link */
.d-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: .85rem;
}

.form-check {
    display: flex;
    align-items: center;
}

.form-check-input {
    width: 16px;
    height: 16px;
    margin-right: 6px;
    accent-color: #4f46e5;
}

.forgot-link {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.forgot-link:hover {
    text-decoration: underline;
}

/* Button */
.auth-btn {
    width: 100%;
    background: #46ac0b;
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    padding: 14px;
    border: none;
    border-radius: 30px;
    cursor: pointer;
    transition: background .3s, transform .2s;
    letter-spacing: .5px;
}

.auth-btn:hover {
    background: #4338ca;
    transform: scale(1.02);
}

.auth-btn:active {
    transform: scale(.98);
}

/* Footer */
.auth-footer {
    margin-top: 25px;
    font-size: .9rem;
    color: #555;
}

.auth-footer a {
    color: #4f46e5;
    font-weight: 600;
    text-decoration: none;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Responsive centering */
@media (max-width: 992px) {
    .auth-wrapper {
        justify-content: center;
    }
    .auth-card {
        max-width: 420px;
        padding: 45px 40px;
    }
}

@media (max-width: 576px) {
    .auth-wrapper {
        padding: 0 15px;
    }
    .auth-card {
        max-width: 100%;
        padding: 35px 25px;
    }
    .auth-header h2 {
        font-size: 1.75rem;
    }
}

/* Signin page background */
.signin-page {
    background-image: url('../img/auth/signin-bg1.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Signup page background */
.signup-page {
    background-image: url('../img/auth/signup-bg.png');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Make card scrollable on small screens */
@media (max-height: 800px) {
    .auth-card {
        max-height: 90vh;
        overflow-y:auto;
        margin: 20px 0;
    }
}

/* Reduce padding on small screens */
@media (max-width: 576px) {
    .auth-card {
        padding: 30px 20px;
    }
    .form-group {
        margin-bottom: 18px;
    }
}

/* Additional styles for forgot password page */
.forgot-password-page {
    background-image: url('../img/auth/forgot-password-bg.jpeg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* Ensure SweetAlert2 z-index is above overlay */
.swal2-container {
    z-index: 10000 !important;
}