/* --- login --- */
:root {
    --primary-color: #007BFF;
    --primary-hover: #0056b3;
    --dark-text: #333;
    --light-text: #f8f9fa;
    --border-color: #ddd;
    --bg-light: #fff;
    --bg-form-side: #f4f7fc;
    --error-color: #dc3545;
    --success-color: #28a745;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    display: flex;
    min-height: 100vh;
    background-color: var(--bg-light);
}

/* --- Main Container Layout --- */
.container {
    display: flex;
    width: 100%;
    height: 100vh;
}

/* --- Informational Side (Left) --- */
.info-side {
    width: 50%;
    background: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
            url('https://www.hexpixywebs.com/images/logwal.jpeg') no-repeat center center;
background-size: cover;

    background-size: cover;
    color: var(--light-text);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 40px;
}

.info-side h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.info-side p {
    font-size: 1.2rem;
    max-width: 400px;
}

/* --- Form Side (Right) --- */
.form-side {
    width: 50%;
    background-color: var(--bg-form-side);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.auth-container {
    width: 100%;
    max-width: 400px;
    background: var(--bg-light);
    padding: 3rem 2.5rem;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.auth-header {
    text-align: center;
    margin-bottom: 2rem;
}

.auth-header h2 {
    font-size: 2rem;
    color: var(--dark-text);
    margin-bottom: 0.5rem;
}

.auth-header p {
    color: #777;
}

/* --- Toggle Buttons --- */
.auth-toggle {
    display: flex;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2rem;
}

.toggle-btn {
    flex: 1;
    padding-bottom: 1rem;
    text-align: center;
    cursor: pointer;
    color: #999;
    font-weight: 600;
    position: relative;
    transition: color 0.3s ease;
}

.toggle-btn.active {
    color: var(--primary-color);
}

.toggle-btn.active::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--primary-color);
}

/* --- Form Elements --- */
.auth-form {
    display: none; /* Hide forms by default */
}

.auth-form.active {
    display: block; /* Show active form */
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(0, 123, 255, 0.2);
}

.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

.checkbox-container {
    display: flex;
    align-items: center;
    color: #555;
    cursor: pointer;
}

.checkbox-container input {
    margin-right: 8px;
}

.forgot-password {
    color: var(--primary-color);
    text-decoration: none;
}
.forgot-password:hover {
    text-decoration: underline;
}

/* --- Submit Button --- */
.submit-btn {
    width: 100%;
    padding: 15px;
    background-color: var(--primary-color);
    border: none;
    border-radius: 5px;
    color: var(--light-text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.1s ease;
}

.submit-btn:hover {
    background-color: var(--primary-hover);
}

.submit-btn:active {
    transform: scale(0.98);
}

.submit-btn:disabled {
    background-color: #999;
    cursor: not-allowed;
}

/* --- Error Messages --- */
.message-area {
    padding: 10px;
    margin-bottom: 1rem;
    border-radius: 5px;
    font-size: 0.9rem;
    text-align: center;
    display: none; /* Hidden by default */
}
.message-area.show {
    display: block;
}
.message-area.error {
    background-color: rgba(220, 53, 69, 0.1);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}
.message-area.success {
    background-color: rgba(40, 167, 69, 0.1);
    color: var(--success-color);
    border: 1px solid var(--success-color);
}

/* --- NEW: Back to Login Link Style --- */
.back-link {
    text-align: center;
    margin-top: 1.5rem;
}
.back-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-size: 0.9rem;
}
.back-link a:hover {
    text-decoration: underline;
}

/* --- Responsive Design --- */
@media (max-width: 992px) {
    .container {
        flex-direction: column;
    }
    .info-side, .form-side {
        width: 100%;
    }
    .info-side {
        height: 30vh;
        padding: 20px;
    }
    .info-side h1 { font-size: 2rem; }
    .info-side p { font-size: 1rem; }
    .form-side {
        height: 70vh;
        align-items: flex-start;
        padding-top: 50px;
    }
}

@media (max-width: 480px) {
     .auth-container {
        padding: 2rem 1.5rem;
        box-shadow: none;
        background: transparent;
     }
     .form-side {
        background-color: var(--bg-light);
     }
}