body, html {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: #f8f9fa;
}

/* Set body to be a flex column to stack navbar and main content */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* Make the main content area grow to fill available space */
.main-content {
    flex-grow: 1;
    display: flex;
     /* This will be the parent for our two panels */
}

/* --- Main Navbar Styles --- */
.main-navbar {
    background-color: #0F172A;
    padding: 10px 30px;
    border-bottom: 0px solid #dee2e6;
    flex-shrink: 0; /* Prevent navbar from shrinking */
}

.main-navbar .nav-link { 
    color: #ffffff; 
    font-weight: 500; 
    margin: 0 15px;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease;
}

.main-navbar .nav-link:hover {
    color: #3ae926;
}

.main-navbar .nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #ffc107;
    transition: width 0.3s ease;
}

.main-navbar .nav-link:hover::after {
    width: 100%;
}

.btn-dashboard { 
    background-color: #ffc107; 
    color: #212529; 
    font-weight: bold; 
    border-radius: 8px; 
    padding: 8px 16px;
    text-decoration: none;
}

.user-icon { 
    font-size: 1.8rem; 
    color: #3498db; 
}

/* --- Auth Page Layout --- */
.auth-container {
    display: flex;
    flex: 1;
    min-height: 100%;
}

.left-panel, .right-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px;
}

.left-panel {
    background-color: #1a202c;
    color: white;
    flex-direction: column;
    text-align: left;
    justify-content: flex-start; /* This is the correct fix */
}

.left-panel h2 {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 2rem;
    line-height: 1.2;
}

.right-panel {
    background-color: #ffffff;
}

.form-container { 
    width: 100%; 
    max-width: 400px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: 40px 30px;
    border: 1px solid #e9ecef;
}

/* --- Left Panel Feature List --- */
.left-panel .feature-list { 
    list-style: none; 
    padding-left: 0; 
    margin-top: 2rem;
}

.left-panel .feature-list li { 
    margin-bottom: 25px; 
    font-size: 1.1rem;
    display: flex;
    align-items: center;
}

.left-panel .feature-list li::before {
    content: "⚙️";
    margin-right: 15px;
    font-size: 1.2rem;
}

/* --- Tab Styles --- */
.nav-tabs { 
    border-bottom: 1px solid #dee2e6; 
    margin-bottom: 2rem;
}

.nav-tabs .nav-link { 
    cursor: pointer; 
    border: none; 
    color: #6c757d; 
    padding-bottom: 10px;
    padding-top: 10px;
    background: none;
}

.nav-tabs .nav-link.active { 
    border-bottom: 3px solid #28a745; 
    color: #212529; 
    font-weight: bold;
    background: none;
}

/* --- Form Styles --- */
.form-control { 
    background-color: #f8f9fa; 
    border: 1px solid #f8f9fa; 
    border-radius: 8px; 
    padding: 12px 15px; 
    font-size: 1rem;
}

.form-control:focus { 
    background-color: #ffffff; 
    border-color: #28a745; 
    box-shadow: none; 
}

/* --- OTP Section Styles --- */
#otp-section {
    background-color: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin-top: 10px;
}

#otp-section .input-group {
    margin-bottom: 10px;
}

#otp-section .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

#otp-section .btn {
    border-radius: 0;
}

#otp-section .btn:last-child {
    border-top-right-radius: 8px;
    border-bottom-right-radius: 8px;
}

#otp-section .btn:first-child {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}

#otp-section .btn:nth-child(2) {
    border-radius: 0;
}

#otp-section .valid-feedback {
    color: #28a745;
    font-weight: 500;
    margin-top: 5px;
}

#otp-section .invalid-feedback {
    color: #dc3545;
    font-weight: 500;
    margin-top: 5px;
}

/* OTP Button States */
#send-otp-btn:disabled,
#verify-otp-btn:disabled,
#resend-otp-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Phone number input group */
.input-group .form-control {
    border-top-right-radius: 0;
    border-bottom-right-radius: 0;
}

.input-group .btn {
    border-top-left-radius: 0;
    border-bottom-left-radius: 0;
}


.form-label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #212529;
}

.btn-success {
    background-color: #28a745;
    border-color: #28a745;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
}

.btn-success:hover {
    background-color: #218838;
    border-color: #1e7e34;
}

/* --- Social Login Styles --- */
.social-login-divider { 
    display: flex; 
    align-items: center; 
    text-align: center; 
    color: #adb5bd; 
    margin: 25px 0;
    font-size: 0.9rem;
}

