<?php
$run = $run ?? [];
?>
<div class="enterprise-settings-fields">
    <div class="enterprise-field">
        <label class="enterprise-field-label">Period Start <span class="text-danger">*</span></label>
        <input type="date" name="period_start" class="form-control" required
               value="<?= esc(old('period_start', $run['period_start'] ?? date('Y-m-01'))) ?>">
    </div>
    <div class="enterprise-field">
        <label class="enterprise-field-label">Period End <span class="text-danger">*</span></label>
        <input type="date" name="period_end" class="form-control" required
               value="<?= esc(old('period_end', $run['period_end'] ?? date('Y-m-t'))) ?>">
    </div>
    <div class="enterprise-field">
        <label class="enterprise-field-label">Run Date <span class="text-danger">*</span></label>
        <input type="date" name="run_date" class="form-control" required
               value="<?= esc(old('run_date', $run['run_date'] ?? date('Y-m-d'))) ?>">
    </div>
    <div class="enterprise-field" style="grid-column: 1 / -1;">
        <label class="enterprise-field-label">Notes</label>
        <textarea name="notes" class="form-control" rows="3"><?= esc(old('notes', $run['notes'] ?? '')) ?></textarea>
    </div>
</div>
