{% extends 'layout.twig' %}
{% block title %}Sign in — {{ brand.name }}{% endblock %}
{% block content %}
    <section class="container narrow page-head">
        <h1>{{ is_admin ? 'Staff Sign In' : 'Sign in' }}</h1>
        <p class="muted">Welcome back. Please enter your details.</p>
    </section>
    <section class="container narrow">
        <form method="post" action="{{ is_admin ? app_url('/admin/login') : app_url('/portal/login') }}" class="form">
            {{ csrf_field()|raw }}
            <div class="form-row">
                <label>Email</label>
                <input type="email" name="email" value="{{ old('email') }}" required autofocus>
            </div>
            <div class="form-row">
                <label>Password</label>
                <input type="password" name="password" required>
            </div>
            <div class="form-actions">
                <button type="submit" class="btn btn-primary">Sign in</button>
                {% if not is_admin and allow_registration %}
                    <a href="{{ app_url('/portal/register') }}" class="btn btn-light">Create an account</a>
                {% endif %}
            </div>
        </form>
    </section>
{% endblock %}
