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

<head>
    <meta charset="utf-8">
    <meta http-equiv="x-ua-compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta name="description" content="">
    <meta name="keyword" content="">
    <meta name="author" content="theme_ocean">
    <title><?= $pageTitle ?></title>
    <link rel="shortcut icon" type="image/x-icon" href="<?= $favi ?>">
    <link rel="stylesheet" type="text/css" href="/assets/css/bootstrap.min.css">

    <link rel="stylesheet" type="text/css" href="/assets/vendors/css/vendors.min.css">

    <link rel="stylesheet" type="text/css" href="/assets/css/theme.min.css">
</head>

<body>
    <main class="auth-creative-wrapper">
        <div class="auth-creative-inner">
            <div class="creative-card-wrapper">
                <div class="card my-4 overflow-hidden" style="z-index: 1">
                    <div class="row flex-1 g-0">
                        <div class="col-lg-6 h-100 my-auto order-1 order-lg-0">
                            <div class="wd-100 bg-white p-2 rounded shadow-lg position-absolute translate-middle top-50 start-50 d-none d-lg-block">
                                <img src="/images/logo.jpg" alt="" class="img-fluid">
                            </div>
                            <div class="creative-card-body card-body p-sm-5">
                                <h2 class="fs-20 fw-bolder mb-4">Нэвтрэх</h2>
                                <p class="fs-12 fw-medium text-muted">Мэргэжлийн боловсрол сургалтын байгууллагын "Сургалт, мэдээллийн систем"</p>
                                <form class="w-100 mt-4 pt-2" method="POST" action="/sign-in">
                                    <div class="btn-group w-100 mb-4 justify-content-center " role="group">
                                        <input type="radio" class="btn-check" id="btn_student" autocomplete="off" name="user_role" value="1" checked="">
                                        <label class="btn btn-outline-primary d-flex align-items-center justify-content-center" for="btn_student">
                                            Багш
                                        </label>
                                        <input type="radio" class="btn-check" id="btn_ajiltan" autocomplete="off" name="user_role" value="2">
                                        <label class="btn btn-outline-primary d-flex align-items-center justify-content-center" for="btn_ajiltan">
                                            Ажилтан
                                        </label>
                                    </div>
                                    <div class="mb-4">
                                        <input type="text" class="form-control" name="username" placeholder="Нэвтрэх нэр" value="" required>
                                    </div>
                                    <div class="mb-3">
                                        <input type="password" class="form-control" name="password" placeholder="Нууц үг" value="" required>
                                    </div>
                                    <div class="mb-3 d-flex align-items-center justify-content-between">
                                        <div>
                                            <div class="custom-control custom-checkbox">
                                                <input type="checkbox" class="custom-control-input" id="rememberMe">
                                                <label class="custom-control-label c-pointer" for="rememberMe">Сануулах</label>
                                            </div>
                                        </div>
                                        <div>
                                            <a href="/recovery" class="fs-11 text-primary">Нууц үг мартсан?</a>
                                        </div>
                                    </div>
                                    <?php if (!empty($_SESSION['errors'])) : ?>
                                        <div class="mb-3">
                                            <ul>
                                                <?php foreach ($_SESSION['errors'] as $error) : ?>
                                                    <li style="color:red; font-size: 12px;"><?= $error ?></li>
                                                <?php endforeach; ?>
                                            </ul>
                                        </div>
                                    <?php unset($_SESSION['errors']);
                                    endif; ?>
                                    <div class="mt-5">
                                        <button type="submit" class="btn btn-lg btn-primary w-100">Нэвтрэх</button>
                                    </div>
                                </form>
                            </div>
                        </div>
                        <div class="col-lg-6 bg-primary order-0 order-lg-1">
                            <div class="h-100 d-flex align-items-center justify-content-center">
                                <img src="/images/school500.jpg" alt="" class="img-fluid">
                            </div>
                        </div>
                    </div>
                </div>
            </div>
        </div>
    </main>
    <script src="/assets/vendors/js/vendors.min.js"></script>
    <script src="/assets/js/common-init.min.js"></script>
    <script src="/assets/js/theme-customizer-init.min.js"></script>
</body>

</html>