<section class="bl-status">
  {{#if hasScene}}
    <p class="bl-scene"><i class="fas fa-map"></i> <strong>{{sceneName}}</strong> — {{levelCount}} level(s)</p>
    {{#if rows.length}}
      <table class="bl-levels">
        <thead><tr><th>Level</th><th>Band (ft)</th><th>Sees</th></tr></thead>
        <tbody>
          {{#each rows}}
            <tr class="{{#if degenerate}}bl-bad{{/if}}">
              <td>{{name}}</td>
              <td>{{bottom}} – {{top}}{{#if degenerate}} ⚠{{/if}}</td>
              <td>{{sees}}</td>
            </tr>
          {{/each}}
        </tbody>
      </table>
    {{else}}
      <p class="bl-muted">{{localize "BL.NoLevels"}}</p>
    {{/if}}
    <ul class="bl-counts">
      <li>{{tileCount}} tiles · {{lightCount}} lights · {{regionCount}} regions</li>
      {{#if offBand}}<li class="bl-bad">⚠ {{offBand}} light(s) sit off-band (elevation not on any level)</li>{{/if}}
      {{#if legacy}}<li class="bl-warn">↪ {{legacy}} light(s) carry legacy flags.levels (cleanup recommended)</li>{{/if}}
    </ul>
    {{#if auditCount}}
      <p class="bl-audit-summary bl-bad"><i class="fas fa-stethoscope"></i> {{auditCount}} {{localize "BL.AuditIssues"}} — {{localize "BL.AuditOpenHint"}}</p>
    {{else}}
      <p class="bl-ok"><i class="fas fa-check"></i> {{localize "BL.NoIssues"}}</p>
    {{/if}}
  {{else}}
    <p class="bl-muted">{{localize "BL.NoScene"}}</p>
  {{/if}}
  <div class="bl-actions">
    <button type="button" data-action="audit"><i class="fas fa-stethoscope"></i> {{localize "BL.AuditTitle"}}</button>
    <button type="button" data-action="generate"><i class="fas fa-layer-group"></i> {{localize "BL.GenTitle"}}</button>
    <button type="button" data-action="setDefaults"><i class="fas fa-sliders"></i> {{localize "BL.DefTitle"}}</button>
    <button type="button" data-action="refresh"><i class="fas fa-rotate"></i> {{localize "BL.Refresh"}}</button>
  </div>
</section>