.social-login-divider::before, 
.social-login-divider::after { 
    content: ''; 
    flex: 1; 
    border-bottom: 1px solid #dee2e6; 
}

.social-login-divider:not(:empty)::before { 
    margin-right: 1rem; 
}

.social-login-divider:not(:empty)::after { 
    margin-left: 1rem; 
}

.social-btn { 
    width: 50px; 
    height: 50px; 
    border: 1px solid #dee2e6; 
    border-radius: 50%; 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    font-size: 1.5rem; 
    color: #28a745; 
    text-decoration: none; 
    margin: 0 10px;
    transition: all 0.2s ease;
}

.social-btn:hover {
    background-color: #f8f9fa;
    color: #28a745;
    text-decoration: none;
}

/* Google OAuth Button Styles */
.google-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #4285f4;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.3s ease;
    width: 100%;
    margin: 0;
    cursor: pointer;
    box-sizing: border-box;
}

.google-btn:hover {
    background: #3367d6;
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.3);
}

.google-btn:active {
    transform: translateY(0);
}

.google-icon {
    width: 18px;
    height: 18px;
}

/* --- MOVED THE PASSWORD STYLES OUTSIDE AND ABOVE THE MEDIA QUERY --- */
/* --- Password Visibility Toggle Styles --- */
.password-wrapper {
    position: relative; 
    display: flex;
    align-items: center;
}

.password-wrapper .form-control {
    padding-right: 40px; /* Add space on the right of the text for the icon */
}

.password-toggle-icon {
    position: absolute;
    top: 50%;
    right: 15px;
    transform: translateY(-50%);
    cursor: pointer;
    color: #6c757d;
}

/* --- Mobile Responsive Styles for Auth Page --- */
@media (max-width: 991.98px) {
    .auth-container {
        flex-direction: column;
        min-height: auto;
    }

    .left-panel, .right-panel {
        padding: 30px 20px;
        min-height: auto;
    }
    
    .form-container {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
    }

    .left-panel {
        background-color: #0F172A;
        color: #ffffff;
        text-align: center;
        justify-content: center;
        order: 2; /* Move to bottom on mobile */
    }

    .left-panel h2 {
        font-size: 2rem;
        margin-bottom: 1.5rem;
        line-height: 1.3;
    }

    .left-panel .feature-list {
        margin-top: 1.5rem;
    }

    .left-panel .feature-list li {
        margin-bottom: 20px;
        font-size: 1rem;
        text-align: left;
        justify-content: flex-start;
    }

    .left-panel .feature-list li::before {
        margin-right: 12px;
        font-size: 1.1rem;
    }

    .right-panel {
        background-color: #ffffff;
        order: 1; /* Move to top on mobile */
        padding: 40px 20px;
    }

    .form-container {
        max-width: 100%;
        padding: 30px 20px;
        margin: 0 auto;
    }

    .nav-tabs {
        margin-bottom: 1.5rem;
    }

    .nav-tabs .nav-link {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 0.9rem;
    }

    .btn-success {
        padding: 10px 16px;
        font-size: 0.9rem;
        width: 100%;
    }

    .google-btn {
        width: 100%;
        padding: 10px 16px;
        font-size: 0.9rem;
        justify-content: center;
        box-sizing: border-box;
    }
    
    .social-login-divider {
        margin: 20px 0;
        text-align: center;
    }
    
    .text-center {
        display: flex;
        justify-content: center;
        width: 100%;
    }

    .social-btn {
        width: 45px;
        height: 45px;
        font-size: 1.3rem;
        margin: 0 8px;
    }
}

@media (max-width: 576px) {
    .left-panel, .right-panel {
        padding: 20px 15px;
    }

    .left-panel h2 {
        font-size: 1.8rem;
        margin-bottom: 1rem;
    }

    .left-panel .feature-list li {
        font-size: 0.9rem;
        margin-bottom: 15px;
    }

    .form-container {
        padding: 25px 15px;
        width: 100%;
        max-width: 350px;
        margin: 0 auto;
    }

    .nav-tabs .nav-link {
        font-size: 0.85rem;
        padding: 6px 10px;
    }

    .form-control {
        padding: 8px 10px;
        font-size: 0.85rem;
    }

    .btn-success {
        padding: 8px 12px;
        font-size: 0.85rem;
    }

    .google-btn {
        padding: 8px 12px;
        font-size: 0.85rem;
        width: 100%;
        justify-content: center;
        box-sizing: border-box;
    }
    
    .social-login-divider {
        margin: 15px 0;
        text-align: center;
    }
    
    .text-center {
        display: flex;
        justify-content: center;
        width: 100%;
    }
}


