@extends('layouts.app')
@section('title','Submit Remote Payment')
@section('content')
<x-ui.form-shell title="Submit Remote Payment" description="Record customer payment evidence for verification. No financial balance changes until an authorized verifier approves it." :breadcrumbs="[['label'=>'Dashboard','url'=>route('dashboard')],['label'=>'Remote Payments','url'=>route('remote-payments.index')],['label'=>'Submit']]" narrow>
<form method="POST" action="{{ route('remote-payments.store') }}" enctype="multipart/form-data" class="mf-form">@csrf
<x-ui.form-section title="Payment evidence" description="Use the exact active loan number and external transaction reference shown by the payment channel.">
<div class="mf-form-grid">
<div class="mf-col-6"><label class="mf-field-label">Loan number *</label><input class="mf-input" name="loan_number" value="{{ old('loan_number') }}" placeholder="LN-DOM-2026-000125" required>@error('loan_number')<p class="mf-field-error">{{ $message }}</p>@enderror</div>
<div class="mf-col-6"><label class="mf-field-label">Amount *</label><input class="mf-input" name="amount" inputmode="decimal" value="{{ old('amount') }}" required>@error('amount')<p class="mf-field-error">{{ $message }}</p>@enderror</div>
<div class="mf-col-6"><label class="mf-field-label">Payment channel *</label><select class="mf-input" 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>@error('payment_channel')<p class="mf-field-error">{{ $message }}</p>@enderror</div>
<div class="mf-col-6"><label class="mf-field-label">Transaction reference *</label><input class="mf-input" name="transaction_reference" value="{{ old('transaction_reference') }}" required>@error('transaction_reference')<p class="mf-field-error">{{ $message }}</p>@enderror</div>
<div class="mf-col-12"><label class="mf-field-label">Screenshot / receipt *</label><input type="file" class="mf-input" name="proof" accept=".pdf,.jpg,.jpeg,.png,.webp" required><p class="mt-1 text-xs text-muted-foreground">PDF or image, maximum 10 MB. Stored privately.</p>@error('proof')<p class="mf-field-error">{{ $message }}</p>@enderror</div>
<div class="mf-col-12"><label class="mf-field-label">Notes</label><textarea class="mf-input" name="notes" rows="3">{{ old('notes') }}</textarea></div>
</div>
</x-ui.form-section>
<x-ui.form-actions><a class="mf-btn" href="{{ route('remote-payments.index') }}">Cancel</a><button class="mf-btn mf-btn-primary">Submit for verification</button></x-ui.form-actions>
</form>
</x-ui.form-shell>
@endsection
