body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #007bff, #6f42c1); /* Blue to Purple gradient */
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    color: #333;
}

.container {
    background-color: #fff;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    display: flex;
    max-width: 1200px;
    width: 90%;
    overflow: hidden;
    min-height: 600px;
}

.sidebar {
    background: linear-gradient(to bottom, #0056b3, #007bff); /* Darker blue gradient */
    color: #fff;
    padding: 40px 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex: 0.8; /* Smaller sidebar */
    position: relative;
}

.sidebar::after {
    content: '';
    position: absolute;
    right: -50px; /* Adjust to control overlap */
    top: 0;
    bottom: 0;
    width: 100px; /* Width of the curved part */
    background: #fff;
    border-top-left-radius: 100%;
    border-bottom-left-radius: 100%;
    z-index: 1; /* Ensure it's above the form-section but below sidebar content if needed */
    transform: translateX(50%); /* Adjust to move the curve */
}


.sidebar .logo {
    font-size: 3em;
    margin-bottom: 20px;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    padding: 15px;
    line-height: 1;
}

.sidebar h1 {
    margin-bottom: 10px;
    font-size: 2.2em;
}

.sidebar p {
    font-size: 1.1em;
    line-height: 1.5;
    margin-bottom: 30px;
}

.form-section {
    flex: 2; /* Larger form section */
    padding: 40px;
    position: relative;
    z-index: 2; /* Ensure form is above sidebar curve */
}

.role-toggle {
    display: flex;
    justify-content: flex-end; /* Align to the right */
    margin-bottom: 25px;
}

.role-toggle .btn {
    padding: 10px 20px;
    border: 1px solid #ccc;
    background-color: #f0f0f0;
    color: #555;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    transition: all 0.3s ease;
    margin-left: 10px;
}

.role-toggle .btn.active {
    background-color: #007bff;
    color: #fff;
    border-color: #007bff;
}

.form-section h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #007bff;
    font-size: 1.8em;
}

.form-row {
    display: flex;
    gap: 20px;
    margin-bottom: 15px;
}

.form-group {
    flex: 1;
    margin-bottom: 15px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
    color: #555;
}

.login-btn-main {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
    background-color: #007bff;
    color: #fff;
    margin-top: 20px;
}

.login-btn-main:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="date"],
.form-group select,
.mobile-input-group input {
    width: calc(100% - 20px); /* Adjust for padding */
    padding: 12px 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1em;
    box-sizing: border-box;
    transition: border-color 0.3s ease;
}

.form-group input[type="file"] {
    border: 1px dashed #ddd;
    padding: 10px;
    background-color: #f9f9f9;
}

.form-group input:focus,
.form-group select:focus,
.mobile-input-group input:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.2);
}

.mobile-input-group {
    display: flex;
    gap: 5px;
}
.mobile-input-group input:first-child {
    flex: 0.3; /* Country code input */
    max-width: 60px;
    text-align: center;
}
.mobile-input-group input:last-child {
    flex: 1; /* Mobile number input */
}

.form-group .send-otp-btn,
.form-group .verify-otp-btn {
    position: absolute;
    right: 10px;
    top: 38px; /* Adjust based on label height */
    padding: 8px 15px;
    background-color: #28a745; /* Green for OTP buttons */
    color: #fff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.form-group .send-otp-btn:hover,
.form-group .verify-otp-btn:hover {
    background-color: #218838;
}

.password-input-group {
    position: relative;
}

.password-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    cursor: pointer;
    color: #888;
}

.password-toggle:hover {
    color: #333;
}

.password-hint, .confirm-password-hint {
    font-size: 0.85em;
    color: #666;
    margin-top: 5px;
    min-height: 20px; /* Prevent layout shift */
}
.password-hint.invalid, .confirm-password-hint.invalid {
    color: #dc3545; /* Red for invalid password */
}
.password-hint.valid, .confirm-password-hint.valid {
    color: #28a745; /* Green for valid password */
}


.radio-group {
    margin-top: 15px;
    margin-bottom: 20px;
}

.radio-group label {
    display: inline-block;
    margin-right: 15px;
    font-weight: normal;
}

.radio-group input[type="radio"] {
    margin-right: 5px;
}

.btn {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.login-btn {
    background-color: rgba(255, 255, 255, 0.2);
    color: #fff;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.login-btn:hover {
    background-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

.register-btn {
    background-color: #007bff;
    color: #fff;
    width: 100%;
    margin-top: 20px;
}

.register-btn:hover {
    background-color: #0056b3;
    transform: translateY(-2px);
}

.popup-message {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #28a745; /* Green for success */
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.5s ease-in-out;
}
.popup-message.error {
    background-color: #dc3545; /* Red for error */
}
.popup-message.show {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .container {
        flex-direction: column;
        width: 100%;
        max-width: none;
        border-radius: 0;
        min-height: auto;
    }
    .sidebar {
        flex: auto;
        padding: 30px 20px;
        border-bottom-left-radius: 0;
        border-bottom-right-radius: 0;
    }
    .sidebar::after {
        display: none; /* Hide the curve on small screens */
    }
    .form-section {
        flex: auto;
        padding: 30px 20px;
    }
    .form-row {
        flex-direction: column;
        gap: 0;
    }
    .form-group .send-otp-btn,
    .form-group .verify-otp-btn {
        position: static;
        margin-top: 10px;
        width: 100%;
    }
    .role-toggle {
        justify-content: center;
    }
}