{* Actions tab — bulk apply + servers list. Loaded lazily via renderGroupEditTab. *}
{if $is_new}
    <div class="alert alert-info"><i class="fa fa-info-circle"></i> Save the group first — actions become available once it has servers assigned.</div>
{else}
    <div class="row">
        <div class="col-md-6">
            <h4><i class="fa fa-cogs"></i> Bulk apply</h4>
            <p class="text-muted small">Each button enqueues one task per matching active server in the group. The worker filters keys by category target — buttons just decide which servers get a task.</p>
            <div style="display:flex;flex-direction:column;gap:6px;">
                <button type="button" class="btn btn-warning" id="puq-bulk-cfg" data-target="all"><i class="fa fa-magic"></i> Apply Hestia config to <strong>all</strong> servers</button>
                <button type="button" class="btn btn-default" id="puq-bulk-cfg-web" data-target="web"><i class="fa fa-globe"></i> Apply config to <strong>web</strong> servers only</button>
                <button type="button" class="btn btn-default" id="puq-bulk-cfg-mail" data-target="mail"><i class="fa fa-envelope"></i> Apply config to <strong>mail</strong> servers only</button>
                <button type="button" class="btn btn-default" id="puq-bulk-cfg-dns" data-target="dns"><i class="fa fa-network-wired"></i> Apply config to <strong>DNS</strong> servers only (Hestia-driver)</button>
                <hr style="margin:6px 0;">
                <button type="button" class="btn btn-info" id="puq-bulk-files"><i class="fa fa-cloud-upload-alt"></i> Apply standard files to web servers</button>
                <button type="button" class="btn btn-default" id="puq-bulk-refresh"><i class="fa fa-sync"></i> Refresh status on all servers</button>
            </div>
        </div>
        <div class="col-md-6">
            <h4><i class="fa fa-server"></i> Servers in group <span class="badge" id="puq-grp-srv-count">0</span></h4>
            <table class="table table-condensed table-bordered" id="puq-grp-srv-table">
                <thead><tr>
                    <th>Server</th><th>Type</th><th>Status</th><th>Last collected</th><th></th>
                </tr></thead>
                <tbody><tr><td colspan="5" class="text-center text-muted">Loading…</td></tr></tbody>
            </table>
        </div>
    </div>
{/if}
