@extends('layouts.admin')

@section('content')
<div class="header">
    <div>
        <h1 style="margin:0; font-weight:800; font-size:28px">Platform Settings</h1>
        <p style="color:#555; margin:5px 0 0">Configure ecosystem parameters and commissions</p>
    </div>
</div>

<style>
    .settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
    .settings-card { background: var(--card); border-radius: 25px; border: 1px solid #222; padding: 30px; }
    .form-group { margin-bottom: 25px; }
    label { display: block; font-size: 12px; color: #555; text-transform: uppercase; margin-bottom: 10px; font-weight: 800; letter-spacing: 1px; }
    input { width: 100%; background: #0A0A0A; border: 1px solid #222; border-radius: 12px; padding: 15px; color: #fff; font-family: 'Outfit', sans-serif; box-sizing: border-box; }
    input:focus { border-color: var(--primary); outline: none; }
    .helper { font-size: 11px; color: #444; margin-top: 8px; }
</style>

<div class="settings-grid">
    <div class="settings-card">
        <h3 style="margin-top:0; margin-bottom:30px">Revenue & Commission</h3>
        <form action="{{ route('admin.settings.update') }}" method="POST">
            @csrf
            <div class="form-group">
                <label>Global Ride Commission (%)</label>
                <input type="number" name="commission" value="10" placeholder="e.g. 15">
                <div class="helper">Percentage of total fare MetroDrop keeps for ride logistics.</div>
            </div>

            <div class="form-group">
                <label>Withdrawal Fee (₦)</label>
                <input type="number" name="withdrawal_fee" value="50" placeholder="e.g. 100">
                <div class="helper">Fixed fee applied to each driver/rider withdrawal.</div>
            </div>

            <button type="submit" class="btn btn-primary" style="width: 100%">Save Financial Parameters</button>
        </form>
    </div>

    <div class="settings-card">
        <h3 style="margin-top:0; margin-bottom:30px">Growth & Referrals</h3>
        <form action="{{ route('admin.settings.update') }}" method="POST">
            @csrf
            <div class="form-group">
                <label>Referral Reward (₦)</label>
                <input type="number" name="referral_reward" value="1000" placeholder="e.g. 500">
                <div class="helper">Bonus given to the referrer after the first completed ride.</div>
            </div>

            <div class="form-group">
                <label>Welcome Bonus (₦)</label>
                <input type="number" name="welcome_bonus" value="0" placeholder="e.g. 200">
                <div class="helper">Initial wallet balance for new signups.</div>
            </div>

            <button type="submit" class="btn btn-primary" style="width: 100%">Update Growth Strategy</button>
        </form>
    </div>
</div>
@endsection
