<!-- Content -->

<div class="authentication-wrapper authentication-cover authentication-bg">
    <div class="authentication-inner row">
        <!-- /Left Text -->
        <div class="d-none d-lg-flex col-lg-7 p-0">
            <div class="auth-cover-bg auth-cover-bg-color d-flex justify-content-center align-items-center">
                <img
                        src="<?=site_url('themes/vuexy/img/illustrations/auth-login-illustration-light.png')?>"
                        alt="auth-login-cover"
                        class="img-fluid my-5 auth-illustration"
                        data-app-light-img="illustrations/auth-login-illustration-light.png"
                        data-app-dark-img="illustrations/auth-login-illustration-dark.png"
                />

                <img
                        src="<?=site_url('themes/vuexy/img/illustrations/bg-shape-image-light.png'); ?>"
                        alt="auth-login-cover"
                        class="platform-bg"
                        data-app-light-img="illustrations/bg-shape-image-light.png"
                        data-app-dark-img="illustrations/bg-shape-image-dark.png"
                />
            </div>
        </div>
        <!-- /Left Text -->

        <!-- Login -->
        <div class="d-flex col-12 col-lg-5 align-items-center p-sm-5 p-4">
            <div class="w-px-400 mx-auto">
                <!-- Logo -->
                <div class="app-brand mb-4">
                    <a href="<?= site_url('login'); ?>" class="app-brand-link gap-2">
                <span class="app-brand-logo">
                  <img src="<?=site_url('themes/vuexy/img/branding/logo.png')?>"
                </span>
                    </a>
                </div>
                <!-- /Logo -->
                <h3 class="mb-1 fw-bold"><?= lang("App.login_title") ?> 👋</h3>
                <p class="mb-4"><?= lang("App.login_subtitle") ?></p>

                <form id="formAuthentication" class="mb-3" action="<?= site_url('login/authenticate'); ?>" method="POST">
                    <?= csrf_field() ?>
                    <div class="mb-3">
                        <label for="email" class="form-label"><?= lang("App.login_email") ?></label>
                        <input
                                type="email"
                                class="form-control"
                                id="email"
                                name="email"
                                placeholder="<?= lang("App.login_email_ph") ?>"
                                autofocus
                        />
                    </div>
                    <div class="mb-3 form-password-toggle">
                        <div class="d-flex justify-content-between">
                            <label class="form-label" for="password"><?= lang("App.login_password") ?></label>
                            <?php if($settings['forgot_password']??false): ?>
                            <a href="<?= site_url('login/forgot_password'); ?>">
                                <small><?= lang("App.login_forgot_password") ?></small>
                            </a>
                            <?php endif; ?>
                        </div>
                        <div class="input-group input-group-merge">
                            <input
                                    type="password"
                                    id="password"
                                    class="form-control"
                                    name="password"
                                    placeholder="<?= lang("App.login_password_ph") ?>"
                                    aria-describedby="password"
                                    onclick="pass()"
                            />
                            <span id="show_pass" class="input-group-text cursor-pointer"><i class="ti ti-eye-off"></i></span>
                        </div>
                    </div>
                    <?php if($settings['remember_me']??false): ?>
                    <div class="mb-3">
                        <div class="form-check">
                            <input class="form-check-input" type="checkbox" id="remember" name="remember"" />
                            <label class="form-check-label" for="remember"> <?= lang("App.login_remember_me") ?> </label>
                        </div>
                    </div>
                    <?php endif; ?>
                    <button class="btn btn-primary d-grid w-100"><?= lang("App.login_access") ?></button>
                    <?php
                    // IMN OJO, lo mismo eliminar TODO
                    if($settings['captcha_login']??false): ?>
                        <?php if($settings['captcha_gateway'] == 'recaptcha'): ?>
                            <div class="text-center mt-2">
                                <div class="g-recaptcha" style="display: inline-block" data-sitekey="<?=$settings['captcha_site_key']??''?>"></div>
                            </div>
                        <?php endif; ?>
                        <?php if($settings['captcha_gateway'] == 'hcaptcha'): ?>
                            <div class="text-center mt-2">
                                <div class="h-captcha" style="display: inline-block" data-sitekey="<?=$settings['captcha_site_key']??''?>"></div>
                            </div>
                        <?php endif; ?>
                    <?php endif; ?>
                </form>

                <?php if($settings['registration']??false): ?>
                <p class="text-center">
                    <span><?= lang("App.login_signup_desc") ?></span>
                    <a href="<?= site_url('login/signup'); ?>">
                        <span><?= lang("App.login_signup") ?></span>
                    </a>
                </p>
                <?php endif; ?>

            </div>
        </div>
        <!-- /Login -->
    </div>
</div>

<!-- / Content -->