{% extends 'base.html' %}

{% block title %}Login - Support Center{% endblock %}

{% block content %}
<div class="auth-shell">
    <div class="card auth-card">
        <div class="auth-hero">
            <div class="auth-brand">
                <span class="brand-mark">SC</span>
                <span class="brand-text">Support Center</span>
            </div>
            <h2 class="auth-title">Welcome back.</h2>
            <p class="auth-lead">Keep support flowing, track every issue, and stay on top of what matters.</p>
            <div class="auth-highlights">
                <div><span></span>Fast triage for incoming tickets</div>
                <div><span></span>Clear priorities and status visibility</div>
                <div><span></span>One place for team updates</div>
            </div>
        </div>
        <div class="auth-form">
            <h3 class="mb-2">Sign in</h3>
            <p class="auth-meta mb-4">Use your team credentials to continue.</p>

            <form method="post">
                {% csrf_token %}
                <div class="mb-3 text-start">
                    <label for="id_username" class="form-label">Username</label>
                    <input type="text" name="username" autofocus maxlength="150" required id="id_username" class="form-control">
                </div>
                <div class="mb-4 text-start">
                    <label for="id_password" class="form-label">Password</label>
                    <input type="password" name="password" required id="id_password" class="form-control">
                </div>

                {% if form.errors %}
                    <div class="alert alert-danger py-2 small">
                        Your username and password didn't match. Please try again.
                    </div>
                {% endif %}

                <button type="submit" class="btn btn-primary w-100 py-2">Login</button>
                <input type="hidden" name="next" value="{{ next }}">
            </form>

            <div class="mt-4 pt-3 border-top">
                <p class="small text-muted mb-0">Need access? Reach out to your administrator.</p>
            </div>
        </div>
    </div>
</div>
{% endblock %}
