<?php $this->start('body'); ?>

<div class="d-flex align-items-center justify-content-between mb-3">
    <h5 class="mb-0" style="font-weight:600;color:#334155;"><i class="fas fa-plus-circle me-2" style="color:#7A8BA1;"></i>Add NeST Tender</h5>
    <a href="<?= PROOT; ?>NestTenders" class="btn btn-sm" style="background:#F8FAFC;border:1px solid #E2E8F0;color:#334155;"><i class="fas fa-arrow-left me-1"></i>Back</a>
</div>

<form method="post" action="<?= PROOT; ?>NestTenders/add" class="card border-0 shadow-sm" style="background:#F8FAFC;">
    <div class="card-body p-3">
        <div class="row g-2">
            <div class="col-md-8"><label class="form-label" style="color:#334155;">Tender title *</label>
                <input type="text" name="tender_title" required class="form-control form-control-sm"></div>
            <div class="col-md-4"><label class="form-label" style="color:#334155;">OCID</label>
                <input type="text" name="ocid" placeholder="ocds-tz-…" class="form-control form-control-sm"></div>
            <div class="col-md-6"><label class="form-label" style="color:#334155;">Procuring entity</label>
                <input type="text" name="procuring_entity" class="form-control form-control-sm"></div>
            <div class="col-md-3"><label class="form-label" style="color:#334155;">Value (TZS)</label>
                <input type="number" step="0.01" name="tender_value" value="0" class="form-control form-control-sm"></div>
            <div class="col-md-3"><label class="form-label" style="color:#334155;">Closing date</label>
                <input type="date" name="closing_date" class="form-control form-control-sm"></div>
            <div class="col-md-4"><label class="form-label" style="color:#334155;">Category</label>
                <select name="category" class="form-select form-select-sm">
                    <option value="">—</option>
                    <?php foreach (['goods','services','works','consultancy'] as $c): ?><option value="<?= $c; ?>"><?= ucfirst($c); ?></option><?php endforeach; ?>
                </select></div>
            <div class="col-md-4"><label class="form-label" style="color:#334155;">Region</label>
                <input type="text" name="region" class="form-control form-control-sm"></div>
            <div class="col-md-4"><label class="form-label" style="color:#334155;">Tender URL</label>
                <input type="url" name="tender_url" placeholder="https://…" class="form-control form-control-sm"></div>
        </div>
    </div>
    <div class="card-footer bg-white d-flex justify-content-end gap-2" style="border-top:1px solid #E2E8F0;">
        <a href="<?= PROOT; ?>NestTenders" class="btn btn-sm" style="background:#F8FAFC;border:1px solid #E2E8F0;color:#334155;">Cancel</a>
        <button type="submit" class="btn btn-sm" style="background:#7A8BA1;border-color:#7A8BA1;color:#fff;font-weight:600;"><i class="fas fa-save me-1"></i>Save tender</button>
    </div>
</form>

<?php $this->end(); ?>
