{{template "admin/layout/base.html" .}}
        <div class="page-header">
            <h1>域能管理</h1>
            <p class="page-desc">管理公户余额与用户域能调整</p>
        </div>

        <div class="fund-card">
            <div class="fund-info">
                <h3>公户余额</h3>
                <p id="fund-balance" class="fund-balance{{if lt .FundBalance 0}} negative{{end}}">{{printf "%.1f" .FundBalanceDisplay}}</p>
            </div>
            <div class="fund-icon">
                <svg viewBox="0 0 24 24" fill="currentColor" width="48" height="48"><path d="M12 1v4M12 19v4M4.22 4.22l2.83 2.83M16.95 16.95l2.83 2.83M1 12h4M19 12h4M4.22 19.78l2.83-2.83M16.95 7.05l2.83-2.83"/></svg>
            </div>
        </div>

        <div class="adjust-form">
            <h3>调整用户域能</h3>
            <form id="adjust-form">
                <div class="form-group">
                    <label for="user_ids">目标用户 UID（多个用英文逗号分隔）</label>
                    <input type="text" id="user_ids" name="user_ids" placeholder="例如：1,2,3" required>
                </div>
                <div class="form-group">
                    <label for="amount">调整金额（正数为增加，负数为扣减，×10存储）</label>
                    <input type="number" id="amount" name="amount" placeholder="例如：10 表示 +1.0 域能" required>
                    <div class="form-hint">存储单位 ×10：输入 10 = +1.0 域能，输入 -5 = -0.5 域能</div>
                </div>
                <div class="form-group">
                    <label for="adjust-mode">资金来源</label>
                    <select id="adjust-mode" name="mode">
                        <option value="admin_transfer">公户转出（受余额约束）</option>
                        {{if .IsOwner}}<option value="system_operation">系统操作（不受余额约束，仅站长可用）</option>{{end}}
                    </select>
                </div>
                <div class="form-group">
                    <label for="description">操作说明</label>
                    <textarea id="description" name="description" placeholder="简要说明调整原因" required maxlength="500"></textarea>
                </div>
                <button type="submit" class="btn-primary">确认调整</button>
                <div id="adjust-message" class="form-message"></div>
            </form>
        </div>
{{template "admin/layout/footer.html" .}}
