<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Login — TaskFlow</title>
    <link rel="stylesheet" href="{{ asset('css/app.css') }}">
</head>
<body>
    <div class="auth-container">
        <div class="auth-card">
            <div class="auth-logo">
                <div class="auth-logo-icon">T</div>
                <h1 class="auth-title">Welcome back</h1>
                <p class="auth-subtitle">Sign in to your TaskFlow account</p>
            </div>

            @if($errors->any())
                <div class="alert alert-danger">
                    <svg viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" style="width:18px;height:18px;flex-shrink:0;"><circle cx="12" cy="12" r="10"></circle><line x1="15" y1="9" x2="9" y2="15"></line><line x1="9" y1="9" x2="15" y2="15"></line></svg>
                    {{ $errors->first() }}
                </div>
            @endif

            <form method="POST" action="{{ route('login') }}">
                @csrf
                <div class="form-group">
                    <label class="form-label">Email address</label>
                    <input type="email" name="email" class="form-control" placeholder="you@company.com" value="{{ old('email') }}" required autofocus>
                </div>

                <div class="form-group">
                    <label class="form-label">Password</label>
                    <input type="password" name="password" class="form-control" placeholder="Enter your password" required>
                </div>

                <div class="form-group" style="display:flex;align-items:center;justify-content:space-between;">
                    <label style="display:flex;align-items:center;gap:8px;font-size:0.85rem;color:var(--text-secondary);cursor:pointer;">
                        <input type="checkbox" name="remember" style="accent-color:var(--accent-primary);">
                        Remember me
                    </label>
                </div>

                <button type="submit" class="btn btn-primary w-full btn-lg" style="margin-top:8px;">
                    Sign In
                </button>
            </form>

            <p style="text-align:center;margin-top:24px;font-size:0.88rem;color:var(--text-secondary);">
                Don't have an account? <a href="{{ route('register') }}">Create one</a>
            </p>

            <div style="margin-top:24px;padding-top:20px;border-top:1px solid var(--border-color);">
                <p style="font-size:0.78rem;color:var(--text-tertiary);text-align:center;margin-bottom:8px;">Demo Accounts</p>
                <div style="display:grid;grid-template-columns:1fr 1fr;gap:6px;font-size:0.75rem;color:var(--text-tertiary);">
                    <div>Admin: admin@asana.test</div>
                    <div>Manager: manager@asana.test</div>
                    <div>Leader: leader@asana.test</div>
                    <div>Employee: alice@asana.test</div>
                    <div colspan="2" style="grid-column:1/-1;text-align:center;">Password: <strong style="color:var(--text-secondary);">password</strong></div>
                </div>
            </div>
        </div>
    </div>
</body>
</html>
