{% extends "base.html" %}
{% block title %}Killswitch — SooSeF{% endblock %}
{% block content %}
<h2 class="text-danger"><i class="bi bi-exclamation-octagon me-2"></i>Emergency Killswitch</h2>
<p class="text-muted">Destroy all key material and sensitive data. This action is irreversible.</p>

<div class="card bg-dark border-danger mt-4">
    <div class="card-body">
        <h5 class="card-title text-danger">Destruction Order</h5>
        <ol class="text-muted small">
            <li>Ed25519 identity keys (signing identity)</li>
            <li>Stegasoo channel key (deployment binding)</li>
            <li>Flask session secret (invalidates all sessions)</li>
            <li>Auth database (user accounts)</li>
            <li>Attestation log + index (provenance records)</li>
            <li>Temporary files (staged uploads)</li>
            <li>Configuration</li>
            <li>System logs (best-effort)</li>
        </ol>

        <hr class="border-danger">

        <form method="POST" action="{{ url_for('fieldkit.killswitch') }}">
              <input type="hidden" name="csrf_token" value="{{ csrf_token() }}"/>
            <input type="hidden" name="action" value="fire">
            <div class="mb-3">
                <label class="form-label text-danger fw-bold">Type CONFIRM-PURGE to proceed:</label>
                <input type="text" name="confirm" class="form-control bg-dark border-danger text-danger"
                       placeholder="CONFIRM-PURGE" autocomplete="off">
            </div>
            <div class="mb-3">
                <label class="form-label text-danger fw-bold">Re-enter your password:</label>
                <input type="password" name="password" class="form-control bg-dark border-danger text-danger"
                       autocomplete="current-password" required>
            </div>
            <button type="submit" class="btn btn-danger">
                <i class="bi bi-exclamation-octagon me-1"></i>Execute Purge
            </button>
        </form>
    </div>
</div>
{% endblock %}
