<?php include_once "header.php"; ?>

                    <div class="mb-4 idx3-stagger-1">
                        <div class="idx3-header-icon">
                            <i class="bi bi-box-arrow-in-right"></i>
                        </div>
                        <h2 class="idx3-title"><?= __('front.login') ?></h2>
                        <p class="idx3-subtitle"><?= __('front.welcome_back_sign_in') ?></p>
                    </div>

                    <ul class="nav nav-pills idx3-nav-pills justify-content-center mb-4 idx3-stagger-2" role="tablist">
                        <li class="nav-item flex-fill">
                            <a class="nav-link active" href="<?= base_url() ?>">
                                <i class="bi bi-box-arrow-in-right me-1"></i><?= __('front.login') ?>
                            </a>
                        </li>
                        <?php
                            if (isset($store['registration_status']) && $store['registration_status'] != 0) {
                                if (($vendor_marketstatus["marketvendorstatus"] == 1 || $vendor_storestatus['storestatus']) && $store['registration_status'] != 3) {
                                    echo '<li class="nav-item flex-fill"><a class="nav-link" href="'. base_url('register') .'"><i class="bi bi-person-plus me-1"></i>'. __('front.register') .'</a></li>';
                                }
                            } else if ($store['registration_status'] != 2) {
                                echo '<li class="nav-item flex-fill"><a class="nav-link" href="'. base_url('register') .'"><i class="bi bi-person-plus me-1"></i>'. __('front.register') .'</a></li>';
                            }
                        ?>
                    </ul>

                    <form id="login-form">
                        <div class="form-floating idx3-input-group mb-4 idx3-stagger-3">
                            <input type="text" class="form-control idx3-input" id="username" name="username"
                                   placeholder="<?= __('front.enter_username_email') ?>" required>
                            <label for="username"><i class="bi bi-person-circle me-2"></i><?= __('front.username_email') ?></label>
                        </div>

                        <div class="form-floating idx3-input-group mb-4 position-relative idx3-stagger-4">
                            <input type="password" class="form-control idx3-input" id="password" name="password"
                                   placeholder="<?= __('front.password') ?>" required>
                            <label for="password"><i class="bi bi-shield-lock me-2"></i><?= __('front.password') ?></label>
                            <button type="button" class="btn btn-sm toggle-password" tabindex="-1" aria-label="Toggle Password">
                                <i class="bi bi-eye"></i>
                            </button>
                        </div>

                        <div class="mb-3 text-center" id="login-status-msg"></div>

                        <div class="mb-4 idx3-stagger-5"><?= render_recaptcha_html('affiliate_login') ?></div>

                        <div class="d-grid mb-3 idx3-stagger-5">
                            <button type="submit" id="login_button" class="btn idx3-btn-primary btn-lg py-3">
                                <i class="bi bi-box-arrow-in-right me-2"></i><?= __('front.login') ?>
                            </button>
                        </div>

                        <div class="text-center idx3-stagger-6">
                            <a href="<?= base_url('forget-password') ?>" class="idx3-link">
                                <i class="bi bi-question-circle me-1"></i><?= __('front.forget_password') ?>?
                            </a>
                        </div>
                    </form>

                    <div class="idx3-trust-footer text-center idx3-stagger-6">
                        <small><i class="bi bi-shield-check me-1"></i><?= __('front.your_information_secure') ?></small>
                    </div>

<?php include_once "footer.php"; ?>
