<!doctype html>
<html lang="en" data-layout="semibox" data-topbar="light" data-sidebar="light" data-preloader="disable" data-theme-assets-base="{{ rtrim(theme_asset(''), '/') }}/">
<head>
    <meta charset="utf-8" />
    <title>Sign In | {{ config('app.name', 'Accounting ERP') }}</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="shortcut icon" href="{{ theme_asset('images/favicon.ico') }}">
    <script src="{{ theme_asset('js/layout.js') }}"></script>
    <link href="{{ theme_asset('css/bootstrap.min.css') }}" rel="stylesheet" type="text/css" />
    <link href="{{ theme_asset('css/icons.min.css') }}" rel="stylesheet" type="text/css" />
    <link href="{{ theme_asset('css/app.min.css') }}" rel="stylesheet" type="text/css" />
    <link href="{{ theme_asset('css/custom.min.css') }}" rel="stylesheet" type="text/css" />
</head>
<body>
    <div class="auth-page-wrapper pt-5">
        <div class="auth-one-bg-position auth-one-bg" id="auth-particles">
            <div class="bg-overlay"></div>
            <div class="shape">
                <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 1440 120">
                    <path d="M 0,36 C 144,53.6 432,123.2 720,124 C 1008,124.8 1296,56.8 1440,40L1440 140L0 140z"></path>
                </svg>
            </div>
        </div>

        <div class="auth-page-content">
            <div class="container">
                <div class="row">
                    <div class="col-lg-12">
                        <div class="text-center mt-sm-5 mb-4 text-white-50">
                            <div>
                                <a href="{{ route('admin.login') }}" class="d-inline-block auth-logo">
                                    <img src="{{ theme_asset('images/logo-light.png') }}" alt="" height="20">
                                </a>
                            </div>
                            <p class="mt-3 fs-15 fw-medium">GST Billing & Accounting System</p>
                        </div>
                    </div>
                </div>

                <div class="row justify-content-center">
                    <div class="col-md-8 col-lg-6 col-xl-5">
                        <div class="card mt-4">
                            <div class="card-body p-4">
                                <div class="text-center mt-2">
                                    <h5 class="text-primary">Welcome Back!</h5>
                                    <p class="text-muted">Sign in to continue to your account.</p>
                                </div>

                                <div class="p-2 mt-4">
                                    @if ($errors->any())
                                        <div class="alert alert-danger">
                                            @foreach ($errors->all() as $error)
                                                <div>{{ $error }}</div>
                                            @endforeach
                                        </div>
                                    @endif

                                    @if (session('status'))
                                        <div class="alert alert-success">{{ session('status') }}</div>
                                    @endif

                                    <form method="POST" action="{{ route('admin.login.submit') }}">
                                        @csrf

                                        <div class="mb-3">
                                            <label for="email" class="form-label">Email</label>
                                            <input type="email"
                                                   class="form-control @error('email') is-invalid @enderror"
                                                   id="email"
                                                   name="email"
                                                   value="{{ old('email') }}"
                                                   placeholder="Enter email"
                                                   required
                                                   autofocus>
                                        </div>

                                        <div class="mb-3">
                                            <label class="form-label" for="password-input">Password</label>
                                            <div class="position-relative auth-pass-inputgroup mb-3">
                                                <input type="password"
                                                       class="form-control pe-5 password-input @error('password') is-invalid @enderror"
                                                       name="password"
                                                       placeholder="Enter password"
                                                       id="password-input"
                                                       required>
                                                <button class="btn btn-link position-absolute end-0 top-0 text-decoration-none text-muted password-addon"
                                                        type="button" id="password-addon">
                                                    <i class="ri-eye-fill align-middle"></i>
                                                </button>
                                            </div>
                                        </div>

                                        <div class="form-check">
                                            <input class="form-check-input" type="checkbox" name="remember" id="auth-remember-check" {{ old('remember') ? 'checked' : '' }}>
                                            <label class="form-check-label" for="auth-remember-check">Remember me</label>
                                        </div>

                                        <div class="mt-4">
                                            <button class="btn btn-success w-100" type="submit">Sign In</button>
                                        </div>
                                    </form>
                                </div>
                            </div>
                        </div>

                        <div class="mt-4 text-center">
                            <p class="mb-0 text-white-50">
                                Demo: <strong>admin@billing.com</strong> / <strong>password</strong>
                            </p>
                        </div>
                    </div>
                </div>
            </div>
        </div>

        <footer class="footer">
            <div class="container">
                <div class="text-center">
                    <p class="mb-0 text-muted">&copy; {{ date('Y') }} {{ config('app.name', 'Accounting ERP') }}</p>
                </div>
            </div>
        </footer>
    </div>

    <script src="{{ theme_asset('libs/bootstrap/js/bootstrap.bundle.min.js') }}"></script>
    <script src="{{ theme_asset('libs/simplebar/simplebar.min.js') }}"></script>
    <script src="{{ theme_asset('libs/node-waves/waves.min.js') }}"></script>
    <script src="{{ theme_asset('libs/feather-icons/feather.min.js') }}"></script>
    <script src="{{ theme_asset('js/pages/plugins/lord-icon-2.1.0.js') }}"></script>
    <script src="{{ asset('js/billing-plugins.js') }}"></script>
    <script src="{{ theme_asset('libs/particles.js/particles.js') }}"></script>
    <script src="{{ theme_asset('js/pages/particles.app.js') }}"></script>
    <script src="{{ theme_asset('js/pages/password-addon.init.js') }}"></script>
</body>
</html>
