@extends('layouts.guest')
@section('title','Submit Remote Payment')
@section('content')
<div class="w-full max-w-xl">
<div class="mb-6"><div class="text-xs font-semibold uppercase tracking-widest text-muted-foreground">Remote payment</div><h1 class="mt-2 text-2xl font-semibold tracking-tight">Submit payment evidence</h1><p class="mt-2 text-sm text-muted-foreground">Use your active loan number and registered phone. Your loan balance changes only after staff verifies and approves the payment.</p></div>
<form method="POST" action="{{ route('remote-payments.public.store') }}" enctype="multipart/form-data" class="space-y-4">@csrf
<div><label class="mf-field-label">Loan number *</label><input class="mf-input w-full" name="loan_number" value="{{ old('loan_number') }}" autocomplete="off" required>@error('loan_number')<p class="mf-field-error">{{ $message }}</p>@enderror</div>
<div><label class="mf-field-label">Registered customer phone *</label><input class="mf-input w-full" name="customer_phone" value="{{ old('customer_phone') }}" autocomplete="tel" required>@error('customer_phone')<p class="mf-field-error">{{ $message }}</p>@enderror</div>
<div class="grid gap-4 sm:grid-cols-2"><div><label class="mf-field-label">Amount *</label><input class="mf-input w-full" name="amount" inputmode="decimal" value="{{ old('amount') }}" required>@error('amount')<p class="mf-field-error">{{ $message }}</p>@enderror</div><div><label class="mf-field-label">Payment channel *</label><select class="mf-input w-full" name="payment_channel" required>@foreach(['mpesa'=>'M-Pesa','airtel_money'=>'Airtel Money','mixx_yas'=>'Mixx by Yas','bank'=>'Bank','other'=>'Other'] as $value=>$label)<option value="{{ $value }}" @selected(old('payment_channel')===$value)>{{ $label }}</option>@endforeach</select></div></div>
<div><label class="mf-field-label">Transaction reference *</label><input class="mf-input w-full" name="transaction_reference" value="{{ old('transaction_reference') }}" autocomplete="off" required>@error('transaction_reference')<p class="mf-field-error">{{ $message }}</p>@enderror</div>
<div><label class="mf-field-label">Screenshot / receipt *</label><input type="file" class="mf-input w-full" name="proof" accept=".pdf,.jpg,.jpeg,.png,.webp" required><p class="mt-1 text-xs text-muted-foreground">PDF or image, maximum 10 MB.</p>@error('proof')<p class="mf-field-error">{{ $message }}</p>@enderror</div>
<div><label class="mf-field-label">Notes</label><textarea class="mf-input w-full" name="notes" rows="3">{{ old('notes') }}</textarea></div>
<button class="mf-btn mf-btn-primary w-full">Submit for verification</button>
</form>
<div class="mt-5 border-t pt-4 text-xs text-muted-foreground">Submitting evidence does not confirm receipt of funds. Keep your original transaction reference until the payment is approved.</div>
</div>
@endsection
