{# 资金与统计条(顶栏 / 系统设置共用,单行展示) #}
<div class="instance-header-stats{% if options_enabled %} instance-header-stats--options{% endif %}">
    <div class="stat-strip-item stat-strip-item--primary">
        <div class="label">交易所</div>
        <div class="value">{{ exchange_display }}</div>
    </div>
    <div class="stat-strip-item">
        <div class="label">交易日</div>
        <div class="value">{{ trading_day }}</div>
    </div>
    <div class="stat-strip-item stat-strip-item--primary">
        <div class="label">总交易</div>
        <div class="value" id="stat-total" data-funds-field="stat-total">{{ total }}</div>
    </div>
    <div class="stat-strip-item">
        <div class="label">胜率</div>
        <div class="value" id="stat-rate" data-funds-field="stat-rate">{{ rate }}%</div>
    </div>
    <div class="stat-strip-item" title="平均盈利 ÷ 平均亏损(当前列表窗口)">
        <div class="label">盈亏比</div>
        <div class="value" id="stat-pl-ratio" data-funds-field="stat-pl-ratio">{% if profit_loss_ratio is not none %}{{ profit_loss_ratio }}{% else %}—{% endif %}</div>
    </div>
    <div class="stat-strip-item">
        <div class="label">总资金</div>
        <div class="value" id="total-funds" data-funds-field="total-funds">{% if total_funds is not none %}{{ funds_fmt(total_funds) }}U{% else %}—{% endif %}</div>
    </div>
    <div class="stat-strip-item">
        <div class="label">资金账户</div>
        <div class="value" id="total-capital" data-funds-field="total-capital">{% if funding_usdt is not none %}{{ funds_fmt(funding_usdt) }}U{% else %}—{% endif %}</div>
    </div>
    <div class="stat-strip-item">
        <div class="label">交易账户</div>
        <div class="value" id="current-capital" data-funds-field="current-capital">{{ funds_fmt(current_capital) }}U</div>
    </div>
    {% if options_enabled %}
    <div class="stat-strip-item">
        <div class="label">期权资金账户</div>
        <div class="value" id="options-funding-usdc" data-funds-field="options-funding-usdc">{{ options_funding_label(options_funding_usdc, options_funding_usdt) }}</div>
    </div>
    <div class="stat-strip-item">
        <div class="label">期权交易账户</div>
        <div class="value" id="options-trading-usdc" data-funds-field="options-trading-usdc">{{ options_funding_label(options_trading_usdc, options_trading_usdt) }}</div>
    </div>
    {% endif %}
    <div class="stat-strip-item stat-strip-item--pnl">
        <div class="label">实时盈亏</div>
        <div class="value" id="realtime-pnl" data-funds-field="realtime-pnl">—</div>
    </div>
</div>
