<?php $title = 'Rider Login'; ?>

<div class="text-center mb-4 mt-2">
    <div style="width:72px;height:72px;background:linear-gradient(135deg,#EA580C,#F97316);
                border-radius:20px;margin:0 auto 14px;display:flex;align-items:center;justify-content:center;">
        <i class="bi bi-bicycle text-white" style="font-size:2rem;"></i>
    </div>
    <h4 class="fw-bold mb-1">Rider Login</h4>
    <p class="text-muted small">Sign in to view your deliveries</p>
</div>

<?php if ($error): ?>
<div class="alert alert-danger py-2">
    <i class="bi bi-exclamation-circle me-1"></i> <?= e($error) ?>
</div>
<?php endif ?>

<div class="card border-0 shadow-sm">
<div class="card-body p-4">
<form method="POST" action="<?= url('rider/login') ?>">
    <?= csrf_field() ?>

    <div class="mb-3">
        <label class="form-label fw-semibold">Email</label>
        <input type="email" name="email" class="form-control form-control-lg"
               placeholder="your@email.com" required autofocus>
    </div>

    <div class="mb-4">
        <label class="form-label fw-semibold">Password</label>
        <input type="password" name="password" class="form-control form-control-lg"
               placeholder="••••••••" required>
    </div>

    <button type="submit" class="btn btn-accent btn-lg w-100 fw-bold">
        <i class="bi bi-box-arrow-in-right me-2"></i> Sign In
    </button>
</form>
</div>
</div>
