{# 风控说明:只读展示 .env 风控参数与当前账户状态 #}
<div class="risk-policy-page full">
    <div class="card settings-card settings-card--risk">
        <h2>风控说明</h2>
        <p class="settings-live-status">
            当前账户状态:
            <span class="risk-status-badge risk-status-{{ risk_status.status|default('normal') }}">
                {{ instance_settings.risk_status_label }}
            </span>
            {% if instance_settings.risk_status_reason %}
            <span class="settings-status-reason">{{ instance_settings.risk_status_reason }}</span>
            {% endif %}
        </p>
        {% if instance_settings.trade_policy_note %}
        <p class="settings-policy-note">账户限制:{{ instance_settings.trade_policy_note }}</p>
        {% endif %}
        <p class="settings-env-hint">以下参数读取自本实例 <code>.env</code>,修改后需重启进程生效.</p>
        <div class="settings-risk-sections">
            {% for section in instance_settings.sections %}
            <div class="card settings-subcard">
                <h3 class="settings-subcard-title">{{ section.title }}</h3>
                <dl class="settings-kv settings-kv--compact">
                    {% for row in section.rows %}
                    <div class="settings-kv-row">
                        <dt>{{ row.label }}</dt>
                        <dd>
                            <span class="settings-kv-value">{{ row.value }}</span>
                            {% if row.note %}
                            <span class="settings-kv-note">{{ row.note }}</span>
                            {% endif %}
                        </dd>
                    </div>
                    {% endfor %}
                </dl>
            </div>
            {% endfor %}
        </div>
    </div>
</div>
