<div class="page-heading"><div><p class="eyebrow">Administration</p><h1>Company, Documents & Website</h1><p>Configure company information, document branding, tracking behavior, and public search metadata.</p></div></div>
<form class="panel form-stack" method="post" action="<?= url('/settings/update') ?>" enctype="multipart/form-data">
    <?= csrf_field() ?>
    <div class="form-grid three">
        <label><span>Company Name</span><input name="company_name" value="<?= e($settings['company_name']??APP_NAME) ?>"></label>
        <label><span>Company Email</span><input type="email" name="company_email" value="<?= e($settings['company_email']??'') ?>"></label>
        <label><span>Company Phone</span><input name="company_phone" value="<?= e($settings['company_phone']??'') ?>"></label>
        <label><span>MC Number</span><input name="company_mc" value="<?= e($settings['company_mc']??'') ?>"></label>
        <label><span>DOT Number</span><input name="company_dot" value="<?= e($settings['company_dot']??'') ?>"></label>
        <label><span>Currency Symbol</span><input name="currency_symbol" value="<?= e($settings['currency_symbol']??'$') ?>"></label>
        <label class="span-2"><span>Company Address</span><input name="company_address" value="<?= e($settings['company_address']??'') ?>"></label>
        <label><span>Company Logo</span><input type="file" name="company_logo" accept="image/png,image/jpeg,image/webp"></label>
        <label><span>GPS Update Interval (seconds)</span><input type="number" min="15" max="300" name="tracking_interval_seconds" value="<?= e($settings['tracking_interval_seconds']??'30') ?>"></label>
    </div>

    <hr class="soft-separator">
    <div class="section-title-row"><div><p class="eyebrow">Public Website SEO</p><h3>Search appearance</h3></div></div>
    <label><span>Meta Title</span><input name="seo_title" maxlength="180" value="<?= e($settings['seo_title']??SEO_TITLE) ?>"><small class="muted">Recommended: clear, descriptive, and unique. The default is optimized for FleetLume.</small></label>
    <label><span>Meta Description</span><textarea name="seo_description" maxlength="320" rows="3"><?= e($settings['seo_description']??SEO_DESCRIPTION) ?></textarea><small class="muted">Summarize the platform naturally. Search engines may use this text in results.</small></label>

    <hr class="soft-separator">
    <div class="section-title-row"><div><p class="eyebrow">Document Branding</p><h3>Invoice and statement content</h3></div></div>
    <label><span>Invoice Payment Instructions</span><textarea name="invoice_payment_instructions" rows="4"><?= e($settings['invoice_payment_instructions']??'') ?></textarea></label>
    <label><span>Invoice Terms / Footer</span><textarea name="invoice_terms" rows="3"><?= e($settings['invoice_terms']??'') ?></textarea></label>
    <button class="btn btn-primary">Save Settings</button>
</form>
